?? pango-cairo-rendering.html
字號(hào):
be returned if no resolution has previously been set.</td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3227765"></a><h3><a name="pango-cairo-context-set-font-options"></a>pango_cairo_context_set_font_options ()</h3><a class="indexterm" name="id3227782"></a><pre class="programlisting">void pango_cairo_context_set_font_options (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, const <ahref="../cairo/cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre><p>Sets the font options used when rendering text with this context.These options override any options that <a href="pango-Cairo-Rendering.html#pango-cairo-update-context"><code class="function">pango_cairo_update_context()</code></a>derives from the target surface.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em> :</span></td><td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>, from <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-create-context"><code class="function">pango_cairo_font_map_create_context()</code></a></td></tr><tr><td><span class="term"><em class="parameter"><code>options</code></em> :</span></td><td> a <ahref="../cairo/cairo-Font-Options.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to unset any previously set options. A copy is made.</td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3227915"></a><h3><a name="pango-cairo-context-get-font-options"></a>pango_cairo_context_get_font_options ()</h3><a class="indexterm" name="id3227932"></a><pre class="programlisting">const <ahref="../cairo/cairo-Font-Options.html#cairo-font-options-t">cairo_font_options_t</a>* pango_cairo_context_get_font_options (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);</pre><p>Retrieves any font rendering options previously set with<code class="function">pango_cairo_font_map_set_font_options()</code>. This functions not report optionsthat are derived from the target surface by <a href="pango-Cairo-Rendering.html#pango-cairo-update-context"><code class="function">pango_cairo_update_context()</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>context</code></em> :</span></td><td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>, from <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-create-context"><code class="function">pango_cairo_font_map_create_context()</code></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the font options previously set on the context, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no options have been set. This value is owned by the context and must not be modified or freed.</td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3228060"></a><h3><a name="PangoCairoShapeRendererFunc"></a>PangoCairoShapeRendererFunc ()</h3><a class="indexterm" name="id3228073"></a><pre class="programlisting">void (*PangoCairoShapeRendererFunc) (<ahref="../cairo/cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a href="pango-Text-Attributes.html#PangoAttrShape">PangoAttrShape</a> *attr, <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> do_path, <ahref="../glib/glib-Basic-Types.html#gpointer">gpointer</a> data);</pre><p>Function type for rendering attributes of type <a href="pango-Text-Attributes.html#PANGO-ATTR-SHAPE:CAPS"><code class="literal">PANGO_ATTR_SHAPE</code></a>with Pango's Cairo renderer.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>cr</code></em> :</span></td><td>a Cairo context with current point set to where the shape should be rendered</td></tr><tr><td><span class="term"><em class="parameter"><code>attr</code></em> :</span></td><td>the <a href="pango-Text-Attributes.html#PANGO-ATTR-SHAPE:CAPS"><code class="literal">PANGO_ATTR_SHAPE</code></a> to render</td></tr><tr><td><span class="term"><em class="parameter"><code>do_path</code></em> :</span></td><td>whether only the shape path should be appended to current path of <em class="parameter"><code>cr</code></em> and no filling/stroking done. This will be set to <ahref="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when called from <a href="pango-Cairo-Rendering.html#pango-cairo-layout-path"><code class="function">pango_cairo_layout_path()</code></a> and <a href="pango-Cairo-Rendering.html#pango-cairo-layout-line-path"><code class="function">pango_cairo_layout_line_path()</code></a> rendering functions.</td></tr><tr><td><span class="term"><em class="parameter"><code>data</code></em> :</span></td><td>user data passed to <a href="pango-Cairo-Rendering.html#pango-cairo-context-set-shape-renderer"><code class="function">pango_cairo_context_set_shape_renderer()</code></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3228262"></a><h3><a name="pango-cairo-context-set-shape-renderer"></a>pango_cairo_context_set_shape_renderer ()</h3><a class="indexterm" name="id3228278"></a><pre class="programlisting">void pango_cairo_context_set_shape_renderer (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, <a href="pango-Cairo-Rendering.html#PangoCairoShapeRendererFunc">PangoCairoShapeRendererFunc</a> func, <ahref="../glib/glib-Basic-Types.html#gpointer">gpointer</a> data, <ahref="../glib/glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> dnotify);</pre><p>Sets callback function for context to use for rendering attributesof type <a href="pango-Text-Attributes.html#PANGO-ATTR-SHAPE:CAPS"><code class="literal">PANGO_ATTR_SHAPE</code></a>. See <a href="pango-Cairo-Rendering.html#PangoCairoShapeRendererFunc"><span class="type">PangoCairoShapeRendererFunc</span></a> fordetails.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em> :</span></td><td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>, from <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-create-context"><code class="function">pango_cairo_font_map_create_context()</code></a></td></tr><tr><td><span class="term"><em class="parameter"><code>func</code></em> :</span></td><td> Callback function for rendering attributes of type<a href="pango-Text-Attributes.html#PANGO-ATTR-SHAPE:CAPS"><code class="literal">PANGO_ATTR_SHAPE</code></a>, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to disable shape rendering.</td></tr><tr><td><span class="term"><em class="parameter"><code>data</code></em> :</span></td><td> User data that will be passed to <em class="parameter"><code>func</code></em>.</td></tr><tr><td><span class="term"><em class="parameter"><code>dnotify</code></em> :</span></td><td> Callback that will be called when the context is freed to release <em class="parameter"><code>data</code></em>, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td></tr></tbody></table></div><p class="since">Since 1.18</p></div><hr><div class="refsect2" lang="en"><a name="id3228490"></a><h3><a name="pango-cairo-context-get-shape-renderer"></a>pango_cairo_context_get_shape_renderer ()</h3><a class="indexterm" name="id3228506"></a><pre class="programlisting"><a href="pango-Cairo-Rendering.html#PangoCairoShapeRendererFunc">PangoCairoShapeRendererFunc</a> pango_cairo_context_get_shape_renderer (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context, <ahref="../glib/glib-Basic-Types.html#gpointer">gpointer</a> *data);</pre><p>Sets callback function for context to use for rendering attributesof type <a href="pango-Text-Attributes.html#PANGO-ATTR-SHAPE:CAPS"><code class="literal">PANGO_ATTR_SHAPE</code></a>. See <a href="pango-Cairo-Rendering.html#PangoCairoShapeRendererFunc"><span class="type">PangoCairoShapeRendererFunc</span></a> fordetails.</p><p>Retrieves callback function and associated user data for renderingattributes of type <a href="pango-Text-Attributes.html#PANGO-ATTR-SHAPE:CAPS"><code class="literal">PANGO_ATTR_SHAPE</code></a> as set by<a href="pango-Cairo-Rendering.html#pango-cairo-context-set-shape-renderer"><code class="function">pango_cairo_context_set_shape_renderer()</code></a>, if any.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>context</code></em> :</span></td><td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>, from <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-create-context"><code class="function">pango_cairo_font_map_create_context()</code></a></td></tr><tr><td><span class="term"><em class="parameter"><code>data</code></em> :</span></td><td> Pointer to <ahref="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> to return user data</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the shape rendering callback previously set on the context, or <ahref="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no shape rendering callback have been set.</td></tr></tbody></table></div><p class="since">Since 1.18</p></div><hr><div class="refsect2" lang="en"><a name="id3228686"></a><h3><a name="pango-cairo-update-context"></a>pango_cairo_update_context ()</h3><a class="indexterm" name="id3228702"></a><pre class="programlisting">void pango_cairo_update_context (<ahref="../cairo/cairo-cairo-t.html#cairo-t">cairo_t</a> *cr, <a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);</pre><p>Updates a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> previously created for use with Cairo tomatch the current transformation and target surface of a Cairocontext. If any layouts have been created for the context,it's necessary to call <a href="pango-Layout-Objects.html#pango-layout-context-changed"><code class="function">pango_layout_context_changed()</code></a> on thoselayouts.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>cr</code></em> :</span></td><td> a Cairo context</td></tr><tr><td><span class="term"><em class="parameter"><code>context</code></em> :</span></td><td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>, from <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-create-context"><code class="function">pango_cairo_font_map_create_context()</code></a></td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3228823"></a><h3><a name="pango-cairo-create-layout"></a>pango_cairo_create_layout ()</h3><a class="indexterm" name="id3228839"></a><pre class="programlisting"><a href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a>* pango_cairo_create_layout (<ahref="../cairo/cairo-cairo-t.html#cairo-t">cairo_t</a> *cr);</pre><p>Creates a layout object set up to match the current transformationand target surface of the Cairo context. This layout can then beused for text measurement with functions like<a href="pango-Layout-Objects.html#pango-layout-get-size"><code class="function">pango_layout_get_size()</code></a> or drawing with functions like<a href="pango-Cairo-Rendering.html#pango-cairo-show-layout"><code class="function">pango_cairo_show_layout()</code></a>. If you change the transformationor target surface for <em class="parameter"><code>cr</code></em>, you need to call <a href="pango-Cairo-Rendering.html#pango-cairo-update-layout"><code class="function">pango_cairo_update_layout()</code></a></p><p>This function is the most convenient way to use Cairo with Pango,however it is slightly inefficient since it creates a separate<a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> object for each layout. This might matter in anapplication that was laying out large amounts of text.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>cr</code></em> :</span></td><td> a Cairo context</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the newly created <a href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a>. Free with <ahref="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</td></tr></tbody></table></div><p class="since">Since 1.10</p></div><hr><div class="refsect2" lang="en"><a name="id3228982"></a><h3><a name="pango-cairo-update-layout"></a>pango_cairo_update_layout ()</h3><a class="indexterm" name="id3228999"></a><pre class="programlisting">void pango_cairo_update_layout (<ahref="../cairo/cairo-cairo-t.html#cairo-t" <a href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> *layout);</pre><p>Updates the private <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> of a <a href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> created with<a href="pango-Cairo-Rendering.html#pango-cairo-create-layout"><code class="function">pango_cairo_create_layout()</code></a> to match the current transformationand target surface of a Cairo context.</p><p></p><div class="variablelist"><table border="0">
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -