Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Pango::Rectangle Class Reference

A PangoRectangle C++ wrapper class. More...

#include <xfc/pango/types.hh>

List of all members.

Public Member Functions

Accessors
Methods

Detailed Description

A PangoRectangle C++ wrapper class.

Rectangle represents a rectangle. It is frequently used to represent the logical or ink extents of a single glyph or section of text (see, for instance, Pango::Font::get_glyph_extents()).


Constructor & Destructor Documentation

Xfc::Pango::Rectangle::Rectangle ( int  x,
int  y,
int  width,
int  height 
)

Construct a new rectangle.

Parameters:
x The X coordinate of the rectangle.
y The Y coordinate of the rectangle.
width The width of the rectangle.
height The height of the rectangle.

Xfc::Pango::Rectangle::Rectangle ( const PangoRectangle &  rectangle  ) 

Construct a new rectangle from an existing PangoRectangle.

Parameters:
rectangle A PangoRectangle.

Xfc::Pango::Rectangle::Rectangle ( int  x,
int  y,
int  width,
int  height 
)

Construct a new rectangle.

Parameters:
x The X coordinate of the rectangle.
y The Y coordinate of the rectangle.
width The width of the rectangle.
height The height of the rectangle.

Xfc::Pango::Rectangle::Rectangle ( const PangoRectangle &  rectangle  ) 

Construct a new rectangle from an existing PangoRectangle.

Parameters:
rectangle A PangoRectangle.


Member Function Documentation

int Xfc::Pango::Rectangle::ascent (  )  const

Extracts the ascent from a Pango::Rectangle representing glyph extents.

The ascent is the distance from the baseline to the highest point of the character. This is positive if the glyph ascends above the baseline.

int Xfc::Pango::Rectangle::descent (  )  const

Extracts the descent from a Pango::Rectangle representing glyph extents.

The descent is the distance from the baseline to the lowest point of the character. This is positive if the glyph descends below the baseline.

int Xfc::Pango::Rectangle::lbearing (  )  const

Extracts the left bearing from a Pango::Rectangle representing glyph extents.

The left bearing is the distance from the horizontal origin to the farthest left point of the character. This is positive for characters drawn completely to the right of the glyph origin.

int Xfc::Pango::Rectangle::rbearing (  )  const

Extracts the right bearing from a Pango::Rectangle representing glyph extents.

The right bearing is the distance from the horizontal origin to the farthest right point of the character. This is positive except for characters drawn completely to the left of the horizontal origin.

void Xfc::Pango::Rectangle::set ( int  x,
int  y,
int  width,
int  height 
)

Sets the position and size of the rectangle.

Parameters:
x The new X coordinate of the rectangle.
y The new Y coordinate of the rectangle.
width The new width of the rectangle.
height The new height of the rectangle.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3