logo top
Main Page   Widgets   Namespaces   Book  

Pango::LayoutLine Class Reference

A Pango::LayoutLine represents one of the lines resulting from laying out a paragraph via Pango::Layout. More...

List of all members.

Public Member Functions

void reference () const
void unreference () const
PangoLayoutLine* gobj ()
 Provides access to the underlying C instance.

const PangoLayoutLine* gobj () const
 Provides access to the underlying C instance.

PangoLayoutLine* gobj_copy () const
bool x_to_index (int x_pos, int& index, int& trailing) const
int index_to_x (int index, bool trailing) const
 Converts an index within a line to a x position.

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.

void get_extents (Rectangle& ink_rect, Rectangle& logical_rect) const
Rectangle get_ink_extents () const
 Compute the ink extents of a layout line.

Rectangle get_logical_extents () const
 Compute the logical extents of a layout line.

void get_pixel_extents (Rectangle& ink_rect, Rectangle& logical_rect) const
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.


Protected Member Functions

 LayoutLine ()
void operator delete (void*, size_t)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Pango::LayoutLinewrap (PangoLayoutLine* object, bool take_copy=false)


Detailed Description

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.


Constructor & Destructor Documentation

Pango::LayoutLine::LayoutLine (  )  [protected]
 


Member Function Documentation

void Pango::LayoutLine::get_extents ( Rectangle ink_rect,
Rectangle logical_rect
const
 

Rectangle Pango::LayoutLine::get_ink_extents (  )  const
 

Compute the ink extents of a layout line.

Returns:
The extents of the layout line as drawn.

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
 

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.

Glib::ArrayHandle<std::pair<int,int> > Pango::LayoutLine::get_x_ranges ( int  start_index,
int  end_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.

const PangoLayoutLine* Pango::LayoutLine::gobj (  )  const
 

Provides access to the underlying C instance.

PangoLayoutLine* Pango::LayoutLine::gobj (  ) 
 

Provides access to the underlying C instance.

PangoLayoutLine* Pango::LayoutLine::gobj_copy (  )  const
 

int Pango::LayoutLine::index_to_x ( int  index,
bool  trailing
const
 

Converts an index within a line to a x position.

Parameters:
index Byte offset of a grapheme within the layout.
trailing A boolean indicating the edge of the grapheme to retrieve the position of. If false, the trailing edge of the grapheme, if true the leading of the grapheme.
Returns:
The x offset (in thousands of a device unit).

void Pango::LayoutLine::operator delete ( void*  ,
size_t 
[protected]
 

void Pango::LayoutLine::reference (  )  const
 

void Pango::LayoutLine::unreference (  )  const
 

bool Pango::LayoutLine::x_to_index ( int  x_pos,
int&  index,
int&  trailing
const
 


Friends And Related Function Documentation

Glib::RefPtr<Pango::LayoutLine> wrap ( PangoLayoutLine*  object,
bool  take_copy = false
[related]
 


The documentation for this class was generated from the following file:
Generated for gtkmm 2.2 by Doxygen 1.3.4 © 1997-2001