Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Pango::Rectangle Class Reference

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

`#include <inti/pango/types.h>`

List of all members.

## Public Member Functions

Constructors

- Rectangle ()
    Construct a with its x, y, width and height set to 0;.
- Rectangle (int x, int y, int width, int height)
    Construct a new rectangle.
- Rectangle (const PangoRectangle &rectangle)
    Construct a new rectangle from an existing PangoRectangle.

Accessors

- PangoRectangle * pango_rectangle () const
    Get a pointer to the PangoRectangle structure.
- operator PangoRectangle * () const
    Conversion operator; safely converts a Rectangle to a PangoRectangle pointer.
- int x () const
    Returns the X coordinate of the top-left corner of the rectangle.
- int y () const
    Returns the Y coordinate of the top-left corner of the rectangle.
- int width () const
    Returns the width of the rectangle.
- int height () const
    Returns the height of the rectangle.
- int ascent () const
    Extracts the ascent from a Pango::Rectangle representing glyph extents.
- int descent () const
    Extracts the descent from a Pango::Rectangle representing glyph extents.
- int lbearing () const
    Extracts the left bearing from a Pango::Rectangle representing glyph extents.
- int rbearing () const
    Extracts the right bearing from a Pango::Rectangle representing glyph extents.

Methods

- void set (int x, int y, int width, int height)
    Sets the position and size of the rectangle.

## 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

Inti::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.

Inti::Pango::Rectangle::Rectangle | ( | const PangoRectangle & | rectangle | ) |

  | Construct a new rectangle from an existing PangoRectangle. Parameters:
  rectangle | A PangoRectangle.

## Member Function Documentation

int Inti::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 Inti::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 Inti::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 Inti::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 Inti::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:

- pango/types.h

Main Page - Footer