/modules/freetype2/docs/reference/ft2-outline_processing.html

http://github.com/zpao/v8monkey · HTML · 1119 lines · 1026 code · 93 blank · 0 comment · 0 complexity · 14dd7bfd0064b53b0ef2d22bd34dfdfc MD5 · raw file

Large files are truncated click here to view the full file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>FreeType-2.4.3 API Reference</title>
  7. <style type="text/css">
  8. body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
  9. color: #000000;
  10. background: #FFFFFF; }
  11. p { text-align: justify; }
  12. h1 { text-align: center; }
  13. li { text-align: justify; }
  14. td { padding: 0 0.5em 0 0.5em; }
  15. td.left { padding: 0 0.5em 0 0.5em;
  16. text-align: left; }
  17. a:link { color: #0000EF; }
  18. a:visited { color: #51188E; }
  19. a:hover { color: #FF0000; }
  20. span.keyword { font-family: monospace;
  21. text-align: left;
  22. white-space: pre;
  23. color: darkblue; }
  24. pre.colored { color: blue; }
  25. ul.empty { list-style-type: none; }
  26. </style>
  27. </head>
  28. <body>
  29. <table align=center><tr><td><font size=-1>[<a href="ft2-index.html">Index</a>]</font></td>
  30. <td width="100%"></td>
  31. <td><font size=-1>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  32. <center><h1>FreeType-2.4.3 API Reference</h1></center>
  33. <center><h1>
  34. Outline Processing
  35. </h1></center>
  36. <h2>Synopsis</h2>
  37. <table align=center cellspacing=5 cellpadding=0 border=0>
  38. <tr><td></td><td><a href="#FT_Outline">FT_Outline</a></td><td></td><td><a href="#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td></tr>
  39. <tr><td></td><td><a href="#FT_OUTLINE_FLAGS">FT_OUTLINE_FLAGS</a></td><td></td><td><a href="#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td></tr>
  40. <tr><td></td><td><a href="#FT_Outline_New">FT_Outline_New</a></td><td></td><td><a href="#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td></tr>
  41. <tr><td></td><td><a href="#FT_Outline_Done">FT_Outline_Done</a></td><td></td><td><a href="#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td></tr>
  42. <tr><td></td><td><a href="#FT_Outline_Copy">FT_Outline_Copy</a></td><td></td><td><a href="#FT_Outline_Funcs">FT_Outline_Funcs</a></td></tr>
  43. <tr><td></td><td><a href="#FT_Outline_Translate">FT_Outline_Translate</a></td><td></td><td><a href="#FT_Outline_Decompose">FT_Outline_Decompose</a></td></tr>
  44. <tr><td></td><td><a href="#FT_Outline_Transform">FT_Outline_Transform</a></td><td></td><td><a href="#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td></tr>
  45. <tr><td></td><td><a href="#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td></td><td><a href="#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td></tr>
  46. <tr><td></td><td><a href="#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td></td><td><a href="#FT_Outline_Render">FT_Outline_Render</a></td></tr>
  47. <tr><td></td><td><a href="#FT_Outline_Check">FT_Outline_Check</a></td><td></td><td><a href="#FT_Orientation">FT_Orientation</a></td></tr>
  48. <tr><td></td><td><a href="#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td></td><td><a href="#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td></tr>
  49. <tr><td></td><td><a href="#ft_outline_flags">ft_outline_flags</a></td><td></td><td></td></tr>
  50. </table><br><br>
  51. <table align=center width="87%"><tr><td>
  52. <p>This section contains routines used to create and destroy scalable glyph images known as &lsquo;outlines&rsquo;. These can also be measured, transformed, and converted into bitmaps and pixmaps.</p>
  53. </td></tr></table><br>
  54. <table align=center width="75%"><tr><td>
  55. <h4><a name="FT_Outline">FT_Outline</a></h4>
  56. <table align=center width="87%"><tr><td>
  57. Defined in FT_IMAGE_H (freetype/ftimage.h).
  58. </td></tr></table><br>
  59. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  60. <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_
  61. {
  62. <span class="keyword">short</span> n_contours; /* number of contours in glyph */
  63. <span class="keyword">short</span> n_points; /* number of points in the glyph */
  64. <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* points; /* the outline's points */
  65. <span class="keyword">char</span>* tags; /* the points flags */
  66. <span class="keyword">short</span>* contours; /* the contour end points */
  67. <span class="keyword">int</span> flags; /* outline masks */
  68. } <b>FT_Outline</b>;
  69. /* Following limits must be consistent with */
  70. /* <b>FT_Outline</b>.{n_contours,n_points} */
  71. #define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
  72. #define FT_OUTLINE_POINTS_MAX SHRT_MAX
  73. </pre></table><br>
  74. <table align=center width="87%"><tr><td>
  75. <p>This structure is used to describe an outline to the scan-line converter.</p>
  76. </td></tr></table><br>
  77. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
  78. <p></p>
  79. <table cellpadding=3 border=0>
  80. <tr valign=top><td><b>n_contours</b></td><td>
  81. <p>The number of contours in the outline.</p>
  82. </td></tr>
  83. <tr valign=top><td><b>n_points</b></td><td>
  84. <p>The number of points in the outline.</p>
  85. </td></tr>
  86. <tr valign=top><td><b>points</b></td><td>
  87. <p>A pointer to an array of &lsquo;n_points&rsquo; <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a> elements, giving the outline's point coordinates.</p>
  88. </td></tr>
  89. <tr valign=top><td><b>tags</b></td><td>
  90. <p>A pointer to an array of &lsquo;n_points&rsquo; chars, giving each outline point's type.</p>
  91. <p>If bit&nbsp;0 is unset, the point is &lsquo;off&rsquo; the curve, i.e., a Bézier control point, while it is &lsquo;on&rsquo; if set.</p>
  92. <p>Bit&nbsp;1 is meaningful for &lsquo;off&rsquo; points only. If set, it indicates a third-order Bézier arc control point; and a second-order control point if unset.</p>
  93. <p>If bit&nbsp;2 is set, bits 5-7 contain the drop-out mode (as defined in the OpenType specification; the value is the same as the argument to the SCANMODE instruction).</p>
  94. <p>Bits 3 and&nbsp;4 are reserved for internal purposes.</p>
  95. </td></tr>
  96. <tr valign=top><td><b>contours</b></td><td>
  97. <p>An array of &lsquo;n_contours&rsquo; shorts, giving the end point of each contour within the outline. For example, the first contour is defined by the points &lsquo;0&rsquo; to &lsquo;contours[0]&rsquo;, the second one is defined by the points &lsquo;contours[0]+1&rsquo; to &lsquo;contours[1]&rsquo;, etc.</p>
  98. </td></tr>
  99. <tr valign=top><td><b>flags</b></td><td>
  100. <p>A set of bit flags used to characterize the outline and give hints to the scan-converter and hinter on how to convert/grid-fit it. See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_FLAGS</a>.</p>
  101. </td></tr>
  102. </table>
  103. </td></tr></table>
  104. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  105. <p>The B/W rasterizer only checks bit&nbsp;2 in the &lsquo;tags&rsquo; array for the first point of each contour. The drop-out mode as given with <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a>, <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SMART_DROPOUTS</a>, and <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_INCLUDE_STUBS</a> in &lsquo;flags&rsquo; is then overridden.</p>
  106. </td></tr></table>
  107. </td></tr></table>
  108. <hr width="75%">
  109. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  110. <td width="100%"></td>
  111. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  112. <table align=center width="75%"><tr><td>
  113. <h4><a name="FT_OUTLINE_FLAGS">FT_OUTLINE_FLAGS</a></h4>
  114. <table align=center width="87%"><tr><td>
  115. Defined in FT_IMAGE_H (freetype/ftimage.h).
  116. </td></tr></table><br>
  117. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  118. #define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_NONE</a> 0x0
  119. #define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_OWNER</a> 0x1
  120. #define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_EVEN_ODD_FILL</a> 0x2
  121. #define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_REVERSE_FILL</a> 0x4
  122. #define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a> 0x8
  123. #define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SMART_DROPOUTS</a> 0x10
  124. #define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_INCLUDE_STUBS</a> 0x20
  125. #define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_HIGH_PRECISION</a> 0x100
  126. #define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SINGLE_PASS</a> 0x200
  127. </pre></table><br>
  128. <table align=center width="87%"><tr><td>
  129. <p>A list of bit-field constants use for the flags in an outline's &lsquo;flags&rsquo; field.</p>
  130. </td></tr></table><br>
  131. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
  132. <p></p>
  133. <table cellpadding=3 border=0>
  134. <tr valign=top><td><b>FT_OUTLINE_NONE</b></td><td>
  135. <p>Value&nbsp;0 is reserved.</p>
  136. </td></tr>
  137. <tr valign=top><td><b>FT_OUTLINE_OWNER</b></td><td>
  138. <p>If set, this flag indicates that the outline's field arrays (i.e., &lsquo;points&rsquo;, &lsquo;flags&rsquo;, and &lsquo;contours&rsquo;) are &lsquo;owned&rsquo; by the outline object, and should thus be freed when it is destroyed.</p>
  139. </td></tr>
  140. <tr valign=top><td colspan=0><b>FT_OUTLINE_EVEN_ODD_FILL</b></td></tr>
  141. <tr valign=top><td></td><td>
  142. <p>By default, outlines are filled using the non-zero winding rule. If set to 1, the outline will be filled using the even-odd fill rule (only works with the smooth rasterizer).</p>
  143. </td></tr>
  144. <tr valign=top><td colspan=0><b>FT_OUTLINE_REVERSE_FILL</b></td></tr>
  145. <tr valign=top><td></td><td>
  146. <p>By default, outside contours of an outline are oriented in clock-wise direction, as defined in the TrueType specification. This flag is set if the outline uses the opposite direction (typically for Type&nbsp;1 fonts). This flag is ignored by the scan converter.</p>
  147. </td></tr>
  148. <tr valign=top><td colspan=0><b>FT_OUTLINE_IGNORE_DROPOUTS</b></td></tr>
  149. <tr valign=top><td></td><td>
  150. <p>By default, the scan converter will try to detect drop-outs in an outline and correct the glyph bitmap to ensure consistent shape continuity. If set, this flag hints the scan-line converter to ignore such cases. See below for more information.</p>
  151. </td></tr>
  152. <tr valign=top><td colspan=0><b>FT_OUTLINE_SMART_DROPOUTS</b></td></tr>
  153. <tr valign=top><td></td><td>
  154. <p>Select smart dropout control. If unset, use simple dropout control. Ignored if <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a> is set. See below for more information.</p>
  155. </td></tr>
  156. <tr valign=top><td colspan=0><b>FT_OUTLINE_INCLUDE_STUBS</b></td></tr>
  157. <tr valign=top><td></td><td>
  158. <p>If set, turn pixels on for &lsquo;stubs&rsquo;, otherwise exclude them. Ignored if <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a> is set. See below for more information.</p>
  159. </td></tr>
  160. <tr valign=top><td colspan=0><b>FT_OUTLINE_HIGH_PRECISION</b></td></tr>
  161. <tr valign=top><td></td><td>
  162. <p>This flag indicates that the scan-line converter should try to convert this outline to bitmaps with the highest possible quality. It is typically set for small character sizes. Note that this is only a hint that might be completely ignored by a given scan-converter.</p>
  163. </td></tr>
  164. <tr valign=top><td><b>FT_OUTLINE_SINGLE_PASS</b></td><td>
  165. <p>This flag is set to force a given scan-converter to only use a single pass over the outline to render a bitmap glyph image. Normally, it is set for very large character sizes. It is only a hint that might be completely ignored by a given scan-converter.</p>
  166. </td></tr>
  167. </table>
  168. </td></tr></table>
  169. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  170. <p>The flags <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a>, <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SMART_DROPOUTS</a>, and <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_INCLUDE_STUBS</a> are ignored by the smooth rasterizer.</p>
  171. <p>There exists a second mechanism to pass the drop-out mode to the B/W rasterizer; see the &lsquo;tags&rsquo; field in <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>.</p>
  172. <p>Please refer to the description of the &lsquo;SCANTYPE&rsquo; instruction in the OpenType specification (in file &lsquo;ttinst1.doc&rsquo;) how simple drop-outs, smart drop-outs, and stubs are defined.</p>
  173. </td></tr></table>
  174. </td></tr></table>
  175. <hr width="75%">
  176. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  177. <td width="100%"></td>
  178. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  179. <table align=center width="75%"><tr><td>
  180. <h4><a name="FT_Outline_New">FT_Outline_New</a></h4>
  181. <table align=center width="87%"><tr><td>
  182. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  183. </td></tr></table><br>
  184. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  185. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  186. <b>FT_Outline_New</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
  187. <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> numPoints,
  188. <a href="ft2-basic_types.html#FT_Int">FT_Int</a> numContours,
  189. <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> *anoutline );
  190. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  191. FT_Outline_New_Internal( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
  192. <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> numPoints,
  193. <a href="ft2-basic_types.html#FT_Int">FT_Int</a> numContours,
  194. <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> *anoutline );
  195. </pre></table><br>
  196. <table align=center width="87%"><tr><td>
  197. <p>Create a new outline of a given size.</p>
  198. </td></tr></table><br>
  199. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  200. <p></p>
  201. <table cellpadding=3 border=0>
  202. <tr valign=top><td><b>library</b></td><td>
  203. <p>A handle to the library object from where the outline is allocated. Note however that the new outline will <b>not</b> necessarily be <b>freed</b>, when destroying the library, by <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a>.</p>
  204. </td></tr>
  205. <tr valign=top><td><b>numPoints</b></td><td>
  206. <p>The maximal number of points within the outline.</p>
  207. </td></tr>
  208. <tr valign=top><td><b>numContours</b></td><td>
  209. <p>The maximal number of contours within the outline.</p>
  210. </td></tr>
  211. </table>
  212. </td></tr></table>
  213. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
  214. <p></p>
  215. <table cellpadding=3 border=0>
  216. <tr valign=top><td><b>anoutline</b></td><td>
  217. <p>A handle to the new outline.</p>
  218. </td></tr>
  219. </table>
  220. </td></tr></table>
  221. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  222. <p>FreeType error code. 0&nbsp;means success.</p>
  223. </td></tr></table>
  224. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  225. <p>The reason why this function takes a &lsquo;library&rsquo; parameter is simply to use the library's memory allocator.</p>
  226. </td></tr></table>
  227. </td></tr></table>
  228. <hr width="75%">
  229. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  230. <td width="100%"></td>
  231. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  232. <table align=center width="75%"><tr><td>
  233. <h4><a name="FT_Outline_Done">FT_Outline_Done</a></h4>
  234. <table align=center width="87%"><tr><td>
  235. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  236. </td></tr></table><br>
  237. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  238. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  239. <b>FT_Outline_Done</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
  240. <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
  241. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  242. FT_Outline_Done_Internal( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
  243. <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
  244. </pre></table><br>
  245. <table align=center width="87%"><tr><td>
  246. <p>Destroy an outline created with <a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a>.</p>
  247. </td></tr></table><br>
  248. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  249. <p></p>
  250. <table cellpadding=3 border=0>
  251. <tr valign=top><td><b>library</b></td><td>
  252. <p>A handle of the library object used to allocate the outline.</p>
  253. </td></tr>
  254. <tr valign=top><td><b>outline</b></td><td>
  255. <p>A pointer to the outline object to be discarded.</p>
  256. </td></tr>
  257. </table>
  258. </td></tr></table>
  259. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  260. <p>FreeType error code. 0&nbsp;means success.</p>
  261. </td></tr></table>
  262. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  263. <p>If the outline's &lsquo;owner&rsquo; field is not set, only the outline descriptor will be released.</p>
  264. <p>The reason why this function takes an &lsquo;library&rsquo; parameter is simply to use ft_mem_free().</p>
  265. </td></tr></table>
  266. </td></tr></table>
  267. <hr width="75%">
  268. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  269. <td width="100%"></td>
  270. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  271. <table align=center width="75%"><tr><td>
  272. <h4><a name="FT_Outline_Copy">FT_Outline_Copy</a></h4>
  273. <table align=center width="87%"><tr><td>
  274. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  275. </td></tr></table><br>
  276. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  277. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  278. <b>FT_Outline_Copy</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* source,
  279. <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> *target );
  280. </pre></table><br>
  281. <table align=center width="87%"><tr><td>
  282. <p>Copy an outline into another one. Both objects must have the same sizes (number of points &amp; number of contours) when this function is called.</p>
  283. </td></tr></table><br>
  284. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  285. <p></p>
  286. <table cellpadding=3 border=0>
  287. <tr valign=top><td><b>source</b></td><td>
  288. <p>A handle to the source outline.</p>
  289. </td></tr>
  290. </table>
  291. </td></tr></table>
  292. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
  293. <p></p>
  294. <table cellpadding=3 border=0>
  295. <tr valign=top><td><b>target</b></td><td>
  296. <p>A handle to the target outline.</p>
  297. </td></tr>
  298. </table>
  299. </td></tr></table>
  300. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  301. <p>FreeType error code. 0&nbsp;means success.</p>
  302. </td></tr></table>
  303. </td></tr></table>
  304. <hr width="75%">
  305. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  306. <td width="100%"></td>
  307. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  308. <table align=center width="75%"><tr><td>
  309. <h4><a name="FT_Outline_Translate">FT_Outline_Translate</a></h4>
  310. <table align=center width="87%"><tr><td>
  311. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  312. </td></tr></table><br>
  313. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  314. FT_EXPORT( <span class="keyword">void</span> )
  315. <b>FT_Outline_Translate</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
  316. <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> xOffset,
  317. <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> yOffset );
  318. </pre></table><br>
  319. <table align=center width="87%"><tr><td>
  320. <p>Apply a simple translation to the points of an outline.</p>
  321. </td></tr></table><br>
  322. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
  323. <p></p>
  324. <table cellpadding=3 border=0>
  325. <tr valign=top><td><b>outline</b></td><td>
  326. <p>A pointer to the target outline descriptor.</p>
  327. </td></tr>
  328. </table>
  329. </td></tr></table>
  330. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  331. <p></p>
  332. <table cellpadding=3 border=0>
  333. <tr valign=top><td><b>xOffset</b></td><td>
  334. <p>The horizontal offset.</p>
  335. </td></tr>
  336. <tr valign=top><td><b>yOffset</b></td><td>
  337. <p>The vertical offset.</p>
  338. </td></tr>
  339. </table>
  340. </td></tr></table>
  341. </td></tr></table>
  342. <hr width="75%">
  343. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  344. <td width="100%"></td>
  345. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  346. <table align=center width="75%"><tr><td>
  347. <h4><a name="FT_Outline_Transform">FT_Outline_Transform</a></h4>
  348. <table align=center width="87%"><tr><td>
  349. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  350. </td></tr></table><br>
  351. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  352. FT_EXPORT( <span class="keyword">void</span> )
  353. <b>FT_Outline_Transform</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
  354. <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>* matrix );
  355. </pre></table><br>
  356. <table align=center width="87%"><tr><td>
  357. <p>Apply a simple 2x2 matrix to all of an outline's points. Useful for applying rotations, slanting, flipping, etc.</p>
  358. </td></tr></table><br>
  359. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
  360. <p></p>
  361. <table cellpadding=3 border=0>
  362. <tr valign=top><td><b>outline</b></td><td>
  363. <p>A pointer to the target outline descriptor.</p>
  364. </td></tr>
  365. </table>
  366. </td></tr></table>
  367. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  368. <p></p>
  369. <table cellpadding=3 border=0>
  370. <tr valign=top><td><b>matrix</b></td><td>
  371. <p>A pointer to the transformation matrix.</p>
  372. </td></tr>
  373. </table>
  374. </td></tr></table>
  375. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  376. <p>You can use <a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a> if you need to translate the outline's points.</p>
  377. </td></tr></table>
  378. </td></tr></table>
  379. <hr width="75%">
  380. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  381. <td width="100%"></td>
  382. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  383. <table align=center width="75%"><tr><td>
  384. <h4><a name="FT_Outline_Embolden">FT_Outline_Embolden</a></h4>
  385. <table align=center width="87%"><tr><td>
  386. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  387. </td></tr></table><br>
  388. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  389. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  390. <b>FT_Outline_Embolden</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
  391. <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> strength );
  392. </pre></table><br>
  393. <table align=center width="87%"><tr><td>
  394. <p>Embolden an outline. The new outline will be at most 4&nbsp;times &lsquo;strength&rsquo; pixels wider and higher. You may think of the left and bottom borders as unchanged.</p>
  395. <p>Negative &lsquo;strength&rsquo; values to reduce the outline thickness are possible also.</p>
  396. </td></tr></table><br>
  397. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
  398. <p></p>
  399. <table cellpadding=3 border=0>
  400. <tr valign=top><td><b>outline</b></td><td>
  401. <p>A handle to the target outline.</p>
  402. </td></tr>
  403. </table>
  404. </td></tr></table>
  405. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  406. <p></p>
  407. <table cellpadding=3 border=0>
  408. <tr valign=top><td><b>strength</b></td><td>
  409. <p>How strong the glyph is emboldened. Expressed in 26.6 pixel format.</p>
  410. </td></tr>
  411. </table>
  412. </td></tr></table>
  413. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  414. <p>FreeType error code. 0&nbsp;means success.</p>
  415. </td></tr></table>
  416. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  417. <p>The used algorithm to increase or decrease the thickness of the glyph doesn't change the number of points; this means that certain situations like acute angles or intersections are sometimes handled incorrectly.</p>
  418. <p>If you need &lsquo;better&rsquo; metrics values you should call <a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a> ot <a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a>.</p>
  419. <p>Example call:</p>
  420. <pre class="colored">
  421. FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );
  422. if ( face-&gt;slot-&gt;format == FT_GLYPH_FORMAT_OUTLINE )
  423. FT_Outline_Embolden( &amp;face-&gt;slot-&gt;outline, strength );
  424. </pre>
  425. </td></tr></table>
  426. </td></tr></table>
  427. <hr width="75%">
  428. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  429. <td width="100%"></td>
  430. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  431. <table align=center width="75%"><tr><td>
  432. <h4><a name="FT_Outline_Reverse">FT_Outline_Reverse</a></h4>
  433. <table align=center width="87%"><tr><td>
  434. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  435. </td></tr></table><br>
  436. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  437. FT_EXPORT( <span class="keyword">void</span> )
  438. <b>FT_Outline_Reverse</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
  439. </pre></table><br>
  440. <table align=center width="87%"><tr><td>
  441. <p>Reverse the drawing direction of an outline. This is used to ensure consistent fill conventions for mirrored glyphs.</p>
  442. </td></tr></table><br>
  443. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
  444. <p></p>
  445. <table cellpadding=3 border=0>
  446. <tr valign=top><td><b>outline</b></td><td>
  447. <p>A pointer to the target outline descriptor.</p>
  448. </td></tr>
  449. </table>
  450. </td></tr></table>
  451. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  452. <p>This function toggles the bit flag <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_REVERSE_FILL</a> in the outline's &lsquo;flags&rsquo; field.</p>
  453. <p>It shouldn't be used by a normal client application, unless it knows what it is doing.</p>
  454. </td></tr></table>
  455. </td></tr></table>
  456. <hr width="75%">
  457. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  458. <td width="100%"></td>
  459. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  460. <table align=center width="75%"><tr><td>
  461. <h4><a name="FT_Outline_Check">FT_Outline_Check</a></h4>
  462. <table align=center width="87%"><tr><td>
  463. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  464. </td></tr></table><br>
  465. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  466. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  467. <b>FT_Outline_Check</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
  468. </pre></table><br>
  469. <table align=center width="87%"><tr><td>
  470. <p>Check the contents of an outline descriptor.</p>
  471. </td></tr></table><br>
  472. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  473. <p></p>
  474. <table cellpadding=3 border=0>
  475. <tr valign=top><td><b>outline</b></td><td>
  476. <p>A handle to a source outline.</p>
  477. </td></tr>
  478. </table>
  479. </td></tr></table>
  480. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  481. <p>FreeType error code. 0&nbsp;means success.</p>
  482. </td></tr></table>
  483. </td></tr></table>
  484. <hr width="75%">
  485. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  486. <td width="100%"></td>
  487. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  488. <table align=center width="75%"><tr><td>
  489. <h4><a name="FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></h4>
  490. <table align=center width="87%"><tr><td>
  491. Defined in FT_BBOX_H (freetype/ftbbox.h).
  492. </td></tr></table><br>
  493. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  494. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  495. <b>FT_Outline_Get_BBox</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
  496. <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *abbox );
  497. </pre></table><br>
  498. <table align=center width="87%"><tr><td>
  499. <p>Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm which returns <i>very</i> quickly when the two boxes coincide. Otherwise, the outline Bézier arcs are traversed to extract their extrema.</p>
  500. </td></tr></table><br>
  501. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  502. <p></p>
  503. <table cellpadding=3 border=0>
  504. <tr valign=top><td><b>outline</b></td><td>
  505. <p>A pointer to the source outline.</p>
  506. </td></tr>
  507. </table>
  508. </td></tr></table>
  509. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
  510. <p></p>
  511. <table cellpadding=3 border=0>
  512. <tr valign=top><td><b>abbox</b></td><td>
  513. <p>The outline's exact bounding box.</p>
  514. </td></tr>
  515. </table>
  516. </td></tr></table>
  517. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  518. <p>FreeType error code. 0&nbsp;means success.</p>
  519. </td></tr></table>
  520. </td></tr></table>
  521. <hr width="75%">
  522. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  523. <td width="100%"></td>
  524. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  525. <table align=center width="75%"><tr><td>
  526. <h4><a name="ft_outline_flags">ft_outline_flags</a></h4>
  527. <table align=center width="87%"><tr><td>
  528. Defined in FT_IMAGE_H (freetype/ftimage.h).
  529. </td></tr></table><br>
  530. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  531. #define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_none</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_NONE</a>
  532. #define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_owner</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_OWNER</a>
  533. #define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_even_odd_fill</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_EVEN_ODD_FILL</a>
  534. #define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_reverse_fill</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_REVERSE_FILL</a>
  535. #define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_ignore_dropouts</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a>
  536. #define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_high_precision</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_HIGH_PRECISION</a>
  537. #define <a href="ft2-outline_processing.html#ft_outline_flags">ft_outline_single_pass</a> <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SINGLE_PASS</a>
  538. </pre></table><br>
  539. <table align=center width="87%"><tr><td>
  540. <p>These constants are deprecated. Please use the corresponding <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_FLAGS</a> values.</p>
  541. </td></tr></table><br>
  542. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
  543. <p></p>
  544. <table cellpadding=3 border=0>
  545. <tr valign=top><td><b>ft_outline_none</b></td><td>
  546. <p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_NONE</a>.</p>
  547. </td></tr>
  548. <tr valign=top><td><b>ft_outline_owner</b></td><td>
  549. <p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_OWNER</a>.</p>
  550. </td></tr>
  551. <tr valign=top><td colspan=0><b>ft_outline_even_odd_fill</b></td></tr>
  552. <tr valign=top><td></td><td>
  553. <p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_EVEN_ODD_FILL</a>.</p>
  554. </td></tr>
  555. <tr valign=top><td colspan=0><b>ft_outline_reverse_fill</b></td></tr>
  556. <tr valign=top><td></td><td>
  557. <p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_REVERSE_FILL</a>.</p>
  558. </td></tr>
  559. <tr valign=top><td colspan=0><b>ft_outline_ignore_dropouts</b></td></tr>
  560. <tr valign=top><td></td><td>
  561. <p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a>.</p>
  562. </td></tr>
  563. <tr valign=top><td colspan=0><b>ft_outline_high_precision</b></td></tr>
  564. <tr valign=top><td></td><td>
  565. <p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_HIGH_PRECISION</a>.</p>
  566. </td></tr>
  567. <tr valign=top><td><b>ft_outline_single_pass</b></td><td>
  568. <p>See <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SINGLE_PASS</a>.</p>
  569. </td></tr>
  570. </table>
  571. </td></tr></table>
  572. </td></tr></table>
  573. <hr width="75%">
  574. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  575. <td width="100%"></td>
  576. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  577. <table align=center width="75%"><tr><td>
  578. <h4><a name="FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></h4>
  579. <table align=center width="87%"><tr><td>
  580. Defined in FT_IMAGE_H (freetype/ftimage.h).
  581. </td></tr></table><br>
  582. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  583. <span class="keyword">typedef</span> <span class="keyword">int</span>
  584. (*<b>FT_Outline_MoveToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
  585. <span class="keyword">void</span>* user );
  586. #define FT_Outline_MoveTo_Func <b>FT_Outline_MoveToFunc</b>
  587. </pre></table><br>
  588. <table align=center width="87%"><tr><td>
  589. <p>A function pointer type used to describe the signature of a &lsquo;move to&rsquo; function during outline walking/decomposition.</p>
  590. <p>A &lsquo;move to&rsquo; is emitted to start a new contour in an outline.</p>
  591. </td></tr></table><br>
  592. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  593. <p></p>
  594. <table cellpadding=3 border=0>
  595. <tr valign=top><td><b>to</b></td><td>
  596. <p>A pointer to the target point of the &lsquo;move to&rsquo;.</p>
  597. </td></tr>
  598. <tr valign=top><td><b>user</b></td><td>
  599. <p>A typeless pointer which is passed from the caller of the decomposition function.</p>
  600. </td></tr>
  601. </table>
  602. </td></tr></table>
  603. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  604. <p>Error code. 0&nbsp;means success.</p>
  605. </td></tr></table>
  606. </td></tr></table>
  607. <hr width="75%">
  608. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  609. <td width="100%"></td>
  610. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  611. <table align=center width="75%"><tr><td>
  612. <h4><a name="FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></h4>
  613. <table align=center width="87%"><tr><td>
  614. Defined in FT_IMAGE_H (freetype/ftimage.h).
  615. </td></tr></table><br>
  616. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  617. <span class="keyword">typedef</span> <span class="keyword">int</span>
  618. (*<b>FT_Outline_LineToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
  619. <span class="keyword">void</span>* user );
  620. #define FT_Outline_LineTo_Func <b>FT_Outline_LineToFunc</b>
  621. </pre></table><br>
  622. <table align=center width="87%"><tr><td>
  623. <p>A function pointer type used to describe the signature of a &lsquo;line to&rsquo; function during outline walking/decomposition.</p>
  624. <p>A &lsquo;line to&rsquo; is emitted to indicate a segment in the outline.</p>
  625. </td></tr></table><br>
  626. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  627. <p></p>
  628. <table cellpadding=3 border=0>
  629. <tr valign=top><td><b>to</b></td><td>
  630. <p>A pointer to the target point of the &lsquo;line to&rsquo;.</p>
  631. </td></tr>
  632. <tr valign=top><td><b>user</b></td><td>
  633. <p>A typeless pointer which is passed from the caller of the decomposition function.</p>
  634. </td></tr>
  635. </table>
  636. </td></tr></table>
  637. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  638. <p>Error code. 0&nbsp;means success.</p>
  639. </td></tr></table>
  640. </td></tr></table>
  641. <hr width="75%">
  642. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  643. <td width="100%"></td>
  644. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  645. <table align=center width="75%"><tr><td>
  646. <h4><a name="FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></h4>
  647. <table align=center width="87%"><tr><td>
  648. Defined in FT_IMAGE_H (freetype/ftimage.h).
  649. </td></tr></table><br>
  650. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  651. <span class="keyword">typedef</span> <span class="keyword">int</span>
  652. (*<b>FT_Outline_ConicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control,
  653. <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
  654. <span class="keyword">void</span>* user );
  655. #define FT_Outline_ConicTo_Func <b>FT_Outline_ConicToFunc</b>
  656. </pre></table><br>
  657. <table align=center width="87%"><tr><td>
  658. <p>A function pointer type used to describe the signature of a &lsquo;conic to&rsquo; function during outline walking or decomposition.</p>
  659. <p>A &lsquo;conic to&rsquo; is emitted to indicate a second-order Bézier arc in the outline.</p>
  660. </td></tr></table><br>
  661. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  662. <p></p>
  663. <table cellpadding=3 border=0>
  664. <tr valign=top><td><b>control</b></td><td>
  665. <p>An intermediate control point between the last position and the new target in &lsquo;to&rsquo;.</p>
  666. </td></tr>
  667. <tr valign=top><td><b>to</b></td><td>
  668. <p>A pointer to the target end point of the conic arc.</p>
  669. </td></tr>
  670. <tr valign=top><td><b>user</b></td><td>
  671. <p>A typeless pointer which is passed from the caller of the decomposition function.</p>
  672. </td></tr>
  673. </table>
  674. </td></tr></table>
  675. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  676. <p>Error code. 0&nbsp;means success.</p>
  677. </td></tr></table>
  678. </td></tr></table>
  679. <hr width="75%">
  680. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  681. <td width="100%"></td>
  682. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  683. <table align=center width="75%"><tr><td>
  684. <h4><a name="FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></h4>
  685. <table align=center width="87%"><tr><td>
  686. Defined in FT_IMAGE_H (freetype/ftimage.h).
  687. </td></tr></table><br>
  688. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  689. <span class="keyword">typedef</span> <span class="keyword">int</span>
  690. (*<b>FT_Outline_CubicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control1,
  691. <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control2,
  692. <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
  693. <span class="keyword">void</span>* user );
  694. #define FT_Outline_CubicTo_Func <b>FT_Outline_CubicToFunc</b>
  695. </pre></table><br>
  696. <table align=center width="87%"><tr><td>
  697. <p>A function pointer type used to describe the signature of a &lsquo;cubic to&rsquo; function during outline walking or decomposition.</p>
  698. <p>A &lsquo;cubic to&rsquo; is emitted to indicate a third-order Bézier arc.</p>
  699. </td></tr></table><br>
  700. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  701. <p></p>
  702. <table cellpadding=3 border=0>
  703. <tr valign=top><td><b>control1</b></td><td>
  704. <p>A pointer to the first Bézier control point.</p>
  705. </td></tr>
  706. <tr valign=top><td><b>control2</b></td><td>
  707. <p>A pointer to the second Bézier control point.</p>
  708. </td></tr>
  709. <tr valign=top><td><b>to</b></td><td>
  710. <p>A pointer to the target end point.</p>
  711. </td></tr>
  712. <tr valign=top><td><b>user</b></td><td>
  713. <p>A typeless pointer which is passed from the caller of the decomposition function.</p>
  714. </td></tr>
  715. </table>
  716. </td></tr></table>
  717. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  718. <p>Error code. 0&nbsp;means success.</p>
  719. </td></tr></table>
  720. </td></tr></table>
  721. <hr width="75%">
  722. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  723. <td width="100%"></td>
  724. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  725. <table align=center width="75%"><tr><td>
  726. <h4><a name="FT_Outline_Funcs">FT_Outline_Funcs</a></h4>
  727. <table align=center width="87%"><tr><td>
  728. Defined in FT_IMAGE_H (freetype/ftimage.h).
  729. </td></tr></table><br>
  730. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  731. <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_Funcs_
  732. {
  733. <a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a> move_to;
  734. <a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a> line_to;
  735. <a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a> conic_to;
  736. <a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a> cubic_to;
  737. <span class="keyword">int</span> shift;
  738. <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> delta;
  739. } <b>FT_Outline_Funcs</b>;
  740. </pre></table><br>
  741. <table align=center width="87%"><tr><td>
  742. <p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Béziers.</p>
  743. </td></tr></table><br>
  744. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
  745. <p></p>
  746. <table cellpadding=3 border=0>
  747. <tr valign=top><td><b>move_to</b></td><td>
  748. <p>The &lsquo;move to&rsquo; emitter.</p>
  749. </td></tr>
  750. <tr valign=top><td><b>line_to</b></td><td>
  751. <p>The segment emitter.</p>
  752. </td></tr>
  753. <tr valign=top><td><b>conic_to</b></td><td>
  754. <p>The second-order Bézier arc emitter.</p>
  755. </td></tr>
  756. <tr valign=top><td><b>cubic_to</b></td><td>
  757. <p>The third-order Bézier arc emitter.</p>
  758. </td></tr>
  759. <tr valign=top><td><b>shift</b></td><td>
  760. <p>The shift that is applied to coordinates before they are sent to the emitter.</p>
  761. </td></tr>
  762. <tr valign=top><td><b>delta</b></td><td>
  763. <p>The delta that is applied to coordinates before they are sent to the emitter, but after the shift.</p>
  764. </td></tr>
  765. </table>
  766. </td></tr></table>
  767. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
  768. <p>The point coordinates sent to the emitters are the transformed version of the original coordinates (this is important for high accuracy during scan-conversion). The transformation is simple:</p>
  769. <pre class="colored">
  770. x' = (x &lt;&lt; shift) - delta
  771. y' = (x &lt;&lt; shift) - delta
  772. </pre>
  773. <p>Set the values of &lsquo;shift&rsquo; and &lsquo;delta&rsquo; to&nbsp;0 to get the original point coordinates.</p>
  774. </td></tr></table>
  775. </td></tr></table>
  776. <hr width="75%">
  777. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  778. <td width="100%"></td>
  779. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  780. <table align=center width="75%"><tr><td>
  781. <h4><a name="FT_Outline_Decompose">FT_Outline_Decompose</a></h4>
  782. <table align=center width="87%"><tr><td>
  783. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  784. </td></tr></table><br>
  785. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  786. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  787. <b>FT_Outline_Decompose</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
  788. <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a>* func_interface,
  789. <span class="keyword">void</span>* user );
  790. </pre></table><br>
  791. <table align=center width="87%"><tr><td>
  792. <p>Walk over an outline's structure to decompose it into individual segments and Bézier arcs. This function also emits &lsquo;move to&rsquo; operations to indicate the start of new contours in the outline.</p>
  793. </td></tr></table><br>
  794. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  795. <p></p>
  796. <table cellpadding=3 border=0>
  797. <tr valign=top><td><b>outline</b></td><td>
  798. <p>A pointer to the source target.</p>
  799. </td></tr>
  800. <tr valign=top><td><b>func_interface</b></td><td>
  801. <p>A table of &lsquo;emitters&rsquo;, i.e., function pointers called during decomposition to indicate path operations.</p>
  802. </td></tr>
  803. </table>
  804. </td></tr></table>
  805. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
  806. <p></p>
  807. <table cellpadding=3 border=0>
  808. <tr valign=top><td><b>user</b></td><td>
  809. <p>A typeless pointer which is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.</p>
  810. </td></tr>
  811. </table>
  812. </td></tr></table>
  813. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
  814. <p>FreeType error code. 0&nbsp;means success.</p>
  815. </td></tr></table>
  816. </td></tr></table>
  817. <hr width="75%">
  818. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  819. <td width="100%"></td>
  820. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  821. <table align=center width="75%"><tr><td>
  822. <h4><a name="FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></h4>
  823. <table align=center width="87%"><tr><td>
  824. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  825. </td></tr></table><br>
  826. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  827. FT_EXPORT( <span class="keyword">void</span> )
  828. <b>FT_Outline_Get_CBox</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
  829. <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *acbox );
  830. </pre></table><br>
  831. <table align=center width="87%"><tr><td>
  832. <p>Return an outline's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bézier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline which contains Bézier outside arcs).</p>
  833. <p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component which is dedicated to this single task.</p>
  834. </td></tr></table><br>
  835. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
  836. <p></p>
  837. <table cellpadding=3 border=0>
  838. <tr valign=top><td><b>outline</b></td><td>
  839. <p>A pointer to the source outline descriptor.</p>
  840. </td></tr>
  841. </table>
  842. </td></tr></table>
  843. <table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
  844. <p></p>
  845. <table cellpadding=3 border=0>
  846. <tr valign=top><td><b>acbox</b></td><td>
  847. <p>The outline's control box.</p>
  848. </td></tr>
  849. </table>
  850. </td></tr></table>
  851. </td></tr></table>
  852. <hr width="75%">
  853. <table align=center width="75%"><tr><td><font size=-2>[<a href="ft2-index.html">Index</a>]</font></td>
  854. <td width="100%"></td>
  855. <td><font size=-2>[<a href="ft2-toc.html">TOC</a>]</font></td></tr></table>
  856. <table align=center width="75%"><tr><td>
  857. <h4><a name="FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></h4>
  858. <table align=center width="87%"><tr><td>
  859. Defined in FT_OUTLINE_H (freetype/ftoutln.h).
  860. </td></tr></table><br>
  861. <table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
  862. FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  863. <b>FT_Outline_Get_Bitmap</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
  864. <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
  865. <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *abitmap );
  866. </pre></table><br>
  867. <table align