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

📄 ft2-outline_processing.html

📁 Free type 2.1.0 Documents
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>FreeType-2.1.10 API Reference</title>
<style type="text/css">
  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
         color: #000000;
         background: #FFFFFF; }

  p { text-align: justify; }
  h1 { text-align: center; }
  li { text-align: justify; }

  a:link { color: #0000EF; }
  a:visited { color: #51188E; }
  a:hover { color: #FF0000; }

  span.keyword { font-family: monospace;
                 text-align: left;
                 white-space: pre;
                 color: darkblue; }

  pre.colored { color: blue; }

  ul.empty { list-style-type: none; }
</style>
</head>
<body>
<center><h1>FreeType-2.1.10 API Reference</h1></center>

<center><h1>
Outline Processing
</h1></center>
<h2>Synopsis</h2>
<table align=center cellspacing=5 cellpadding=0 border=0>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<tr><td></td><td><a href="#ft_outline_flags">ft_outline_flags</a></td><td></td><td></td></tr>
</table><br><br>

<table align=center width="87%"><tr><td>
<p>This section contains routines used to create and destroy scalable glyph images known as `outlines'. These can also be measured, transformed, and converted into bitmaps and pixmaps.</p>
</td></tr></table><br>
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline">FT_Outline</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_Outline_
  {
    <span class="keyword">short</span>       n_contours;      /* number of contours in glyph        */
    <span class="keyword">short</span>       n_points;        /* number of points in the glyph      */

    <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>*  points;          /* the outline's points               */
    <span class="keyword">char</span>*       tags;            /* the points flags                   */
    <span class="keyword">short</span>*      contours;        /* the contour end points             */

    <span class="keyword">int</span>         flags;           /* outline masks                      */

  } <b>FT_Outline</b>;

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>This structure is used to describe an outline to the scan-line converter.</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>n_contours</b></td><td>
<p>The number of contours in the outline.</p>
</td></tr>
<tr valign=top><td><b>n_points</b></td><td>
<p>The number of points in the outline.</p>
</td></tr>
<tr valign=top><td><b>points</b></td><td>
<p>A pointer to an array of `n_points' FT_Vector elements, giving the outline's point coordinates.</p>
</td></tr>
<tr valign=top><td><b>tags</b></td><td>
<p>A pointer to an array of `n_points' chars, giving each outline point's type. If bit 0 is unset, the point is `off' the curve, i.e. a Bezier control point, while it is `on' when set.</p>
<p>Bit 1 is meaningful for `off' points only. If set, it indicates a third-order Bezier arc control point; and a second-order control point if unset.</p>
</td></tr>
<tr valign=top><td><b>contours</b></td><td>
<p>An array of `n_contours' shorts, giving the end point of each contour within the outline. For example, the first contour is defined by the points `0' to `contours[0]', the second one is defined by the points `contours[0]+1' to `contours[1]', etc.</p>
</td></tr>
<tr valign=top><td><b>flags</b></td><td>
<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 FT_Outline_Flags.</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_FLAGS">FT_OUTLINE_FLAGS</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_NONE</a>             0x0
#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_OWNER</a>            0x1
#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_EVEN_ODD_FILL</a>    0x2
#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_REVERSE_FILL</a>     0x4
#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_IGNORE_DROPOUTS</a>  0x8

#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_HIGH_PRECISION</a>   0x100
#define <a href="ft2-outline_processing.html#FT_OUTLINE_FLAGS">FT_OUTLINE_SINGLE_PASS</a>      0x200

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>A list of bit-field constants use for the flags in an outline's `flags' field.</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_OUTLINE_NONE</b></td><td>
<p>Value 0 is reserved.</p>
</td></tr>
<tr valign=top><td><b>FT_OUTLINE_OWNER</b></td><td>
<p>If set, this flag indicates that the outline's field arrays (i.e. `points', `flags' &amp; `contours') are `owned' by the outline object, and should thus be freed when it is destroyed.</p>
</td></tr>
<tr valign=top><td><b>FT_OUTLINE_EVEN_ODD_FILL</b></td><td>
<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 raster).</p>
</td></tr>
<tr valign=top><td><b>FT_OUTLINE_REVERSE_FILL</b></td><td>
<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 1 fonts). This flag is ignored by the scan-converter. However, it is very important for the auto-hinter.</p>
</td></tr>
<tr valign=top><td><b>FT_OUTLINE_IGNORE_DROPOUTS</b></td><td>
<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.</p>
</td></tr>
<tr valign=top><td><b>FT_OUTLINE_HIGH_PRECISION</b></td><td>
<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>
</td></tr>
<tr valign=top><td><b>FT_OUTLINE_SINGLE_PASS</b></td><td>
<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>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_New">FT_Outline_New</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_New</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a>   library,
                  <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>      numPoints,
                  <a href="ft2-basic_types.html#FT_Int">FT_Int</a>       numContours,
                  <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>  *anoutline );


  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  FT_Outline_New_Internal( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>    memory,
                           <a href="ft2-basic_types.html#FT_UInt">FT_UInt</a>      numPoints,
                           <a href="ft2-basic_types.html#FT_Int">FT_Int</a>       numContours,
                           <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>  *anoutline );

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Creates a new outline of a given size.</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 the library object from where the outline is allocated. Note however that the new outline will NOT necessarily be FREED, when destroying the library, by FT_Done_FreeType().</p>
</td></tr>
<tr valign=top><td><b>numPoints</b></td><td>
<p>The maximal number of points within the outline.</p>
</td></tr>
<tr valign=top><td><b>numContours</b></td><td>
<p>The maximal number of contours within the outline.</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>anoutline</b></td><td>
<p>A handle to the new outline. NULL in case of error.</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>The reason why this function takes a `library' parameter is simply to use the library's memory allocator.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_Done">FT_Outline_Done</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_Done</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 );


  FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
  FT_Outline_Done_Internal( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a>    memory,
                            <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  outline );

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Destroys an outline created with FT_Outline_New().</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 of the library object used to allocate the outline.</p>
</td></tr>
<tr valign=top><td><b>outline</b></td><td>
<p>A pointer to the outline object to be discarded.</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>If the outline's `owner' field is not set, only the outline descriptor will be released.</p>
<p>The reason why this function takes an `library' parameter is simply to use FT_Free().</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_Copy">FT_Outline_Copy</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_Copy</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>*  source,
                   <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>        *target );

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Copies 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>
</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>source</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>output</b></em></td></tr><tr><td>
<table cellpadding=3>
<tr valign=top><td><b>target</b></td><td>
<p>A handle to the target 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>FreeType 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_Translate">FT_Outline_Translate</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>

  FT_EXPORT( <span class="keyword">void</span> )
  <b>FT_Outline_Translate</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_Pos">FT_Pos</a>             xOffset,
                        <a href="ft2-basic_types.html#FT_Pos">FT_Pos</a>             yOffset );

</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Applies a simple translation to the points of an outline.</p>
</td></tr></table><br>
<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>outline</b></td><td>
<p>A pointer to the target outline descriptor.</p>
</td></tr>
</table>
</td></tr></table>
<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>xOffset</b></td><td>
<p>The horizontal offset.</p>
</td></tr>

⌨️ 快捷键说明

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