📄 ft2-glyph_stroker.html
字号:
<!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>
Glyph Stroker
</h1></center>
<h2>Synopsis</h2>
<table align=center cellspacing=5 cellpadding=0 border=0>
<tr><td></td><td><a href="#FT_Stroker">FT_Stroker</a></td><td></td><td><a href="#FT_Stroker_EndSubPath">FT_Stroker_EndSubPath</a></td></tr>
<tr><td></td><td><a href="#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a></td><td></td><td><a href="#FT_Stroker_LineTo">FT_Stroker_LineTo</a></td></tr>
<tr><td></td><td><a href="#FT_Stroker_LineCap">FT_Stroker_LineCap</a></td><td></td><td><a href="#FT_Stroker_ConicTo">FT_Stroker_ConicTo</a></td></tr>
<tr><td></td><td><a href="#FT_StrokerBorder">FT_StrokerBorder</a></td><td></td><td><a href="#FT_Stroker_CubicTo">FT_Stroker_CubicTo</a></td></tr>
<tr><td></td><td><a href="#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></td><td></td><td><a href="#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a></td></tr>
<tr><td></td><td><a href="#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></td><td></td><td><a href="#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a></td></tr>
<tr><td></td><td><a href="#FT_Stroker_New">FT_Stroker_New</a></td><td></td><td><a href="#FT_Stroker_GetCounts">FT_Stroker_GetCounts</a></td></tr>
<tr><td></td><td><a href="#FT_Stroker_Set">FT_Stroker_Set</a></td><td></td><td><a href="#FT_Stroker_Export">FT_Stroker_Export</a></td></tr>
<tr><td></td><td><a href="#FT_Stroker_Rewind">FT_Stroker_Rewind</a></td><td></td><td><a href="#FT_Stroker_Done">FT_Stroker_Done</a></td></tr>
<tr><td></td><td><a href="#FT_Stroker_ParseOutline">FT_Stroker_ParseOutline</a></td><td></td><td><a href="#FT_Glyph_Stroke">FT_Glyph_Stroke</a></td></tr>
<tr><td></td><td><a href="#FT_Stroker_BeginSubPath">FT_Stroker_BeginSubPath</a></td><td></td><td><a href="#FT_Glyph_StrokeBorder">FT_Glyph_StrokeBorder</a></td></tr>
</table><br><br>
<table align=center width="87%"><tr><td>
<p>This component generates stroked outlines of a given vectorial glyph. It also allows you to retrieve the `outside' and/or the `inside' borders of the stroke.</p>
<p>This can be useful to generate `bordered' glyph, i.e., glyphs displayed with a coloured (and anti-aliased) border around their shape.</p>
</td></tr></table><br>
<table align=center width="75%"><tr><td>
<h4><a name="FT_Stroker">FT_Stroker</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_StrokerRec_* <b>FT_Stroker</b>;
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Opaque handler to a path stroker object.</p>
</td></tr></table><br>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Stroker_LineJoin">FT_Stroker_LineJoin</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-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_ROUND</a> = 0,
<a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_BEVEL</a>,
<a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_STROKER_LINEJOIN_MITER</a>
} <b>FT_Stroker_LineJoin</b>;
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>These values determine how two joining lines are rendered in a stroker.</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_STROKER_LINEJOIN_ROUND</b></td><td>
<p>Used to render rounded line joins. Circular arcs are used to join two lines smoothly.</p>
</td></tr>
<tr valign=top><td><b>FT_STROKER_LINEJOIN_BEVEL</b></td><td>
<p>Used to render beveled line joins; i.e., the two joining lines are extended until they intersect.</p>
</td></tr>
<tr valign=top><td><b>FT_STROKER_LINEJOIN_MITER</b></td><td>
<p>Same as beveled rendering, except that an additional line break is added if the angle between the two joining lines is too closed (this is useful to avoid unpleasant spikes in beveled rendering).</p>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Stroker_LineCap">FT_Stroker_LineCap</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-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_BUTT</a> = 0,
<a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_ROUND</a>,
<a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_STROKER_LINECAP_SQUARE</a>
} <b>FT_Stroker_LineCap</b>;
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>These values determine how the end of opened sub-paths are rendered in a stroke.</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_STROKER_LINECAP_BUTT</b></td><td>
<p>The end of lines is rendered as a full stop on the last point itself.</p>
</td></tr>
<tr valign=top><td><b>FT_STROKER_LINECAP_ROUND</b></td><td>
<p>The end of lines is rendered as a half-circle around the last point.</p>
</td></tr>
<tr valign=top><td><b>FT_STROKER_LINECAP_SQUARE</b></td><td>
<p>The end of lines is rendered as a square around the last point.</p>
</td></tr>
</table>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_StrokerBorder">FT_StrokerBorder</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-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a> = 0,
<a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_RIGHT</a>
} <b>FT_StrokerBorder</b>;
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>These values are used to select a given stroke border in <a href="ft2-glyph_stroker.html#FT_Stroker_GetBorderCounts">FT_Stroker_GetBorderCounts</a> and <a href="ft2-glyph_stroker.html#FT_Stroker_ExportBorder">FT_Stroker_ExportBorder</a>.</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_STROKER_BORDER_LEFT</b></td><td>
<p>Select the left border, relative to the drawing direction.</p>
</td></tr>
<tr valign=top><td><b>FT_STROKER_BORDER_RIGHT</b></td><td>
<p>Select the right border, relative to the drawing direction.</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>Applications are generally interested in the `inside' and `outside' borders. However, there is no direct mapping between these and the `left' / `right' ones, since this really depends on the glyph's drawing orientation, which varies between font formats.</p>
<p>You can however use <a href="ft2-glyph_stroker.html#FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a> and <a href="ft2-glyph_stroker.html#FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a> to get these.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_GetInsideBorder">FT_Outline_GetInsideBorder</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
FT_EXPORT( <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> )
<b>FT_Outline_GetInsideBorder</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Retrieve the <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> value corresponding to the `inside' borders of a given 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>The source outline handle.</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 border index. <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a> for empty or invalid outlines.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Outline_GetOutsideBorder">FT_Outline_GetOutsideBorder</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
FT_EXPORT( <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> )
<b>FT_Outline_GetOutsideBorder</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Retrieve the <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_StrokerBorder</a> value corresponding to the `outside' borders of a given 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>The source outline handle.</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 border index. <a href="ft2-glyph_stroker.html#FT_StrokerBorder">FT_STROKER_BORDER_LEFT</a> for empty or invalid outlines.</p>
</td></tr></table>
</td></tr></table><hr width="75%">
<table align=center width="75%"><tr><td>
<h4><a name="FT_Stroker_New">FT_Stroker_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_Stroker_New</b>( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
<a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> *astroker );
</pre></table><br>
<table align=center width="87%"><tr><td>
<p>Create a new stroker object.</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>memory</b></td><td>
<p>The memory manager handle.</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>
<p>A new stroker object handle. NULL in case of error.</p>
</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_Stroker_Set">FT_Stroker_Set</a></h4>
<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Stroker_Set</b>( <a href="ft2-glyph_stroker.html#FT_Stroker">FT_Stroker</a> stroker,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> radius,
<a href="ft2-glyph_stroker.html#FT_Stroker_LineCap">FT_Stroker_LineCap</a> line_cap,
<a href="ft2-glyph_stroker.html#FT_Stroker_LineJoin">FT_Stroker_LineJoin</a> line_join,
<a href="ft2-basic_types.html#FT_Fixed">FT_Fixed</a> miter_limit );
</pre></table><br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -