A Pango::LayoutLine represents one of the lines resulting from laying out a paragraph via Pango::Layout.
More...
#include <pangomm/layoutline.h>
A Pango::LayoutLine represents one of the lines resulting from laying out a paragraph via Pango::Layout.
Pango::LayoutLine objects are obtained by calling Pango::Layout::get_line() and are only valid until the text, attributes, or settings of the parent Pango::Layout are modified. Routines for rendering Pango::Layout objects are provided in code specific to each rendering system.
| Pango::LayoutLine::LayoutLine |
( |
| ) |
|
|
delete |
| Pango::LayoutLine::LayoutLine |
( |
const LayoutLine& |
| ) |
|
|
delete |
Adds the text in this LayoutLine to the current path in the specified Cairo context.
The origin of the glyphs (the left edge of the line) will be at the current point of the cairo context.
- Parameters
-
| void Pango::LayoutLine::get_extents |
( |
Rectangle& |
ink_rect, |
|
|
Rectangle& |
logical_rect |
|
) |
| const |
Compute the logical and ink extents of a layout line.
See the documentation for Pango::Font::get_glyph_extents() for details about the interpretation of the rectangles.
- Parameters
-
| ink_rect | Rectangle used to store the extents of the glyph string as drawn. |
| logical_rect | Rectangle used to store the logical extents of the glyph string. |
| Rectangle Pango::LayoutLine::get_ink_extents |
( |
| ) |
const |
Compute the ink extents of a layout line.
- Returns
- The extents of the layout line as drawn.
| int Pango::LayoutLine::get_length |
( |
| ) |
const |
| Rectangle Pango::LayoutLine::get_logical_extents |
( |
| ) |
const |
Compute the logical extents of a layout line.
- Returns
- The logical extents of the layout line.
| void Pango::LayoutLine::get_pixel_extents |
( |
Rectangle& |
ink_rect, |
|
|
Rectangle& |
logical_rect |
|
) |
| const |
Compute the logical and ink extents of a layout line.
See the documentation for Pango::Font::get_glyph_extents() for details about the interpretation of the rectangles. The returned rectangles are in device units, as opposed to get_extents(), which returns the extents in units of device unit / PANGO_SCALE.
- Parameters
-
| ink_rect | Rectangle used to store the extents of the glyph string as drawn. |
| logical_rect | Rectangle used to store the logical extents of the glyph string. |
| Rectangle Pango::LayoutLine::get_pixel_ink_extents |
( |
| ) |
const |
Compute the ink extents of a layout line in device units.
- Returns
- The extents of the layout line as drawn.
| Rectangle Pango::LayoutLine::get_pixel_logical_extents |
( |
| ) |
const |
Compute the logical extents of a layout line in device units.
- Returns
- The logical extents of the layout line.
| int Pango::LayoutLine::get_start_index |
( |
| ) |
const |
Get a list of visual ranges corresponding to a given logical range.
This list is not necessarily minimal - there may be consecutive ranges which are adjacent. The ranges will be sorted from left to right. The ranges are with respect to the left edge of the entire layout, not with respect to the line.
- Parameters
-
| start_index | The start byte index of the logical range. If the value of start_index is less than the start index for the line, then the first range will extend all the way to the leading edge of the layout. Otherwise it will start at the leading edge of the first character. |
| end_index | The end byte index of the logical range. If the value of end_index is greater than the end index for the line, then the last range will extend all the way to the trailing edge of the layout. Otherwise, it will end at the trailing edge of the last character. |
- Returns
- An array of ranges represented by pairs of integers marking the start and end pixel coordinates of the ranges.
| PangoLayoutLine* Pango::LayoutLine::gobj |
( |
| ) |
|
Provides access to the underlying C instance.
| const PangoLayoutLine* Pango::LayoutLine::gobj |
( |
| ) |
const |
Provides access to the underlying C instance.
| PangoLayoutLine* Pango::LayoutLine::gobj_copy |
( |
| ) |
const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
| int Pango::LayoutLine::index_to_x |
( |
int |
index, |
|
|
|