1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2004
National Institute of Advanced Industrial Science and Technology (AIST)
This file is part of the m17n library documentation.
See the end for copying conditions.
-->
<html><head><meta http-equiv="Content-Type" content="text/html;charset="UTF-8">
<title>The m17n Library</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<a name="top-of-page"></a>
<hr><center>
<a class="qindex" href="index.html">Main Page</a>
<a class="qindex" href="modules.html">Modules</a>
<!-- <a class="qindex" href="classes.html">Alphabetical List</a> -->
<a class="qindex" href="annotated.html">Data Structures</a>
<!-- <a class="qindex" href="files.html">File List</a> -->
<!-- <a class="qindex" href="functions.html">Data Fields</a> -->
<a class="qindex" href="globals.html">Globals</a>
<a class="qindex" href="pages.html">Appendix</a>
</center>
<hr>
<!-- Generated by Doxygen 1.3.9.1 -->
<h1>Drawing<br>
<small>
[<a class="el" href="group__m17nGUI.html">GUI API</a>]</small>
</h1>Drawing M-texts on a window.
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structMDrawControl.html">MDrawControl</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of a text drawing control. <a href="structMDrawControl.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structMDrawMetric.html">MDrawMetric</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of metric for gylphs and texts. <a href="structMDrawMetric.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structMDrawGlyphInfo.html">MDrawGlyphInfo</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of information about a glyph. <a href="structMDrawGlyphInfo.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structMDrawGlyph.html">MDrawGlyph</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Type of information about a glyph metric and font. <a href="structMDrawGlyph.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Window system dependent type for a window. <a href="#ga0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga1">MDrawRegion</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Window system dependent type for a region. <a href="#ga1"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga2">mdraw_text</a> (<a class="el" href="group__m17nFrame.html#ga0">MFrame</a> *frame, <a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a> win, int x, int y, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt, int from, int to)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw an M-text on a window. <a href="#ga2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga3">mdraw_image_text</a> (<a class="el" href="group__m17nFrame.html#ga0">MFrame</a> *frame, <a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a> win, int x, int y, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt, int from, int to)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw an M-text on a window as an image. <a href="#ga3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga4">mdraw_text_with_control</a> (<a class="el" href="group__m17nFrame.html#ga0">MFrame</a> *frame, <a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a> win, int x, int y, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt, int from, int to, <a class="el" href="structMDrawControl.html">MDrawControl</a> *control)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw an M-text on a window with fine control. <a href="#ga4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga5">mdraw_text_extents</a> (<a class="el" href="group__m17nFrame.html#ga0">MFrame</a> *frame, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt, int from, int to, <a class="el" href="structMDrawControl.html">MDrawControl</a> *control, <a class="el" href="structMDrawMetric.html">MDrawMetric</a> *overall_ink_return, <a class="el" href="structMDrawMetric.html">MDrawMetric</a> *overall_logical_return, <a class="el" href="structMDrawMetric.html">MDrawMetric</a> *overall_line_return)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compute text pixel width. <a href="#ga5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga6">mdraw_text_per_char_extents</a> (<a class="el" href="group__m17nFrame.html#ga0">MFrame</a> *frame, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt, int from, int to, <a class="el" href="structMDrawControl.html">MDrawControl</a> *control, <a class="el" href="structMDrawMetric.html">MDrawMetric</a> *ink_array_return, <a class="el" href="structMDrawMetric.html">MDrawMetric</a> *logical_array_return, int array_size, int *num_chars_return, <a class="el" href="structMDrawMetric.html">MDrawMetric</a> *overall_ink_return, <a class="el" href="structMDrawMetric.html">MDrawMetric</a> *overall_logical_return)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compute the text dimensions of each character of M-text. <a href="#ga6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga7">mdraw_coordinates_position</a> (<a class="el" href="group__m17nFrame.html#ga0">MFrame</a> *frame, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt, int from, int to, int x_offset, int y_offset, <a class="el" href="structMDrawControl.html">MDrawControl</a> *control)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the character position nearest to the coordinates. <a href="#ga7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga8">mdraw_glyph_info</a> (<a class="el" href="group__m17nFrame.html#ga0">MFrame</a> *frame, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt, int from, int pos, <a class="el" href="structMDrawControl.html">MDrawControl</a> *control, <a class="el" href="structMDrawGlyphInfo.html">MDrawGlyphInfo</a> *info)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compute information about a glyph. <a href="#ga8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga9">mdraw_glyph_list</a> (<a class="el" href="group__m17nFrame.html#ga0">MFrame</a> *frame, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt, int from, int to, <a class="el" href="structMDrawControl.html">MDrawControl</a> *control, <a class="el" href="structMDrawGlyph.html">MDrawGlyph</a> *glyphs, int array_size, int *num_glyphs_return)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Compute information about glyph sequence. <a href="#ga9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga10">mdraw_text_items</a> (<a class="el" href="group__m17nFrame.html#ga0">MFrame</a> *frame, <a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a> win, int x, int y, <a class="el" href="structMDrawTextItem.html">MDrawTextItem</a> *items, int nitems)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw one or more textitems. <a href="#ga10"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga11">mdraw_default_line_break</a> (<a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt, int pos, int from, int to, int line, int y)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">calculate a line breaking position. <a href="#ga11"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga12">mdraw_per_char_extents</a> (<a class="el" href="group__m17nFrame.html#ga0">MFrame</a> *frame, <a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt, <a class="el" href="structMDrawMetric.html">MDrawMetric</a> *array_return, <a class="el" href="structMDrawMetric.html">MDrawMetric</a> *overall_return)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Obtain per character dimension information. <a href="#ga12"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__m17nDraw.html#ga13">mdraw_clear_cache</a> (<a class="el" href="group__m17nMtext.html#ga0">MText</a> *mt)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">clear cached information. <a href="#ga13"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The m17n GUI API provides functions to draw M-texts.<p>
The fonts used for drawing are selected automatically based on the fontset and the properties of a face. A face also specifies the appearance of M-texts, i.e. font size, color, underline, etc.<p>
The drawing format of M-texts can be controlled in a variety of ways, which provides powerful 2-dimensional layouting facility. <hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga0" doxytag="m17n-gui.h::MDrawWindow"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">typedef void* <a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The type <a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a> is for a window; a rectangular area that works in several ways like a miniature screen.<p>
What it actually points depends on a window system. A program that uses the m17n-X library must coerce the type <code>Drawable</code> to this type. </td>
</tr>
</table>
<a class="anchor" name="ga1" doxytag="m17n-gui.h::MDrawRegion"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">typedef void* <a class="el" href="group__m17nDraw.html#ga1">MDrawRegion</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The type <a class="el" href="group__m17nDraw.html#ga1">MDrawRegion</a> is for a region; an arbitrary set of pixels on the screen (typically a rectangular area).<p>
What it actually points depends on a window system. A program that uses the m17n-X library must coerce the type <code>Region</code> to this type. </td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga2" doxytag="draw.c::mdraw_text"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int mdraw_text </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nFrame.html#ga0">MFrame</a> * </td>
<td class="mdname" nowrap> <em>frame</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a> </td>
<td class="mdname" nowrap> <em>win</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>x</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>y</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname" nowrap> <em>mt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>from</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>to</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga2">mdraw_text()</a> function draws the text between <b>from</b> and <b>to</b> of M-text <b>mt</b> on window <b>win</b> of frame <b>frame</b> at coordinate (<b>x</b>, <b>y</b>).<p>
The appearance of the text (size, style, color, etc) is specified by the value of the text property whose key is <code>Mface</code>. If the M-text or a part of the M-text does not have such a text property, the default face of <b>frame</b> is used.<p>
The font used to draw a character in the M-text is selected from the value of the fontset property of a face by the following algorithm:<p>
<ol>
<li>
Search the text properties given to the character for the one whose key is <code>Mcharset</code>; its value should be either a symbol specifying a charset or <a class="el" href="group__m17nSymbol.html#ga1">Mnil</a>. If the value is <a class="el" href="group__m17nSymbol.html#ga1">Mnil</a>, proceed to the next step.<p>
Otherwise, search the mapping table of the fontset for the charset. If no entry is found proceed to the next step.<p>
If an entry is found, use one of the fonts in the entry that has a glyph for the character and that matches best with the face properties. If no such font exists, proceed to the next step.<p>
</li>
<li>
Get the character property "script" of the character. If it is inherited, get the script property from the previous characters. If there is no previous character, or none of them has the script property other than inherited, proceed to the next step.<p>
Search the text properties given to the character for the one whose key is <code>Mlanguage</code>; its value should be either a symbol specifying a language or <code>Mnil</code>.<p>
Search the mapping table of the fontset for the combination of the script and language. If no entry is found, proceed to the next step.<p>
If an entry is found, use one of the fonts in the entry that has a glyph for the character and that matches best with the face properties. If no such font exists, proceed to the next step.<p>
</li>
<li>
Search the fall-back table of the fontset for a font that has a glyph of the character. If such a font is found, use that font.<p>
</li>
</ol>
<p>
If no font is found by the algorithm above, this function draws an empty box for the character.<p>
This function draws only the glyph foreground. To specify the background color, use <a class="el" href="group__m17nDraw.html#ga3">mdraw_image_text()</a> or <a class="el" href="group__m17nDraw.html#ga4">mdraw_text_with_control()</a>.<p>
This function is the counterpart of <code>XDrawString()</code>, <code>XmbDrawString()</code>, and <code>XwcDrawString()</code> functions in the X Window System.<p>
<dl compact><dt><b>Return value:</b></dt><dd>If the operation was successful, <a class="el" href="group__m17nDraw.html#ga2">mdraw_text()</a> returns 0. If an error is detected, it returns -1 and assigns an error code to the external variable <a class="el" href="group__m17nError.html#ga0">merror_code</a>.</dd></dl>
<dl compact><dt><b>Errors:</b></dt><dd><code>MERROR_RANGE</code> </dd></dl>
<dl compact><dt><b>See Also:</b></dt><dd><a class="el" href="group__m17nDraw.html#ga3">mdraw_image_text()</a> </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga3" doxytag="draw.c::mdraw_image_text"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int mdraw_image_text </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nFrame.html#ga0">MFrame</a> * </td>
<td class="mdname" nowrap> <em>frame</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a> </td>
<td class="mdname" nowrap> <em>win</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>x</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>y</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname" nowrap> <em>mt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>from</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>to</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga3">mdraw_image_text()</a> function draws the text between <b>from</b> and <b>to</b> of M-text <b>mt</b> as image on window <b>win</b> of frame <b>frame</b> at coordinate (<b>x</b>, <b>y</b>).<p>
The way to draw a text is the same as in <a class="el" href="group__m17nDraw.html#ga2">mdraw_text()</a> except that this function also draws the background with the color specified by faces.<p>
This function is the counterpart of <code>XDrawImageString()</code>, <code>XmbDrawImageString()</code>, and <code>XwcDrawImageString()</code> functions in the X Window System.<p>
<dl compact><dt><b>Return value:</b></dt><dd>If the operation was successful, <a class="el" href="group__m17nDraw.html#ga3">mdraw_image_text()</a> returns 0. If an error is detected, it returns -1 and assigns an error code to the external variable <a class="el" href="group__m17nError.html#ga0">merror_code</a>.</dd></dl>
<dl compact><dt><b>Errors:</b></dt><dd><code>MERROR_RANGE</code> </dd></dl>
<dl compact><dt><b>See Also:</b></dt><dd><a class="el" href="group__m17nDraw.html#ga2">mdraw_text()</a> </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga4" doxytag="draw.c::mdraw_text_with_control"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int mdraw_text_with_control </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nFrame.html#ga0">MFrame</a> * </td>
<td class="mdname" nowrap> <em>frame</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a> </td>
<td class="mdname" nowrap> <em>win</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>x</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>y</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname" nowrap> <em>mt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>from</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>to</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawControl.html">MDrawControl</a> * </td>
<td class="mdname" nowrap> <em>control</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga4">mdraw_text_with_control()</a> function draws the text between <b>from</b> and <b>to</b> of M-text <b>mt</b> on windows <b>win</b> of frame <b>frame</b> at coordinate (<b>x</b>, <b>y</b>).<p>
The way to draw a text is the same as in <a class="el" href="group__m17nDraw.html#ga2">mdraw_text()</a> except that this function also follows what specified in the drawing control object <b>control</b>.<p>
For instance, if <two_dimensional> of <b>control</b> is nonzero, this function draw an M-text 2-dimensionally, i.e., newlines in M-text breaks lines and the following characters are drawn in the next line. See the documentation of the structure @ <a class="el" href="structMDrawControl.html">MDrawControl</a> for more detail. </td>
</tr>
</table>
<a class="anchor" name="ga5" doxytag="draw.c::mdraw_text_extents"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int mdraw_text_extents </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nFrame.html#ga0">MFrame</a> * </td>
<td class="mdname" nowrap> <em>frame</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname" nowrap> <em>mt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>from</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>to</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawControl.html">MDrawControl</a> * </td>
<td class="mdname" nowrap> <em>control</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawMetric.html">MDrawMetric</a> * </td>
<td class="mdname" nowrap> <em>overall_ink_return</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawMetric.html">MDrawMetric</a> * </td>
<td class="mdname" nowrap> <em>overall_logical_return</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawMetric.html">MDrawMetric</a> * </td>
<td class="mdname" nowrap> <em>overall_line_return</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga5">mdraw_text_extents()</a> function computes the width of text between <b>from</b> and <b>to</b> of M-text <b>mt</b> when it is drawn on a window of frame <b>frame</b> using the <a class="el" href="group__m17nDraw.html#ga4">mdraw_text_with_control()</a> function with the drawing control object <b>control</b>.<p>
If <b>overall_ink_return</b> is not <code>NULL</code>, this function also computes the bounding box of character ink of the M-text, and stores the results in the members of the structure pointed to by <b>overall_ink_return</b>. If the M-text has a face specifying a surrounding box, the box is included in the bounding box.<p>
If <b>overall_logical_return</b> is not <code>NULL</code>, this function also computes the bounding box that provides mininum spacing to other graphical features (such as surrounding box) for the M-text, and stores the results in the members of the structure pointed to by <b>overall_logical_return</b>.<p>
If <b>overall_line_return</b> is not <code>NULL</code>, this function also computes the bounding box that provides mininum spacing to the other M-text drawn, and stores the results in the members of the structure pointed to by <b>overall_line_return</b>. This is a union of <b>overall_ink_return</b> and <b>overall_logical_return</b> if the members min_line_ascent, min_line_descent, max_line_ascent, and max_line_descent of <b>control</b> are all zero.<p>
<dl compact><dt><b>Return value:</b></dt><dd>This function returns the width of the text to be drawn in the unit of pixels. If <b>control->two_dimensional</b> is nonzero and the text is drawn in multiple physical lines, it returns the width of the widest line. If an error occurs, it returns -1 and assigns an error code to the external variable <a class="el" href="group__m17nError.html#ga0">merror_code</a>.</dd></dl>
<dl compact><dt><b>Errors:</b></dt><dd><code>MERROR_RANGE</code> </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga6" doxytag="draw.c::mdraw_text_per_char_extents"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int mdraw_text_per_char_extents </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nFrame.html#ga0">MFrame</a> * </td>
<td class="mdname" nowrap> <em>frame</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname" nowrap> <em>mt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>from</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>to</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawControl.html">MDrawControl</a> * </td>
<td class="mdname" nowrap> <em>control</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawMetric.html">MDrawMetric</a> * </td>
<td class="mdname" nowrap> <em>ink_array_return</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawMetric.html">MDrawMetric</a> * </td>
<td class="mdname" nowrap> <em>logical_array_return</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>array_size</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int * </td>
<td class="mdname" nowrap> <em>num_chars_return</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawMetric.html">MDrawMetric</a> * </td>
<td class="mdname" nowrap> <em>overall_ink_return</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawMetric.html">MDrawMetric</a> * </td>
<td class="mdname" nowrap> <em>overall_logical_return</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga6">mdraw_text_per_char_extents()</a> function computes the drawn metric of each character between <b>from</b> and <b>to</b> of M-text <b>mt</b> assuming that they are drawn on a window of frame <b>frame</b> using the <a class="el" href="group__m17nDraw.html#ga4">mdraw_text_with_control()</a> function with the drawing control object <b>control</b>.<p>
<b>array_size</b> specifies the size of <b>ink_array_return</b> and <b>logical_array_return</b>. Each successive element of <b>ink_array_return</b> and <b>logical_array_return</b> are set to the drawn ink and logical metrics of successive characters respectively, relative to the drawing origin of the M-text. The number of elements of <b>ink_array_return</b> and <b>logical_array_return</b> that have been set is returned to <b>num_chars_return</b>.<p>
If <b>array_size</b> is too small to return all metrics, the function returns -1 and store the requested size in <b>num_chars_return</b>. Otherwise, it returns zero.<p>
If pointer <b>overall_ink_return</b> and <b>overall_logical_return</b> are not <code>NULL</code>, this function also computes the metrics of the overall text and stores the results in the members of the structure pointed to by <b>overall_ink_return</b> and <b>overall_logical_return</b>.<p>
If <b>control->two_dimensional</b> is nonzero, this function computes only the metrics of characters in the first line. </td>
</tr>
</table>
<a class="anchor" name="ga7" doxytag="draw.c::mdraw_coordinates_position"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int mdraw_coordinates_position </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nFrame.html#ga0">MFrame</a> * </td>
<td class="mdname" nowrap> <em>frame</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname" nowrap> <em>mt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>from</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>to</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>x_offset</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>y_offset</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawControl.html">MDrawControl</a> * </td>
<td class="mdname" nowrap> <em>control</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga7">mdraw_coordinates_position()</a> function checks which character is to be drawn at coordinate (<b>x</b>, <b>y</b>) when the text between <b>from</b> and <b>to</b> of M-text <b>mt</b> is drawn at the coordinate (0, 0) using the <a class="el" href="group__m17nDraw.html#ga4">mdraw_text_with_control()</a> function with the drawing control object <b>control</b>. Here, the character position means the number of characters that precede the character in question in <b>mt</b>, that is, the character position of the first character is 0.<p>
<b>frame</b> is used only to get the default face information.<p>
<dl compact><dt><b>Return value:</b></dt><dd>If the glyph image of a character covers coordinate (<b>x</b>, <b>y</b>), <a class="el" href="group__m17nDraw.html#ga7">mdraw_coordinates_position()</a> returns the character position of that character.<br>
<br>
If <b>y</b> is less than the minimum Y-coordinate of the drawn area, it returns <b>from</b>.<br>
<br>
<br>
If <b>y</b> is greater than the maximum Y-coordinate of the drawn area, it returns <b>to</b>.<br>
<br>
<br>
If <b>y</b> fits in with the drawn area but <b>x</b> is less than the minimum X-coordinate, it returns the character position of the first character drawn on the line <b>y</b>.<br>
<br>
<br>
If <b>y</b> fits in with the drawn area but <b>x</b> is greater than the maximum X-coordinate, it returns the character position of the last character drawn on the line <b>y</b>. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga8" doxytag="draw.c::mdraw_glyph_info"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int mdraw_glyph_info </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nFrame.html#ga0">MFrame</a> * </td>
<td class="mdname" nowrap> <em>frame</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname" nowrap> <em>mt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>from</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>pos</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawControl.html">MDrawControl</a> * </td>
<td class="mdname" nowrap> <em>control</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawGlyphInfo.html">MDrawGlyphInfo</a> * </td>
<td class="mdname" nowrap> <em>info</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga8">mdraw_glyph_info()</a> function computes information about a glyph that covers a character at position <b>pos</b> of the M-text <b>mt</b> assuming that the text is drawn from the character at <b>from</b> of <b>mt</b> on a window of frame <b>frame</b> using the <a class="el" href="group__m17nDraw.html#ga4">mdraw_text_with_control()</a> function with the drawing control object <b>control</b>.<p>
The information is stored in the members of <b>info</b>.<p>
<dl compact><dt><b>See Also:</b></dt><dd><a class="el" href="structMDrawGlyphInfo.html">MDrawGlyphInfo</a> </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga9" doxytag="draw.c::mdraw_glyph_list"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int mdraw_glyph_list </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nFrame.html#ga0">MFrame</a> * </td>
<td class="mdname" nowrap> <em>frame</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname" nowrap> <em>mt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>from</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>to</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawControl.html">MDrawControl</a> * </td>
<td class="mdname" nowrap> <em>control</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawGlyph.html">MDrawGlyph</a> * </td>
<td class="mdname" nowrap> <em>glyphs</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>array_size</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int * </td>
<td class="mdname" nowrap> <em>num_glyphs_return</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga9">mdraw_glyph_list()</a> function computes information about glyphs corresponding to the text between <b>from</b> and <b>to</b> of M-text <b>mt</b> when it is drawn on a window of frame <b>frame</b> using the <a class="el" href="group__m17nDraw.html#ga4">mdraw_text_with_control()</a> function with the drawing control object <b>control</b>. <b>glyphs</b> is an array of objects to store the information, and <b>array_size</b> is the array size.<p>
If <b>array_size</b> is large enough to cover all glyphs, it stores the number of actually filled elements in the place pointed by <b>num_glyphs_return</b>, and returns 0.<p>
Otherwise, it stores the required array size in the place pointed by <b>num_glyphs_return</b>, and returns -1.<p>
<dl compact><dt><b>See Also:</b></dt><dd><a class="el" href="structMDrawGlyph.html">MDrawGlyph</a> </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga10" doxytag="draw.c::mdraw_text_items"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void mdraw_text_items </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nFrame.html#ga0">MFrame</a> * </td>
<td class="mdname" nowrap> <em>frame</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nDraw.html#ga0">MDrawWindow</a> </td>
<td class="mdname" nowrap> <em>win</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>x</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>y</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawTextItem.html">MDrawTextItem</a> * </td>
<td class="mdname" nowrap> <em>items</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>nitems</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga10">mdraw_text_items()</a> function draws one or more M-texts on window <b>win</b> of <b>frame</b> at coordinate (<b>x</b>, <b>y</b>). <b>items</b> is an array of the textitems to be drawn and <b>nitems</b> is the number of textimtems in the array.<p>
<dl compact><dt><b>See Also:</b></dt><dd>MTextItem, <a class="el" href="group__m17nDraw.html#ga2">mdraw_text()</a>. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga11" doxytag="draw.c::mdraw_default_line_break"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int mdraw_default_line_break </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname" nowrap> <em>mt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>pos</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>from</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>to</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>line</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>y</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The function <a class="el" href="group__m17nDraw.html#ga11">mdraw_default_line_break()</a> calculates a line breaking position based on the line number <b>line</b> and the coordinate <b>y</b>, when a line is too long to fit within the width limit. <b>pos</b> is the position of the character next to the last one that fits within the limit. <b>from</b> is the position of the first character of the line, and TO is the position of the last character displayed on the line if there were not width limit. LINE and Y are reset to 0 when a line is broken by a newline character, and incremented each time when a long line is broken because of the width limit.<p>
<dl compact><dt><b>Return value: </b></dt><dd>This function returns a character position to break the line. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="ga12" doxytag="draw.c::mdraw_per_char_extents"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void mdraw_per_char_extents </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nFrame.html#ga0">MFrame</a> * </td>
<td class="mdname" nowrap> <em>frame</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname" nowrap> <em>mt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawMetric.html">MDrawMetric</a> * </td>
<td class="mdname" nowrap> <em>array_return</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="structMDrawMetric.html">MDrawMetric</a> * </td>
<td class="mdname" nowrap> <em>overall_return</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga12">mdraw_per_char_extents()</a> function computes the text dimension of each character in M-text <b>mt</b>. The faces given as text properties in <b>mt</b> and the default face of frame <b>frame</b> determine the fonts to draw the text. Each successive element in <b>array_return</b> is set to the drawn metrics of successive characters, which is relative to the origin of the drawing, and a rectangle for each character in <b>mt</b>. The number of elements of <b>array_return</b> must be equal to or greater than the number of characters in <b>mt</b>.<p>
If pointer <b>overall_return</b> is not <code>NULL</code>, this function also computes the extents of the overall text and stores the results in the members of the structure pointed to by <b>overall_return</b>. </td>
</tr>
</table>
<a class="anchor" name="ga13" doxytag="draw.c::mdraw_clear_cache"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void mdraw_clear_cache </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="group__m17nMtext.html#ga0">MText</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>mt</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
The <a class="el" href="group__m17nDraw.html#ga13">mdraw_clear_cache()</a> function clear cached information on M-text <b>mt</b> that was attached by any of the drawing functions. When the behaviour of `format' or `line_break' member functions of <a class="el" href="structMDrawControl.html">MDrawControl</a> is changed, the cache must be cleared.<p>
<dl compact><dt><b>See Also:</b></dt><dd><a class="el" href="structMDrawControl.html">MDrawControl</a> </dd></dl>
</td>
</tr>
</table>
<hr>
<center>
<a href="#top-of-page">Top of this page</a><br><br>
<a class="qindex" href="index.html">Main Page</a>
<a class="qindex" href="modules.html">Modules</a>
<!-- <a class="qindex" href="classes.html">Alphabetical List</a> -->
<a class="qindex" href="annotated.html">Data Structures</a>
<!-- <a class="qindex" href="files.html">File List</a> -->
<!-- <a class="qindex" href="functions.html">Data Fields</a> -->
<a class="qindex" href="globals.html">Globals</a>
<a class="qindex" href="pages.html">Appendix</a>
</center>
<hr>
<ADDRESS>
<a href="http://www.m17n.org/m17n-lib/index.html" target="mulewindow"><img src="parrot.png" align=bottom alt="mulemark" border=0></a>
<A HREF="mailto:mule-aist@m17n.org">mule-aist@m17n.org</a>
</ADDRESS>
</body>
</HTML>
<!-- Copyright information
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2004
National Institute of Advanced Industrial Science and Technology (AIST)
This file is part of the m17n library documentation.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Section, Front-Cover Texts "The m17n library documentation",
and no Back-Cover Texts. A copy of the license is included in the
appendix entitled "GNU Free Documentation License".
-->
|