4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>Pango Reference Manual: Layout Objects</title>
5
<title>Layout Objects</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
<link rel="home" href="index.html" title="Pango Reference Manual">
8
8
<link rel="up" href="pango.html" title="Basic Pango Interfaces">
9
9
<link rel="prev" href="PangoMarkupFormat.html" title="Text Attribute Markup">
10
10
<link rel="next" href="pango-Scripts-and-Languages.html" title="Scripts and Languages">
11
<meta name="generator" content="GTK-Doc V1.19.1 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
16
<td width="100%" align="left">
17
<a href="#" class="shortcut">Top</a>
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="PangoMarkupFormat.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="pango.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">Pango Reference Manual</th>
21
<td><a accesskey="n" href="pango-Scripts-and-Languages.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#pango-Layout-Objects.synopsis" class="shortcut">Top</a>
19
26
<a href="#pango-Layout-Objects.description" class="shortcut">Description</a>
21
28
<a href="#pango-Layout-Objects.object-hierarchy" class="shortcut">Object Hierarchy</a>
23
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
24
<td><a accesskey="u" href="pango.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
25
<td><a accesskey="p" href="PangoMarkupFormat.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
26
<td><a accesskey="n" href="pango-Scripts-and-Languages.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
28
31
<div class="refentry">
29
32
<a name="pango-Layout-Objects"></a><div class="titlepage"></div>
30
33
<div class="refnamediv"><table width="100%"><tr>
276
279
It is possible, as well, to ignore the 2-D setup, and simply
277
280
treat the results of a <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> as a list of lines.
279
284
<div class="figure">
280
285
<a name="parameters"></a><p class="title"><b>Figure 1. Adjustable parameters for a PangoLayout</b></p>
281
286
<div class="figure-contents"><div><img src="layout.gif" alt="Adjustable parameters for a PangoLayout"></div></div>
283
<br class="figure-break"><p>
288
<p><br class="figure-break">
284
291
The <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> structure is opaque, and has no user-visible
997
1004
<td><p><a name="PANGO-WRAP-WORD-CHAR:CAPS"></a><span class="term"><code class="literal">PANGO_WRAP_WORD_CHAR</code></span></p></td>
998
<td>wrap lines at word boundaries, but fall back to character boundaries if there is not
1005
<td>wrap lines at word boundaries, but fall back to character boundaries if there is not
999
1006
enough space for a full word.
1007
1014
<a name="PANGO-TYPE-WRAP-MODE:CAPS"></a><h3>PANGO_TYPE_WRAP_MODE</h3>
1008
1015
<pre class="programlisting">#define PANGO_TYPE_WRAP_MODE (pango_wrap_mode_get_type ())
1011
The <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> type for <a class="link" href="pango-Layout-Objects.html#PangoWrapMode"><span class="type">PangoWrapMode</span></a>.
1015
1019
<div class="refsect2">
1164
1168
<a name="PANGO-TYPE-ELLIPSIZE-MODE:CAPS"></a><h3>PANGO_TYPE_ELLIPSIZE_MODE</h3>
1165
1169
<pre class="programlisting">#define PANGO_TYPE_ELLIPSIZE_MODE (pango_ellipsize_mode_get_type ())
1168
The <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> type for <a class="link" href="pango-Layout-Objects.html#PangoEllipsizeMode"><span class="type">PangoEllipsizeMode</span></a>.
1172
1173
<div class="refsect2">
1624
1625
<a name="PANGO-TYPE-ALIGNMENT:CAPS"></a><h3>PANGO_TYPE_ALIGNMENT</h3>
1625
1626
<pre class="programlisting">#define PANGO_TYPE_ALIGNMENT (pango_alignment_get_type ())
1628
The <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> type for <a class="link" href="pango-Layout-Objects.html#PangoAlignment"><span class="type">PangoAlignment</span></a>.
1632
1630
<div class="refsect2">
1849
1847
Y position is not inside the layout, the closest position is chosen
1850
1848
(the position will be clamped inside the layout). If the
1851
1849
X position is not within the layout, then the start or the
1852
end of the line is chosen as described for <code class="function">pango_layout_x_to_index()</code>.
1850
end of the line is chosen as described for <a class="link" href="pango-Layout-Objects.html#pango-layout-xy-to-index" title="pango_layout_xy_to_index ()"><code class="function">pango_layout_xy_to_index()</code></a>.
1853
1851
If either the X or Y positions were not inside the layout, then the
1854
1852
function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>; on an exact hit, it returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.
3034
3032
Routines for rendering PangoLayout objects are provided in
3035
3033
code specific to each rendering system.
3035
<div class="variablelist"><table border="0" class="variablelist">
3037
<col align="left" valign="top">
3042
<td><p><span class="term"><a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> *<em class="structfield"><code><a name="PangoLayoutLine-struct.layout"></a>layout</code></em>;</span></p></td>
3046
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="PangoLayoutLine-struct.start-index"></a>start_index</code></em>;</span></p></td>
3047
<td>start of line as byte index into layout->text</td>
3050
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="PangoLayoutLine-struct.length"></a>length</code></em>;</span></p></td>
3051
<td>length of line in bytes</td>
3054
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *<em class="structfield"><code><a name="PangoLayoutLine-struct.runs"></a>runs</code></em>;</span></p></td>
3058
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="PangoLayoutLine-struct.is-paragraph-start"></a>is_paragraph_start</code></em> : 1;</span></p></td>
3060
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if this is the first line of the paragraph</td>
3063
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="PangoLayoutLine-struct.resolved-dir"></a>resolved_dir</code></em> : 3;</span></p></td>
3065
<span class="type">Resolved</span> PangoDirection of line</td>
3039
3071
<div class="refsect2">