⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ft2-outline_processing.html

📁 Free type 2.1.0 Documents
💻 HTML
📖 第 1 页 / 共 3 页
字号:
                             <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  control2,
                             <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  to,
                             <span class="keyword">void</span>*       user );

#define  FT_Outline_CubicTo_Func  <b>FT_Outline_CubicToFunc</b>

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>A function pointer type used to describe the signature of a `cubic to' function during outline walking/decomposition.</p>
<p>A `cubic to' is emitted to indicate a third-order Bezier arc.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>control1</b></td><td>
<p>A pointer to the first Bezier control point.</p>
</td></tr>
<tr valign=top><td><b>control2</b></td><td>
<p>A pointer to the second Bezier control point.</p>
</td></tr>
<tr valign=top><td><b>to</b></td><td>
<p>A pointer to the target end point.</p>
</td></tr>
<tr valign=top><td><b>user</b></td><td>
<p>A typeless pointer which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
<p>Error code. 0 means success.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_Funcs">FT_Outline_Funcs</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Outline_Funcs_
  {
    <a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a>   move_to;
    <a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a>   line_to;
    <a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a>  conic_to;
    <a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a>  cubic_to;

    <span class="keyword">int</span>                     shift;
    <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>                  delta;

  } <b>FT_Outline_Funcs</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Beziers, as well as `move to' and `close to' operations.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>fields</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>move_to</b></td><td>
<p>The `move to' emitter.</p>
</td></tr>
<tr valign=top><td><b>line_to</b></td><td>
<p>The segment emitter.</p>
</td></tr>
<tr valign=top><td><b>conic_to</b></td><td>
<p>The second-order Bezier arc emitter.</p>
</td></tr>
<tr valign=top><td><b>cubic_to</b></td><td>
<p>The third-order Bezier arc emitter.</p>
</td></tr>
<tr valign=top><td><b>shift</b></td><td>
<p>The shift that is applied to coordinates before they are sent to the emitter.</p>
</td></tr>
<tr valign=top><td><b>delta</b></td><td>
<p>The delta that is applied to coordinates before they are sent to the emitter, but after the shift.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
<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>
<p>x' = (x &lt;&lt; shift) - delta y' = (x &lt;&lt; shift) - delta</p>
<p>Set the value of `shift' and `delta' to 0 to get the original point coordinates.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_Decompose">FT_Outline_Decompose</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Decompose</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*              outline,
                        <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a>*  func_interface,
                        <span class="keyword">void</span>*                    user );

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Walks over an outline's structure to decompose it into individual segments and Bezier arcs. This function is also able to emit `move to' and `close to' operations to indicate the start and end of new contours in the outline.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>outline</b></td><td>
<p>A pointer to the source target.</p>
</td></tr>
<tr valign=top><td><b>func_interface</b></td><td>
<p>A table of `emitters', i.e,. function pointers called during decomposition to indicate path operations.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>user</b></td><td>
<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>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
<p>FreeType error code. 0 means sucess.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Outline_Get_CBox</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline,
                       <a href="ft2-basic_types.html#FT_BBox">FT_BBox</a>           *acbox );

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Returns an outline's `control box'. The control box encloses all the outline's points, including Bezier 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 Bezier outside arcs).</p>
<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 `ftbbox' component which is dedicated to this single task.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>outline</b></td><td>
<p>A pointer to the source outline descriptor.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>acbox</b></td><td>
<p>The outline's control box.</p>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Get_Bitmap</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>        library,
                         <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*       outline,
                         <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a>  *abitmap );

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Renders an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>library</b></td><td>
<p>A handle to a FreeType library object.</p>
</td></tr>
<tr valign=top><td><b>outline</b></td><td>
<p>A pointer to the source outline descriptor.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>output</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>abitmap</b></td><td>
<p>A pointer to the target bitmap descriptor.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
<p>FreeType error code. 0 means success.</p>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
<p>This function does NOT CREATE the bitmap, it only renders an outline image within the one you pass to it!</p>
<p>It will use the raster correponding to the default glyph format.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_Render">FT_Outline_Render</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  <b>FT_Outline_Render</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>         library,
                     <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*        outline,
                     <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a>*  params );

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Renders an outline within a bitmap using the current scan-convert. This functions uses an FT_Raster_Params structure as an argument, allowing advanced features like direct composition, translucency, etc.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>library</b></td><td>
<p>A handle to a FreeType library object.</p>
</td></tr>
<tr valign=top><td><b>outline</b></td><td>
<p>A pointer to the source outline descriptor.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>inout</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>params</b></td><td>
<p>A pointer to a FT_Raster_Params structure used to describe the rendering operation.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
<p>FreeType error code. 0 means success.</p>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>note</b></em></td></tr><tr><td>
<p>You should know what you are doing and how FT_Raster_Params works to use this function.</p>
<p>The field `params.source' will be set to `outline' before the scan converter is called, which means that the value you give to it is actually ignored.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Orientation">FT_Orientation</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">enum</span>
  {
    <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a>   = 0,
    <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a> = 1,
    <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_RIGHT</a> = <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a>,
    <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_FILL_LEFT</a>  = <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a>
  
  } <b>FT_Orientation</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>A list of values used to describe an outline's contour orientation.</p>
<p>The TrueType and Postscript specifications use different conventions to determine whether outline contours should be filled or unfilled.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>values</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>FT_ORIENTATION_TRUETYPE</b></td><td>
<p>According to the TrueType specification, clockwise contours must be filled, and counter-clockwise ones must be unfilled.</p>
</td></tr>
<tr valign=top><td><b>FT_ORIENTATION_POSTSCRIPT</b></td><td>
<p>According to the Postscript specification, counter-clockwise contours must be filled, and clockwise ones must be unfilled.</p>
</td></tr>
<tr valign=top><td><b>FT_ORIENTATION_FILL_RIGHT</b></td><td>
<p>This is identical to <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a>, but is used to remember that in TrueType, everything that is to the right of the drawing direction of a contour must be filled.</p>
</td></tr>
<tr valign=top><td><b>FT_ORIENTATION_FILL_LEFT</b></td><td>
<p>This is identical to <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a>, but is used to remember that in Postscript, everything that is to the left of the drawing direction of a contour must be filled.</p>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  FT_EXPORT( <a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a> )
  <b>FT_Outline_Get_Orientation</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline );

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>This function analyzes a glyph outline and tries to compute its fill orientation (see <a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a>). This is done by computing the direction of each global horizontal and/or vertical extrema within the outline.</p>
<p>Note that this will return <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a> for empty outlines.</p>
</td></tr></table><br>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>input</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>outline</b></td><td>
<p>A handle to the source outline.</p>
</td></tr>
</table>
</td></tr></table>
<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>return</b></em></td></tr><tr><td>
<p>The orientation.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -