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


Xfc::Pango::AttrSize Class Reference

Pango size C++ wrapper class. More...

#include <xfc/pango/attributes.hh>

Inheritance diagram for Xfc::Pango::AttrSize:

Xfc::Pango::Attribute Xfc::Object Xfc::Trackable List of all members.

Public Member Functions

Accessors
Methods

Detailed Description

Pango size C++ wrapper class.

AttrSize wraps the size attribute (ATTR_SIZE).


Constructor & Destructor Documentation

Xfc::Pango::AttrSize::AttrSize ( int  size,
bool  absolute = false 
) [explicit]

Construct a new font-size attribute.

Parameters:
size The font size.
absolute Set false if size is in points and true if size is in device units.
If absolute is false the font size is in PANGO_SCALEths of a point and the font-size attribute created is in fractional units. If absolute is true the font size is in PANGO_SCALEths of a device unit and the font-size attribute created is in device units.

The PANGO_SCALE macro represents the scale between dimensions used for Pango distances and device units. (The definition of device units is dependent on the output device; it will typically be pixels for a screen, and points for a printer.) PANGO_SCALE is currently 1024, but this may be changed in the future.

When setting font sizes, device units are always considered to be points (as in "12 point font"), rather than pixels.

Xfc::Pango::AttrSize::AttrSize ( int  size,
bool  absolute = false 
) [explicit]

Construct a new font-size attribute.

Parameters:
size The font size.
absolute Set false if size is in points and true if size is in device units.
If absolute is false the font size is in PANGO_SCALEths of a point and the font-size attribute created is in fractional units. If absolute is true the font size is in PANGO_SCALEths of a device unit and the font-size attribute created is in device units.

The PANGO_SCALE macro represents the scale between dimensions used for Pango distances and device units. (The definition of device units is dependent on the output device; it will typically be pixels for a screen, and points for a printer.) PANGO_SCALE is currently 1024, but this may be changed in the future.

When setting font sizes, device units are always considered to be points (as in "12 point font"), rather than pixels.


Member Function Documentation

void Xfc::Pango::AttrSize::set_size ( int  size  ) 

Sets the font size.

Parameters:
size The new font size.

void Xfc::Pango::AttrSize::set_absolute ( bool  absolute  ) 

Sets whether the font size is in fractional units or device units.

Parameters:
absolute Set false if the size is in points and true if it's in device units.


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