diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-03-10 16:57:19 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-03-10 16:57:19 +0000 |
commit | df19b2f5a156b717186f8cbc6b1ad39d2401ab90 (patch) | |
tree | adcbef84798b47a7aad12a55221989cbd8ec5dc0 /docs/tmpl/layout.sgml | |
parent | c01dbb8d33281a5cdea16525904ff28ca61620fd (diff) | |
download | pango-df19b2f5a156b717186f8cbc6b1ad39d2401ab90.tar.gz |
Release pango-0.8
Thu Mar 9 19:55:21 2000 Owen Taylor <otaylor@redhat.com>
* Release pango-0.8
* docs/TEXT/coding-style: Added some notes about coding style
within Pango.
* modules/*.[ch]: New version from Karl Koehler adding support
for vowels marks, better ligatures.
* docs/tmpl/*: Doc updates
* libpango/pango-layout.[ch] libpango/pangox/.[ch]: Add functions
for handling paragraphs as 2-D objects, not simple lists of lines,
to make things easier for people using pango-layout.
* examples/viewer.c: Simplify using the now 2-D layout-capabable
PangoLayout.
* libpango/fonts.c (pango_font_{get_coverage,find_shaper}): Allow
NULL language tag.
* libpango/modules.c (_pango_find_map): Fix for allowing
NULL language tag.
Diffstat (limited to 'docs/tmpl/layout.sgml')
-rw-r--r-- | docs/tmpl/layout.sgml | 193 |
1 files changed, 156 insertions, 37 deletions
diff --git a/docs/tmpl/layout.sgml b/docs/tmpl/layout.sgml index aa44fd98..7593c90f 100644 --- a/docs/tmpl/layout.sgml +++ b/docs/tmpl/layout.sgml @@ -2,7 +2,7 @@ Layout Objects <!-- ##### SECTION Short_Description ##### --> -Layout driver objects for entire paragraphs. +Highlevel layout driver objects <!-- ##### SECTION Long_Description ##### --> <para> @@ -23,44 +23,36 @@ at once. <para> The #PangoLayout structure represents and entire paragraph of text. It is initialized with a #PangoContext, UTF-8 string -and set of attirbutes for that string. Once that is done, the -set of formatted lines can be extracted from the object. +and set of attributes for that string. Once that is done, the +set of formatted lines can be extracted from the object, +the layout can be rendered, and conversion between logical +character positions within the layout's text, and the physical +position of the resulting glyphs can be made. </para> - -<!-- ##### STRUCT PangoLayoutLine ##### --> -<para> -The #PangoLayoutLine structure represents one of the lines resulting -from laying out a paragraph via #PangoLayout. #PangoLayoutLine -structures are obtained by calling pango_layout_get_line() and -are only valid until the text, attributes, or settings of the -parent #PangoLayout are modified. -</para> <para> -Routines for rendering PangoLayout objects are provided in -code specific to each rendering system. +There are also a number of parameters to adjust the formatting +of a #PangoLayout, which are illustrated in <xref linkend="parameters">. +It is possible, as well, to ignore the 2-D setup, and simply +treat the results of a #PangoLayout as a list of lines. </para> -@layout: the parent layout for this line. -@n_chars: the total number of characters in the line. -@length: the length of the line in bytes. -@runs: a list containing the runs of the line in visual order. +<figure id="parameters"> +<title>Adjustable parameters for a PangoLayout</title> +<graphic fileref="layout.gif" format="gif"></graphic> +</figure> -<!-- ##### STRUCT PangoLayoutRun ##### --> <para> -The #PangoLayoutRun structure represents a single run within -a #PangoLayoutLine. +The #PangoLayout structure is opaque, and has no user-visible +fields. </para> -@item: a #PangoItem structure that provides information - about the segment of text in this run. -@glyphs: the glyphs obtained by shaping the text for this item. - <!-- ##### FUNCTION pango_layout_new ##### --> <para> </para> +@context: @Returns: @@ -85,6 +77,7 @@ a #PangoLayoutLine. </para> +@layout: @text: @length: @@ -107,13 +100,31 @@ a #PangoLayoutLine. @width: -<!-- ##### FUNCTION pango_layout_set_first_line_width ##### --> +<!-- ##### FUNCTION pango_layout_get_width ##### --> <para> </para> @layout: -@width: +@Returns: + + +<!-- ##### FUNCTION pango_layout_set_indent ##### --> +<para> + +</para> + +@layout: +@indent: + + +<!-- ##### FUNCTION pango_layout_get_indent ##### --> +<para> + +</para> + +@layout: +@Returns: <!-- ##### FUNCTION pango_layout_set_justify ##### --> @@ -125,16 +136,76 @@ a #PangoLayoutLine. @justify: -<!-- ##### FUNCTION pango_layout_cp_to_line_x ##### --> +<!-- ##### FUNCTION pango_layout_get_justify ##### --> +<para> + +</para> + +@layout: +@Returns: + + +<!-- ##### FUNCTION pango_layout_set_alignment ##### --> +<para> + +</para> + +@layout: +@alignment: + + +<!-- ##### FUNCTION pango_layout_get_alignment ##### --> <para> </para> @layout: -@char_pos: +@Returns: + + +<!-- ##### ENUM PangoAlignment ##### --> +<para> +describes how to align the lines of a #PangoLayout within the +available space. If the #PangoLayout is set to justify +using pango_layout_set_justify(), then this only has an effect +for partial lines. +</para> + +@PANGO_ALIGN_LEFT: Put all available space on the right +@PANGO_ALIGN_CENTER: Center the line within the available space +@PANGO_ALIGN_RIGHT: Put all available space on the left + +<!-- ##### FUNCTION pango_layout_xy_to_index ##### --> +<para> + +</para> + +@layout: +@x: +@y: +@index: @trailing: -@line: -@x_pos: +@Returns: + + +<!-- ##### FUNCTION pango_layout_index_to_pos ##### --> +<para> + +</para> + +@layout: +@index: +@pos: + + +<!-- ##### FUNCTION pango_layout_get_extents ##### --> +<para> + +</para> + +@layout: +@ink_rect: +@logical_rect: <!-- ##### FUNCTION pango_layout_get_line_count ##### --> @@ -156,6 +227,42 @@ a #PangoLayoutLine. @Returns: +<!-- ##### FUNCTION pango_layout_get_lines ##### --> +<para> + +</para> + +@layout: +@Returns: + + +<!-- ##### STRUCT PangoLayoutLine ##### --> +<para> +The #PangoLayoutLine structure represents one of the lines resulting +from laying out a paragraph via #PangoLayout. #PangoLayoutLine +structures are obtained by calling pango_layout_get_line() and +are only valid until the text, attributes, or settings of the +parent #PangoLayout are modified. +</para> +<para> +Routines for rendering PangoLayout objects are provided in +code specific to each rendering system. +</para> + +@layout: the parent layout for this line. +@length: the length of the line in bytes. +@runs: a list containing the runs of the line in visual order. + +<!-- ##### STRUCT PangoLayoutRun ##### --> +<para> +The #PangoLayoutRun structure represents a single run within +a #PangoLayoutLine. +</para> + +@item: a #PangoItem structure that provides information + about the segment of text in this run. +@glyphs: the glyphs obtained by shaping the text for this item. + <!-- ##### FUNCTION pango_layout_line_ref ##### --> <para> @@ -172,24 +279,36 @@ a #PangoLayoutLine. @line: -<!-- ##### FUNCTION pango_layout_line_x_to_cp ##### --> +<!-- ##### FUNCTION pango_layout_line_get_extents ##### --> +<para> + +</para> + +@line: +@ink_rect: +@logical_rect: + + +<!-- ##### FUNCTION pango_layout_line_index_to_x ##### --> <para> </para> @line: -@x_pos: -@char_pos: +@index: @trailing: +@x_pos: -<!-- ##### FUNCTION pango_layout_line_get_extents ##### --> +<!-- ##### FUNCTION pango_layout_line_x_to_index ##### --> <para> </para> @line: -@ink_rect: -@logical_rect: +@x_pos: +@index: +@trailing: +@Returns: |