![]() |
![]() |
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.
Public Member Functions | |
void | add_to_cairo_context (const Cairo::RefPtr<Cairo::Context>& context) |
Adds the text in this LayoutLine to the current path in the specified Cairo context. | |
void | get_extents (Rectangle& ink_rect, Rectangle& logical_rect) const |
Compute the logical and ink extents of a layout line. | |
Rectangle | get_ink_extents () const |
Compute the ink extents of a layout line. | |
Glib::RefPtr<const Pango::Layout> | get_layout () const |
Glib::RefPtr<Pango::Layout> | get_layout () |
int | get_length () const |
Rectangle | get_logical_extents () const |
Compute the logical extents of a layout line. | |
void | get_pixel_extents (Rectangle& ink_rect, Rectangle& logical_rect) const |
Compute the logical and ink extents of a layout line. | |
Rectangle | get_pixel_ink_extents () const |
Compute the ink extents of a layout line in device units. | |
Rectangle | get_pixel_logical_extents () const |
Compute the logical extents of a layout line in device units. | |
int | get_start_index () const |
Glib::ArrayHandle< std::pair< int, int > > | get_x_ranges (int start_index, int end_index) const |
Get a list of visual ranges corresponding to a given logical range. | |
const PangoLayoutLine* | gobj () const |
Provides access to the underlying C instance. | |
PangoLayoutLine* | gobj () |
Provides access to the underlying C instance. | |
PangoLayoutLine* | 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 | index_to_x (int index, bool trailing) const |
Converts an index within a line to a x position. | |
void | reference () const |
void | show_in_cairo_context (const Cairo::RefPtr<Cairo::Context>& context) |
Draws this LayoutLine in the specified Cairo context. | |
void | unreference () const |
bool | x_to_index (int x_pos, int& index, int& trailing) const |
Converts from x offset to the byte index of the corresponding character within the text of the layout. | |
Protected Member Functions | |
LayoutLine () | |
void | operator delete (void*, size_t) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr<Pango::LayoutLine> | wrap (PangoLayoutLine* object, bool take_copy=false) |
|
|
|
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.
|
|
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. |
|
Compute the ink extents of a layout line.
|
|
|
|
|
|
|
|
Compute the logical extents of a layout line.
|
|
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 pango_layout_line_get_extents(), which returns the extents in units of device unit / PANGO_SCALE. |
|
Compute the ink extents of a layout line in device units.
|
|
Compute the logical extents of a layout line in device units.
|
|
|
|
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.
|
|
Provides access to the underlying C instance.
|
|
Provides access to the underlying C instance.
|
|
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
|
Converts an index within a line to a x position.
|
|
|
|
|
|
Draws this LayoutLine in the specified Cairo context. The origin of the glyphs (the left edge of the line) will be drawn at the current point of the cairo context.
|
|
|
|
Converts from x offset to the byte index of the corresponding character within the text of the layout. If x_pos is outside the line, index and trailing will point to the very first or very last position in the line. This determination is based on the resolved direction of the paragraph; for example, if the resolved direction is right-to-left, then an X position to the right of the line (after it) results in 0 being stored in index and trailing . An X position to the left of the line results in index pointing to the (logical) last grapheme in the line and trailing being set to the number of characters in that grapheme. The reverse is true for a left-to-right line.
|
|
|