📄 pangorenderer.html
字号:
</tr><tr><td><span class="term"><em class="parameter"><code>x11</code></em> :</span></td><td> X coordinate of left end of top of trapezoid</td></tr><tr><td><span class="term"><em class="parameter"><code>x21</code></em> :</span></td><td> X coordinate of right end of top of trapezoid</td></tr><tr><td><span class="term"><em class="parameter"><code>y2</code></em> :</span></td><td> Y coordinate of bottom of trapezoid</td></tr><tr><td><span class="term"><em class="parameter"><code>x12</code></em> :</span></td><td> X coordinate of left end of bottom of trapezoid</td></tr><tr><td><span class="term"><em class="parameter"><code>x22</code></em> :</span></td><td> X coordinate of right end of bottom of trapezoid</td></tr></tbody></table></div><p class="since">Since 1.8</p></div><hr><div class="refsect2" lang="en"><a name="id3247449"></a><h3><a name="pango-renderer-draw-glyph"></a>pango_renderer_draw_glyph ()</h3><a class="indexterm" name="id3247465"></a><pre class="programlisting">void pango_renderer_draw_glyph (<a href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer, <a href="pango-Fonts.html#PangoFont">PangoFont</a> *font, <a href="pango-Glyph-Storage.html#PangoGlyph">PangoGlyph</a> glyph, double x, double y);</pre><p>Draws a single glyph with coordinates in device space.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>renderer</code></em> :</span></td><td> a <a href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>font</code></em> :</span></td><td> a <a href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>glyph</code></em> :</span></td><td> the glyph index of a single glyph</td></tr><tr><td><span class="term"><em class="parameter"><code>x</code></em> :</span></td><td> X coordinate of left edge of baseline of glyph</td></tr><tr><td><span class="term"><em class="parameter"><code>y</code></em> :</span></td><td> Y coordinate of left edge of baseline of glyph</td></tr></tbody></table></div><p class="since">Since 1.8</p></div><hr><div class="refsect2" lang="en"><a name="id3247625"></a><h3><a name="pango-renderer-activate"></a>pango_renderer_activate ()</h3><a class="indexterm" name="id3247641"></a><pre class="programlisting">void pango_renderer_activate (<a href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);</pre><p>Does initial setup before rendering operations on <em class="parameter"><code>renderer</code></em>.<a href="PangoRenderer.html#pango-renderer-deactivate"><code class="function">pango_renderer_deactivate()</code></a> should be called when done drawing.Calls such as <a href="PangoRenderer.html#pango-renderer-draw-layout"><code class="function">pango_renderer_draw_layout()</code></a> automaticallyactivate the layout before drawing on it. Calls to<a href="PangoRenderer.html#pango-renderer-activate"><code class="function">pango_renderer_activate()</code></a> and <a href="PangoRenderer.html#pango-renderer-deactivate"><code class="function">pango_renderer_deactivate()</code></a> canbe nested and the renderer will only be initialized anddeinitialized once.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>renderer</code></em> :</span></td><td> a <a href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a></td></tr></tbody></table></div><p class="since">Since 1.8</p></div><hr><div class="refsect2" lang="en"><a name="id3247760"></a><h3><a name="pango-renderer-deactivate"></a>pango_renderer_deactivate ()</h3><a class="indexterm" name="id3247776"></a><pre class="programlisting">void pango_renderer_deactivate (<a href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);</pre><p>Cleans up after rendering operations on <em class="parameter"><code>renderer</code></em>. Seedocs for <a href="PangoRenderer.html#pango-renderer-activate"><code class="function">pango_renderer_activate()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>renderer</code></em> :</span></td><td> a <a href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a></td></tr></tbody></table></div><p class="since">Since 1.8</p></div><hr><div class="refsect2" lang="en"><a name="id3247858"></a><h3><a name="pango-renderer-part-changed"></a>pango_renderer_part_changed ()</h3><a class="indexterm" name="id3247874"></a><pre class="programlisting">void pango_renderer_part_changed (<a href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer, <a href="PangoRenderer.html#PangoRenderPart">PangoRenderPart</a> part);</pre><p>Informs Pango that the way that the rendering is donefor <em class="parameter"><code>part</code></em> has changed in a way that would prevent multiplepieces being joined together into one drawing call. Forinstance, if a subclass of <a href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a> was to add a stippleoption for drawing underlines, it needs to call</p><p></p><div class="informalexample"><pre class="programlisting">pango_renderer_part_changed (render, PANGO_RENDER_PART_UNDERLINE);</pre></div><p></p><p>When the stipple changes or underlines with different stipplesmight be joined together. Pango automatically calls this forchanges to colors. (See <a href="PangoRenderer.html#pango-renderer-set-color"><code class="function">pango_renderer_set_color()</code></a>)</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>renderer</code></em> :</span></td><td> a <a href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>part</code></em> :</span></td><td> the part for which rendering has changed.</td></tr></tbody></table></div><p class="since">Since 1.8</p></div><hr><div class="refsect2" lang="en"><a name="id3248008"></a><h3><a name="pango-renderer-set-color"></a>pango_renderer_set_color ()</h3><a class="indexterm" name="id3248023"></a><pre class="programlisting">void pango_renderer_set_color (<a href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer, <a href="PangoRenderer.html#PangoRenderPart">PangoRenderPart</a> part, const <a href="pango-Text-Attributes.html#PangoColor">PangoColor</a> *color);</pre><p>Sets the color for part of the rendering.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>renderer</code></em> :</span></td><td> a <a href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>part</code></em> :</span></td><td> the part to change the color of</td></tr><tr><td><span class="term"><em class="parameter"><code>color</code></em> :</span></td><td> the new color or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to unset the current color</td></tr></tbody></table></div><p class="since">Since 1.8</p></div><hr><div class="refsect2" lang="en"><a name="id3248144"></a><h3><a name="pango-renderer-get-color"></a>pango_renderer_get_color ()</h3><a class="indexterm" name="id3248159"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoColor">PangoColor</a>* pango_renderer_get_color (<a href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer, <a href="PangoRenderer.html#PangoRenderPart">PangoRenderPart</a> part);</pre><p>Gets the current rendering color for the specified part.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>renderer</code></em> :</span></td><td> a <a href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>part</code></em> :</span></td><td> the part to get the color for</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the color for the specified part, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it hasn't been set and should be inherited from the environment.</td></tr></tbody></table></div><p class="since">Since 1.8</p></div><hr><div class="refsect2" lang="en"><a name="id3248270"></a><h3><a name="pango-renderer-set-matrix"></a>pango_renderer_set_matrix ()</h3><a class="indexterm" name="id3248286"></a><pre class="programlisting">void pango_renderer_set_matrix (<a href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer, const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix);</pre><p>Sets the transformation matrix that will be applied when rendering.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>renderer</code></em> :</span></td><td> a <a href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>matrix</code></em> :</span></td><td> a <a href="pango-Glyph-Storage.html#PangoMatrix"><span class="type">PangoMatrix</span></a>, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to unset any existing matrix. (No matrix set is the same as setting the identity matrix.)</td></tr></tbody></table></div><p class="since">Since 1.8</p></div><hr><div class="refsect2" lang="en"><a name="id3248393"></a><h3><a name="pango-renderer-get-matrix"></a>pango_renderer_get_matrix ()</h3><a class="indexterm" name="id3248409"></a><pre class="programlisting">const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a>* pango_renderer_get_matrix (<a href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);</pre><p>Gets the transformation matrix that will be applied whenrendering. See <a href="PangoRenderer.html#pango-renderer-set-matrix"><code class="function">pango_renderer_set_matrix()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>renderer</code></em> :</span></td><td> a <a href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the matrix, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no matrix has been set (which is the same as the identity matrix). The returned matrix is owned by Pango and must not be modified or freed.</td></tr></tbody></table></div><p class="since">Since 1.8</p></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -