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

📄 pango-cairo-rendering.html

📁 GTK+-2.0源码之pango-1.15.6.tar.gz
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</table></div><p>Since  1.10</p></div><hr><div class="refsect2" lang="en"><a name="id2894166"></a><h3><a name="pango-cairo-font-map-set-resolution"></a>pango_cairo_font_map_set_resolution ()</h3><a class="indexterm" name="id2894182"></a><pre class="programlisting">void        pango_cairo_font_map_set_resolution                                            (<a href="pango-Cairo-Rendering.html#PangoCairoFontMap">PangoCairoFontMap</a> *fontmap,                                             double dpi);</pre><p>Sets the resolution for the fontmap. This is a scale factor betweenpoints specified in a <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> and Cairo units. Thedefault value is 96, meaning that a 10 point font will be 13units high. (10 * 96. / 72. = 13.3).</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>fontmap</code></em>&#160;:</span></td><td> a <a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>dpi</code></em>&#160;:</span></td><td> the resolution in "dots per inch". (Physical inches aren't actually  involved; the terminology is conventional.)</td></tr></tbody></table></div><p>Since  1.10</p></div><hr><div class="refsect2" lang="en"><a name="id2894281"></a><h3><a name="pango-cairo-font-map-get-resolution"></a>pango_cairo_font_map_get_resolution ()</h3><a class="indexterm" name="id2894298"></a><pre class="programlisting">double      pango_cairo_font_map_get_resolution                                            (<a href="pango-Cairo-Rendering.html#PangoCairoFontMap">PangoCairoFontMap</a> *fontmap);</pre><p>Gets the resolution for the fontmap. See <a href="pango-Cairo-Rendering.html#pango-cairo-font-map-set-resolution"><code class="function">pango_cairo_font_map_set_resolution()</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>fontmap</code></em>&#160;:</span></td><td> a <a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the resolution in "dots per inch"</td></tr></tbody></table></div><p>Since  1.10</p></div><hr><div class="refsect2" lang="en"><a name="id2894383"></a><h3><a name="pango-cairo-font-map-create-context"></a>pango_cairo_font_map_create_context ()</h3><a class="indexterm" name="id2894399"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* pango_cairo_font_map_create_context                                            (<a href="pango-Cairo-Rendering.html#PangoCairoFontMap">PangoCairoFontMap</a> *fontmap);</pre><p>Create a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> for the given fontmap.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>fontmap</code></em>&#160;:</span></td><td> a <a href="pango-Cairo-Rendering.html#PangoCairoFontMap"><span class="type">PangoCairoFontMap</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the newly created context; 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>Since  1.10</p></div><hr><div class="refsect2" lang="en"><a name="id2894492"></a><h3><a name="pango-cairo-context-set-resolution"></a>pango_cairo_context_set_resolution ()</h3><a class="indexterm" name="id2894509"></a><pre class="programlisting">void        pango_cairo_context_set_resolution                                            (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,                                             double dpi);</pre><p>Sets the resolution for the context. This is a scale factor betweenpoints specified in a <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> and Cairo units. Thedefault value is 96, meaning that a 10 point font will be 13units high. (10 * 96. / 72. = 13.3).</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>&#160;:</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>dpi</code></em>&#160;:</span></td><td> the resolution in "dots per inch". (Physical inches aren't actually  involved; the terminology is conventional.) A 0 or negative value  means to use the resolution from the font map.</td></tr></tbody></table></div><p>Since  1.10</p></div><hr><div class="refsect2" lang="en"><a name="id2894620"></a><h3><a name="pango-cairo-context-get-resolution"></a>pango_cairo_context_get_resolution ()</h3><a class="indexterm" name="id2894636"></a><pre class="programlisting">double      pango_cairo_context_get_resolution                                            (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);</pre><p>Gets the resolution for the context. See <a href="pango-Cairo-Rendering.html#pango-cairo-context-set-resolution"><code class="function">pango_cairo_context_set_resolution()</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>&#160;:</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>&#160;:</span></td><td> the resolution in "dots per inch". A negative value will be returned if no resolution has previously been set.</td></tr></tbody></table></div><p>Since  1.10</p></div><hr><div class="refsect2" lang="en"><a name="id2894734"></a><h3><a name="pango-cairo-context-set-font-options"></a>pango_cairo_context_set_font_options ()</h3><a class="indexterm" name="id2894748"></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>&#160;:</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>&#160;:</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></div><hr><div class="refsect2" lang="en"><a name="id2894874"></a><h3><a name="pango-cairo-context-get-font-options"></a>pango_cairo_context_get_font_options ()</h3><a class="indexterm" name="id2894888"></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>&#160;:</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>&#160;:</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></div><hr><div class="refsect2" lang="en"><a name="id2895010"></a><h3><a name="pango-cairo-update-context"></a>pango_cairo_update_context ()</h3><a class="indexterm" name="id2895025"></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>&#160;:</span></td><td> a Cairo context</td></tr><tr><td><span class="term"><em class="parameter"><code>context</code></em>&#160;:</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>Since  1.10</p></div><hr><div class="refsect2" lang="en"><a name="id2895143"></a><h3><a name="pango-cairo-create-layout"></a>pango_cairo_create_layout ()</h3><a class="indexterm" name="id2895159"></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>&#160;:</span></td><td> a Cairo context</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</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>Since  1.10</p></div><hr><div class="refsect2" lang="en"><a name="id2895300"></a><h3><a name="pango-cairo-update-layout"></a>pango_cairo_update_layout ()</h3><a class="indexterm" name="id2895316"></a><pre class="programlisting">void        pango_cairo_update_layout       (<ahref="../cairo/cairo-cairo-t.html#cairo-t">cairo_t</a> *cr,                                             <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"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>cr</code></em>&#160;:</span></td><td> a Cairo context</td>

⌨️ 快捷键说明

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