1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>PangoRenderer</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
7 <link rel="home" href="index.html" title="Pango Reference Manual">
8 <link rel="up" href="lowlevel.html" title="Low Level Functionality">
9 <link rel="prev" href="lowlevel.html" title="Low Level Functionality">
10 <link rel="next" href="PangoFcFontMap.html" title="PangoFcFontMap">
11 <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="pango.html" title="Basic Pango Interfaces">
14 <link rel="chapter" href="rendering.html" title="Rendering with Pango">
15 <link rel="chapter" href="lowlevel.html" title="Low Level Functionality">
16 <link rel="chapter" href="tools.html" title="Pango Tools">
17 <link rel="chapter" href="pango-hierarchy.html" title="Object Hierarchy">
18 <link rel="index" href="index-all.html" title="Index">
19 <link rel="index" href="index-deprecated.html" title="Index of deprecated symbols">
20 <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
21 <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
22 <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
23 <link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
24 <link rel="index" href="index-1.10.html" title="Index of new symbols in 1.10">
25 <link rel="index" href="index-1.12.html" title="Index of new symbols in 1.12">
26 <link rel="index" href="index-1.14.html" title="Index of new symbols in 1.14">
27 <link rel="index" href="index-1.16.html" title="Index of new symbols in 1.16">
28 <link rel="index" href="index-1.18.html" title="Index of new symbols in 1.18">
29 <link rel="index" href="index-1.20.html" title="Index of new symbols in 1.20">
30 <link rel="index" href="index-1.22.html" title="Index of new symbols in 1.22">
31 <link rel="index" href="index-1.24.html" title="Index of new symbols in 1.24">
32 <link rel="index" href="index-1.26.html" title="Index of new symbols in 1.26">
34 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
35 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
37 <td><a accesskey="p" href="lowlevel.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
38 <td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
39 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
40 <th width="100%" align="center">Pango Reference Manual</th>
41 <td><a accesskey="n" href="PangoFcFontMap.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
43 <tr><td colspan="5" class="shortcuts">
44 <a href="#PangoRenderer.synopsis" class="shortcut">Top</a>
46 <a href="#PangoRenderer.description" class="shortcut">Description</a>
48 <a href="#PangoRenderer.object-hierarchy" class="shortcut">Object Hierarchy</a>
51 <div class="refentry" lang="en">
52 <a name="PangoRenderer"></a><div class="titlepage"></div>
53 <div class="refnamediv"><table width="100%"><tr>
55 <h2><span class="refentrytitle"><a name="PangoRenderer.top_of_page"></a>PangoRenderer</span></h2>
56 <p>PangoRenderer — Rendering driver base class</p>
58 <td valign="top" align="right"></td>
60 <div class="refsynopsisdiv">
61 <a name="PangoRenderer.synopsis"></a><h2>Synopsis</h2>
62 <pre class="synopsis">
63 <a class="link" href="PangoRenderer.html#PangoRenderer-struct" title="PangoRenderer">PangoRenderer</a>;
64 enum <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a>;
65 #define <a class="link" href="PangoRenderer.html#PANGO-TYPE-RENDER-PART--CAPS" title="PANGO_TYPE_RENDER_PART">PANGO_TYPE_RENDER_PART</a>
66 <a class="link" href="PangoRenderer.html#PangoRendererClass" title="PangoRendererClass">PangoRendererClass</a>;
67 void <a class="link" href="PangoRenderer.html#pango-renderer-draw-layout" title="pango_renderer_draw_layout ()">pango_renderer_draw_layout</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
68 <a class="link" href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> *layout,
71 void <a class="link" href="PangoRenderer.html#pango-renderer-draw-layout-line" title="pango_renderer_draw_layout_line ()">pango_renderer_draw_layout_line</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
72 <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine">PangoLayoutLine</a> *line,
75 void <a class="link" href="PangoRenderer.html#pango-renderer-draw-glyphs" title="pango_renderer_draw_glyphs ()">pango_renderer_draw_glyphs</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
76 <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
77 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
80 void <a class="link" href="PangoRenderer.html#pango-renderer-draw-glyph-item" title="pango_renderer_draw_glyph_item ()">pango_renderer_draw_glyph_item</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
82 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
85 void <a class="link" href="PangoRenderer.html#pango-renderer-draw-rectangle" title="pango_renderer_draw_rectangle ()">pango_renderer_draw_rectangle</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
86 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a> part,
91 void <a class="link" href="PangoRenderer.html#pango-renderer-draw-error-underline" title="pango_renderer_draw_error_underline ()">pango_renderer_draw_error_underline</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
96 void <a class="link" href="PangoRenderer.html#pango-renderer-draw-trapezoid" title="pango_renderer_draw_trapezoid ()">pango_renderer_draw_trapezoid</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
97 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a> part,
104 void <a class="link" href="PangoRenderer.html#pango-renderer-draw-glyph" title="pango_renderer_draw_glyph ()">pango_renderer_draw_glyph</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
105 <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
106 <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph">PangoGlyph</a> glyph,
109 void <a class="link" href="PangoRenderer.html#pango-renderer-activate" title="pango_renderer_activate ()">pango_renderer_activate</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);
110 void <a class="link" href="PangoRenderer.html#pango-renderer-deactivate" title="pango_renderer_deactivate ()">pango_renderer_deactivate</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);
111 void <a class="link" href="PangoRenderer.html#pango-renderer-part-changed" title="pango_renderer_part_changed ()">pango_renderer_part_changed</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
112 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a> part);
113 void <a class="link" href="PangoRenderer.html#pango-renderer-set-color" title="pango_renderer_set_color ()">pango_renderer_set_color</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
114 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a> part,
115 const <a class="link" href="pango-Text-Attributes.html#PangoColor" title="PangoColor">PangoColor</a> *color);
116 <a class="link" href="pango-Text-Attributes.html#PangoColor" title="PangoColor">PangoColor</a> * <a class="link" href="PangoRenderer.html#pango-renderer-get-color" title="pango_renderer_get_color ()">pango_renderer_get_color</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
117 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a> part);
118 void <a class="link" href="PangoRenderer.html#pango-renderer-set-matrix" title="pango_renderer_set_matrix ()">pango_renderer_set_matrix</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
119 const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix);
120 const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> * <a class="link" href="PangoRenderer.html#pango-renderer-get-matrix" title="pango_renderer_get_matrix ()">pango_renderer_get_matrix</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);
121 <a class="link" href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> * <a class="link" href="PangoRenderer.html#pango-renderer-get-layout" title="pango_renderer_get_layout ()">pango_renderer_get_layout</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);
122 <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine">PangoLayoutLine</a> * <a class="link" href="PangoRenderer.html#pango-renderer-get-layout-line" title="pango_renderer_get_layout_line ()">pango_renderer_get_layout_line</a> (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);
125 <div class="refsect1" lang="en">
126 <a name="PangoRenderer.object-hierarchy"></a><h2>Object Hierarchy</h2>
127 <pre class="synopsis">
129 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
132 +----<a class="link" href="pango-Xft-Fonts-and-Rendering.html#PangoXftRenderer">PangoXftRenderer</a>
135 <div class="refsect1" lang="en">
136 <a name="PangoRenderer.description"></a><h2>Description</h2>
138 <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a> is a base class that contains the necessary logic for
139 rendering a <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> or <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine"><span class="type">PangoLayoutLine</span></a>. By subclassing
140 <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a> and overriding operations such as <em class="parameter"><code>draw_glyphs</code></em> and
141 <em class="parameter"><code>draw_rectangle</code></em>, renderers for particular font backends and
142 destinations can be created.
145 <div class="refsect1" lang="en">
146 <a name="PangoRenderer.details"></a><h2>Details</h2>
147 <div class="refsect2" lang="en">
148 <a name="PangoRenderer-struct"></a><h3>PangoRenderer</h3>
149 <pre class="programlisting">typedef struct {
150 PangoMatrix *matrix; /* May be NULL */
154 <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a> is a base class for objects that are used to
155 render Pango objects such as <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a> and
156 <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a>.</p>
159 <div class="variablelist"><table border="0">
160 <col align="left" valign="top">
162 <td><p><span class="term"><a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *<em class="structfield"><code>matrix</code></em>;</span></p></td>
163 <td> the current transformation matrix for the Renderer; may
165 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
166 ><code class="literal">NULL</code></a>, which should be treated the same as the identity matrix.
170 <p class="since">Since 1.8</p>
173 <div class="refsect2" lang="en">
174 <a name="PangoRenderPart"></a><h3>enum PangoRenderPart</h3>
175 <pre class="programlisting">typedef enum
177 PANGO_RENDER_PART_FOREGROUND,
178 PANGO_RENDER_PART_BACKGROUND,
179 PANGO_RENDER_PART_UNDERLINE,
180 PANGO_RENDER_PART_STRIKETHROUGH
184 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart"><span class="type">PangoRenderPart</span></a> defines different items to render for such
185 purposes as setting colors.</p>
188 <div class="variablelist"><table border="0">
189 <col align="left" valign="top">
192 <td><p><a name="PANGO-RENDER-PART-FOREGROUND--CAPS"></a><span class="term"><code class="literal">PANGO_RENDER_PART_FOREGROUND</code></span></p></td>
197 <td><p><a name="PANGO-RENDER-PART-BACKGROUND--CAPS"></a><span class="term"><code class="literal">PANGO_RENDER_PART_BACKGROUND</code></span></p></td>
198 <td> the area behind the text
202 <td><p><a name="PANGO-RENDER-PART-UNDERLINE--CAPS"></a><span class="term"><code class="literal">PANGO_RENDER_PART_UNDERLINE</code></span></p></td>
207 <td><p><a name="PANGO-RENDER-PART-STRIKETHROUGH--CAPS"></a><span class="term"><code class="literal">PANGO_RENDER_PART_STRIKETHROUGH</code></span></p></td>
208 <td> strikethrough lines
213 <p class="since">Since 1.8</p>
216 <div class="refsect2" lang="en">
217 <a name="PANGO-TYPE-RENDER-PART--CAPS"></a><h3>PANGO_TYPE_RENDER_PART</h3>
218 <pre class="programlisting">#define PANGO_TYPE_RENDER_PART (pango_render_part_get_type())
222 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
223 ><span class="type">GObject</span></a> type for <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart"><span class="type">PangoRenderPart</span></a>.
227 <div class="refsect2" lang="en">
228 <a name="PangoRendererClass"></a><h3>PangoRendererClass</h3>
229 <pre class="programlisting">typedef struct {
230 /* All of the following have default implementations
231 * and take as coordinates user coordinates in Pango units
233 void (*draw_glyphs) (PangoRenderer *renderer,
235 PangoGlyphString *glyphs,
238 void (*draw_rectangle) (PangoRenderer *renderer,
239 PangoRenderPart part,
244 void (*draw_error_underline) (PangoRenderer *renderer,
250 /* Nothing is drawn for shaped glyphs unless this is implemented */
251 void (*draw_shape) (PangoRenderer *renderer,
252 PangoAttrShape *attr,
256 /* These two must be implemented and take coordinates in
257 * device space as doubles.
259 void (*draw_trapezoid) (PangoRenderer *renderer,
260 PangoRenderPart part,
267 void (*draw_glyph) (PangoRenderer *renderer,
273 /* Notification of change in rendering attributes
275 void (*part_changed) (PangoRenderer *renderer,
276 PangoRenderPart part);
278 /* Paired around drawing operations
280 void (*begin) (PangoRenderer *renderer);
281 void (*end) (PangoRenderer *renderer);
283 /* Hooks into the details of layout rendering
285 void (*prepare_run) (PangoRenderer *renderer,
286 PangoLayoutRun *run);
288 /* All of the following have default implementations
289 * and take as coordinates user coordinates in Pango units
291 void (*draw_glyph_item) (PangoRenderer *renderer,
293 PangoGlyphItem *glyph_item,
296 } PangoRendererClass;
299 Class structure for <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>.</p>
302 <div class="variablelist"><table border="0">
303 <col align="left" valign="top">
306 <td><p><span class="term"><em class="structfield"><code>draw_glyphs</code></em> ()</span></p></td>
307 <td> draws a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>
311 <td><p><span class="term"><em class="structfield"><code>draw_rectangle</code></em> ()</span></p></td>
312 <td> draws a rectangle
316 <td><p><span class="term"><em class="structfield"><code>draw_error_underline</code></em> ()</span></p></td>
317 <td> draws a squiggly line that approximately
318 covers the given rectangle in the style of an underline used to
319 indicate a spelling error.
323 <td><p><span class="term"><em class="structfield"><code>draw_shape</code></em> ()</span></p></td>
324 <td> draw content for a glyph shaped with <a class="link" href="pango-Text-Attributes.html#PangoAttrShape" title="PangoAttrShape"><span class="type">PangoAttrShape</span></a>.
325 <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> are the coordinates of the left edge of the baseline,
330 <td><p><span class="term"><em class="structfield"><code>draw_trapezoid</code></em> ()</span></p></td>
331 <td> draws a trapezoidal filled area
335 <td><p><span class="term"><em class="structfield"><code>draw_glyph</code></em> ()</span></p></td>
336 <td> draws a single glyph
340 <td><p><span class="term"><em class="structfield"><code>part_changed</code></em> ()</span></p></td>
341 <td> do renderer specific processing when rendering
346 <td><p><span class="term"><em class="structfield"><code>begin</code></em> ()</span></p></td>
347 <td> Do renderer-specific initialization before drawing
351 <td><p><span class="term"><em class="structfield"><code>end</code></em> ()</span></p></td>
352 <td> Do renderer-specific cleanup after drawing
356 <td><p><span class="term"><em class="structfield"><code>prepare_run</code></em> ()</span></p></td>
357 <td> updates the renderer for a new run
361 <td><p><span class="term"><em class="structfield"><code>draw_glyph_item</code></em> ()</span></p></td>
362 <td> draws a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>
367 <p class="since">Since 1.8</p>
370 <div class="refsect2" lang="en">
371 <a name="pango-renderer-draw-layout"></a><h3>pango_renderer_draw_layout ()</h3>
372 <pre class="programlisting">void pango_renderer_draw_layout (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
373 <a class="link" href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> *layout,
377 Draws <em class="parameter"><code>layout</code></em> with the specified <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>.</p>
380 <div class="variablelist"><table border="0">
381 <col align="left" valign="top">
384 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
385 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
389 <td><p><span class="term"><em class="parameter"><code>layout</code></em> :</span></p></td>
390 <td> a <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a>
394 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
395 <td> X position of left edge of baseline, in user space coordinates
400 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
401 <td> Y position of left edge of baseline, in user space coordinates
407 <p class="since">Since 1.8</p>
410 <div class="refsect2" lang="en">
411 <a name="pango-renderer-draw-layout-line"></a><h3>pango_renderer_draw_layout_line ()</h3>
412 <pre class="programlisting">void pango_renderer_draw_layout_line (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
413 <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine">PangoLayoutLine</a> *line,
417 Draws <em class="parameter"><code>line</code></em> with the specified <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>.</p>
420 <div class="variablelist"><table border="0">
421 <col align="left" valign="top">
424 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
425 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
429 <td><p><span class="term"><em class="parameter"><code>line</code></em> :</span></p></td>
430 <td> a <a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine"><span class="type">PangoLayoutLine</span></a>
434 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
435 <td> X position of left edge of baseline, in user space coordinates
440 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
441 <td> Y position of left edge of baseline, in user space coordinates
447 <p class="since">Since 1.8</p>
450 <div class="refsect2" lang="en">
451 <a name="pango-renderer-draw-glyphs"></a><h3>pango_renderer_draw_glyphs ()</h3>
452 <pre class="programlisting">void pango_renderer_draw_glyphs (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
453 <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
454 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString">PangoGlyphString</a> *glyphs,
458 Draws the glyphs in <em class="parameter"><code>glyphs</code></em> with the specified <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>.</p>
461 <div class="variablelist"><table border="0">
462 <col align="left" valign="top">
465 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
466 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
470 <td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
471 <td> a <a class="link" href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a>
475 <td><p><span class="term"><em class="parameter"><code>glyphs</code></em> :</span></p></td>
476 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphString" title="PangoGlyphString"><span class="type">PangoGlyphString</span></a>
480 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
481 <td> X position of left edge of baseline, in user space coordinates
486 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
487 <td> Y position of left edge of baseline, in user space coordinates
493 <p class="since">Since 1.8</p>
496 <div class="refsect2" lang="en">
497 <a name="pango-renderer-draw-glyph-item"></a><h3>pango_renderer_draw_glyph_item ()</h3>
498 <pre class="programlisting">void pango_renderer_draw_glyph_item (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
500 <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem">PangoGlyphItem</a> *glyph_item,
504 Draws the glyphs in <em class="parameter"><code>glyph_item</code></em> with the specified <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>,
505 embedding the text associated with the glyphs in the output if the
506 output format supports it (PDF for example).
509 Note that <em class="parameter"><code>text</code></em> is the start of the text for layout, which is then
510 indexed by <code class="literal"><em class="parameter"><code>glyph_item->item->offset</code></em></code>.
513 If <em class="parameter"><code>text</code></em> is <a
514 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
515 ><code class="literal">NULL</code></a>, this simply calls <a class="link" href="PangoRenderer.html#pango-renderer-draw-glyphs" title="pango_renderer_draw_glyphs ()"><code class="function">pango_renderer_draw_glyphs()</code></a>.
518 The default implementation of this method simply falls back to
519 <a class="link" href="PangoRenderer.html#pango-renderer-draw-glyphs" title="pango_renderer_draw_glyphs ()"><code class="function">pango_renderer_draw_glyphs()</code></a>.</p>
522 <div class="variablelist"><table border="0">
523 <col align="left" valign="top">
526 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
527 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
531 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
532 <td> the UTF-8 text that <em class="parameter"><code>glyph_item</code></em> refers to, or <a
533 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
534 ><code class="literal">NULL</code></a>
538 <td><p><span class="term"><em class="parameter"><code>glyph_item</code></em> :</span></p></td>
539 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoGlyphItem" title="PangoGlyphItem"><span class="type">PangoGlyphItem</span></a>
543 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
544 <td> X position of left edge of baseline, in user space coordinates
549 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
550 <td> Y position of left edge of baseline, in user space coordinates
556 <p class="since">Since 1.22</p>
559 <div class="refsect2" lang="en">
560 <a name="pango-renderer-draw-rectangle"></a><h3>pango_renderer_draw_rectangle ()</h3>
561 <pre class="programlisting">void pango_renderer_draw_rectangle (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
562 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a> part,
568 Draws an axis-aligned rectangle in user space coordinates with the
569 specified <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>.
572 This should be called while <em class="parameter"><code>renderer</code></em> is already active. Use
573 <a class="link" href="PangoRenderer.html#pango-renderer-activate" title="pango_renderer_activate ()"><code class="function">pango_renderer_activate()</code></a> to activate a renderer.</p>
576 <div class="variablelist"><table border="0">
577 <col align="left" valign="top">
580 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
581 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
585 <td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
586 <td> type of object this rectangle is part of
590 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
591 <td> X position at which to draw rectangle, in user space coordinates in Pango units
595 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
596 <td> Y position at which to draw rectangle, in user space coordinates in Pango units
600 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
601 <td> width of rectangle in Pango units in user space coordinates
605 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
606 <td> height of rectangle in Pango units in user space coordinates
611 <p class="since">Since 1.8</p>
614 <div class="refsect2" lang="en">
615 <a name="pango-renderer-draw-error-underline"></a><h3>pango_renderer_draw_error_underline ()</h3>
616 <pre class="programlisting">void pango_renderer_draw_error_underline (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
622 Draw a squiggly line that approximately covers the given rectangle
623 in the style of an underline used to indicate a spelling error.
624 (The width of the underline is rounded to an integer number
625 of up/down segments and the resulting rectangle is centered
626 in the original rectangle)
629 This should be called while <em class="parameter"><code>renderer</code></em> is already active. Use
630 <a class="link" href="PangoRenderer.html#pango-renderer-activate" title="pango_renderer_activate ()"><code class="function">pango_renderer_activate()</code></a> to activate a renderer.</p>
633 <div class="variablelist"><table border="0">
634 <col align="left" valign="top">
637 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
638 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
642 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
643 <td> X coordinate of underline, in Pango units in user coordinate system
647 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
648 <td> Y coordinate of underline, in Pango units in user coordinate system
652 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
653 <td> width of underline, in Pango units in user coordinate system
657 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
658 <td> height of underline, in Pango units in user coordinate system
663 <p class="since">Since 1.8</p>
666 <div class="refsect2" lang="en">
667 <a name="pango-renderer-draw-trapezoid"></a><h3>pango_renderer_draw_trapezoid ()</h3>
668 <pre class="programlisting">void pango_renderer_draw_trapezoid (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
669 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a> part,
677 Draws a trapezoid with the parallel sides aligned with the X axis
678 using the given <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>; coordinates are in device space.</p>
681 <div class="variablelist"><table border="0">
682 <col align="left" valign="top">
685 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
686 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
690 <td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
691 <td> type of object this trapezoid is part of
695 <td><p><span class="term"><em class="parameter"><code>y1_</code></em> :</span></p></td>
696 <td> Y coordinate of top of trapezoid
700 <td><p><span class="term"><em class="parameter"><code>x11</code></em> :</span></p></td>
701 <td> X coordinate of left end of top of trapezoid
705 <td><p><span class="term"><em class="parameter"><code>x21</code></em> :</span></p></td>
706 <td> X coordinate of right end of top of trapezoid
710 <td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
711 <td> Y coordinate of bottom of trapezoid
715 <td><p><span class="term"><em class="parameter"><code>x12</code></em> :</span></p></td>
716 <td> X coordinate of left end of bottom of trapezoid
720 <td><p><span class="term"><em class="parameter"><code>x22</code></em> :</span></p></td>
721 <td> X coordinate of right end of bottom of trapezoid
726 <p class="since">Since 1.8</p>
729 <div class="refsect2" lang="en">
730 <a name="pango-renderer-draw-glyph"></a><h3>pango_renderer_draw_glyph ()</h3>
731 <pre class="programlisting">void pango_renderer_draw_glyph (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
732 <a class="link" href="pango-Fonts.html#PangoFont">PangoFont</a> *font,
733 <a class="link" href="pango-Glyph-Storage.html#PangoGlyph" title="PangoGlyph">PangoGlyph</a> glyph,
737 Draws a single glyph with coordinates in device space.</p>
740 <div class="variablelist"><table border="0">
741 <col align="left" valign="top">
744 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
745 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
749 <td><p><span class="term"><em class="parameter"><code>font</code></em> :</span></p></td>
750 <td> a <a class="link" href="pango-Fonts.html#PangoFont"><span class="type">PangoFont</span></a>
754 <td><p><span class="term"><em class="parameter"><code>glyph</code></em> :</span></p></td>
755 <td> the glyph index of a single glyph
759 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
760 <td> X coordinate of left edge of baseline of glyph
764 <td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
765 <td> Y coordinate of left edge of baseline of glyph
770 <p class="since">Since 1.8</p>
773 <div class="refsect2" lang="en">
774 <a name="pango-renderer-activate"></a><h3>pango_renderer_activate ()</h3>
775 <pre class="programlisting">void pango_renderer_activate (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);</pre>
777 Does initial setup before rendering operations on <em class="parameter"><code>renderer</code></em>.
778 <a class="link" href="PangoRenderer.html#pango-renderer-deactivate" title="pango_renderer_deactivate ()"><code class="function">pango_renderer_deactivate()</code></a> should be called when done drawing.
779 Calls such as <a class="link" href="PangoRenderer.html#pango-renderer-draw-layout" title="pango_renderer_draw_layout ()"><code class="function">pango_renderer_draw_layout()</code></a> automatically
780 activate the layout before drawing on it. Calls to
781 <a class="link" href="PangoRenderer.html#pango-renderer-activate" title="pango_renderer_activate ()"><code class="function">pango_renderer_activate()</code></a> and <a class="link" href="PangoRenderer.html#pango-renderer-deactivate" title="pango_renderer_deactivate ()"><code class="function">pango_renderer_deactivate()</code></a> can
782 be nested and the renderer will only be initialized and
783 deinitialized once.</p>
786 <div class="variablelist"><table border="0">
787 <col align="left" valign="top">
789 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
790 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
794 <p class="since">Since 1.8</p>
797 <div class="refsect2" lang="en">
798 <a name="pango-renderer-deactivate"></a><h3>pango_renderer_deactivate ()</h3>
799 <pre class="programlisting">void pango_renderer_deactivate (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);</pre>
801 Cleans up after rendering operations on <em class="parameter"><code>renderer</code></em>. See
802 docs for <a class="link" href="PangoRenderer.html#pango-renderer-activate" title="pango_renderer_activate ()"><code class="function">pango_renderer_activate()</code></a>.</p>
805 <div class="variablelist"><table border="0">
806 <col align="left" valign="top">
808 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
809 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
813 <p class="since">Since 1.8</p>
816 <div class="refsect2" lang="en">
817 <a name="pango-renderer-part-changed"></a><h3>pango_renderer_part_changed ()</h3>
818 <pre class="programlisting">void pango_renderer_part_changed (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
819 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a> part);</pre>
821 Informs Pango that the way that the rendering is done
822 for <em class="parameter"><code>part</code></em> has changed in a way that would prevent multiple
823 pieces being joined together into one drawing call. For
824 instance, if a subclass of <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a> was to add a stipple
825 option for drawing underlines, it needs to call
829 <div class="informalexample"><pre class="programlisting">
830 pango_renderer_part_changed (render, PANGO_RENDER_PART_UNDERLINE);
835 When the stipple changes or underlines with different stipples
836 might be joined together. Pango automatically calls this for
837 changes to colors. (See <a class="link" href="PangoRenderer.html#pango-renderer-set-color" title="pango_renderer_set_color ()"><code class="function">pango_renderer_set_color()</code></a>)</p>
840 <div class="variablelist"><table border="0">
841 <col align="left" valign="top">
844 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
845 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
849 <td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
850 <td> the part for which rendering has changed.
855 <p class="since">Since 1.8</p>
858 <div class="refsect2" lang="en">
859 <a name="pango-renderer-set-color"></a><h3>pango_renderer_set_color ()</h3>
860 <pre class="programlisting">void pango_renderer_set_color (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
861 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a> part,
862 const <a class="link" href="pango-Text-Attributes.html#PangoColor" title="PangoColor">PangoColor</a> *color);</pre>
864 Sets the color for part of the rendering.</p>
867 <div class="variablelist"><table border="0">
868 <col align="left" valign="top">
871 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
872 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
876 <td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
877 <td> the part to change the color of
881 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
882 <td> the new color or <a
883 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
884 ><code class="literal">NULL</code></a> to unset the current color
889 <p class="since">Since 1.8</p>
892 <div class="refsect2" lang="en">
893 <a name="pango-renderer-get-color"></a><h3>pango_renderer_get_color ()</h3>
894 <pre class="programlisting"><a class="link" href="pango-Text-Attributes.html#PangoColor" title="PangoColor">PangoColor</a> * pango_renderer_get_color (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
895 <a class="link" href="PangoRenderer.html#PangoRenderPart" title="enum PangoRenderPart">PangoRenderPart</a> part);</pre>
897 Gets the current rendering color for the specified part.</p>
900 <div class="variablelist"><table border="0">
901 <col align="left" valign="top">
904 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
905 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
909 <td><p><span class="term"><em class="parameter"><code>part</code></em> :</span></p></td>
910 <td> the part to get the color for
914 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
915 <td> the color for the specified part, or <a
916 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
917 ><code class="literal">NULL</code></a>
918 if it hasn't been set and should be inherited from the
925 <p class="since">Since 1.8</p>
928 <div class="refsect2" lang="en">
929 <a name="pango-renderer-set-matrix"></a><h3>pango_renderer_set_matrix ()</h3>
930 <pre class="programlisting">void pango_renderer_set_matrix (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer,
931 const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> *matrix);</pre>
933 Sets the transformation matrix that will be applied when rendering.</p>
936 <div class="variablelist"><table border="0">
937 <col align="left" valign="top">
940 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
941 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
945 <td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
946 <td> a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix"><span class="type">PangoMatrix</span></a>, or <a
947 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
948 ><code class="literal">NULL</code></a> to unset any existing matrix.
949 (No matrix set is the same as setting the identity matrix.)
954 <p class="since">Since 1.8</p>
957 <div class="refsect2" lang="en">
958 <a name="pango-renderer-get-matrix"></a><h3>pango_renderer_get_matrix ()</h3>
959 <pre class="programlisting">const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> * pango_renderer_get_matrix (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);</pre>
961 Gets the transformation matrix that will be applied when
962 rendering. See <a class="link" href="PangoRenderer.html#pango-renderer-set-matrix" title="pango_renderer_set_matrix ()"><code class="function">pango_renderer_set_matrix()</code></a>.</p>
965 <div class="variablelist"><table border="0">
966 <col align="left" valign="top">
969 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
970 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
974 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
975 <td> the matrix, or <a
976 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
977 ><code class="literal">NULL</code></a> if no matrix has been set
978 (which is the same as the identity matrix). The returned
979 matrix is owned by Pango and must not be modified or
986 <p class="since">Since 1.8</p>
989 <div class="refsect2" lang="en">
990 <a name="pango-renderer-get-layout"></a><h3>pango_renderer_get_layout ()</h3>
991 <pre class="programlisting"><a class="link" href="pango-Layout-Objects.html#PangoLayout">PangoLayout</a> * pango_renderer_get_layout (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);</pre>
993 Gets the layout currently being rendered using <em class="parameter"><code>renderer</code></em>.
994 Calling this function only makes sense from inside a subclass's
995 methods, like in its draw_shape() for example.
998 The returned layout should not be modified while still being
1002 <div class="variablelist"><table border="0">
1003 <col align="left" valign="top">
1006 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
1007 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
1011 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1012 <td> the layout, or <a
1013 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1014 ><code class="literal">NULL</code></a> if no layout is being
1015 rendered using <em class="parameter"><code>renderer</code></em> at this time.
1021 <p class="since">Since 1.20</p>
1024 <div class="refsect2" lang="en">
1025 <a name="pango-renderer-get-layout-line"></a><h3>pango_renderer_get_layout_line ()</h3>
1026 <pre class="programlisting"><a class="link" href="pango-Layout-Objects.html#PangoLayoutLine" title="PangoLayoutLine">PangoLayoutLine</a> * pango_renderer_get_layout_line (<a class="link" href="PangoRenderer.html" title="PangoRenderer">PangoRenderer</a> *renderer);</pre>
1028 Gets the layout line currently being rendered using <em class="parameter"><code>renderer</code></em>.
1029 Calling this function only makes sense from inside a subclass's
1030 methods, like in its draw_shape() for example.
1033 The returned layout line should not be modified while still being
1037 <div class="variablelist"><table border="0">
1038 <col align="left" valign="top">
1041 <td><p><span class="term"><em class="parameter"><code>renderer</code></em> :</span></p></td>
1042 <td> a <a class="link" href="PangoRenderer.html" title="PangoRenderer"><span class="type">PangoRenderer</span></a>
1046 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1047 <td> the layout line, or <a
1048 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
1049 ><code class="literal">NULL</code></a> if no layout line is being
1050 rendered using <em class="parameter"><code>renderer</code></em> at this time.
1056 <p class="since">Since 1.20</p>
1060 <div class="footer">
1062 Generated by GTK-Doc V1.11</div>