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

Xfc::Pango::Coverage Class Reference

A PangoCoverage C++ wrapper class. More...

#include <xfc/pango/coverage.hh>

Inheritance diagram for Xfc::Pango::Coverage:

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


Public Member Functions


Static Public Member Functions


Detailed Description

A PangoCoverage C++ wrapper class.

It is often necessary in Pango to determine if a particular font can represent a particular character, and also how well it can represent that character. The Coverage object is used to represent that information.

Note: dynamically allocated objects must either be unreferenced or assigned to a smart pointer. Stack objects are automatically unreferenced when they go out of scope.

Constructor & Destructor Documentation

Xfc::Pango::Coverage::Coverage (  ) 

Constructs a new coverage object, initialized to COVERAGE_NONE.

The Coverage is created with a reference count of 1 that the caller owns.

Xfc::Pango::Coverage::Coverage ( PangoCoverage *  coverage  )  [explicit]

Constructs a new coverage from an existing PangoCoverage.

coverage A PangoCoverage.
Coverage references the PangoCoverage and releases the reference when it's no longer required. The Coverage is created with a reference count of 1 that the caller owns.

Xfc::Pango::Coverage::Coverage ( const Coverage src  ) 

Copy constructor.

src The source coverage.

Member Function Documentation

Coverage& Xfc::Pango::Coverage::operator= ( const Coverage src  ) 

Assignment operator.

src The source coverage.

CoverageLevel Xfc::Pango::Coverage::get ( int  index  )  const

Determine whether a particular index is covered by coverage.

index The index to check.
The Pango::CoverageLevel for index.

void Xfc::Pango::Coverage::set ( int  index,
CoverageLevel  level 

Modify a particular index within the coverage.

index The index to modify.
level The new level for index.

void Xfc::Pango::Coverage::max ( const Coverage other  ) 

Set the coverage for each index in other to be the max (better) value of the current coverage for the index and the coverage for the corresponding index in other.

other Another coverage object.

void Xfc::Pango::Coverage::to_bytes ( unsigned char **  bytes,
int *  n_bytes 

Convert the coverage into a flat binary format.

bytes The location to store result (must be freed with g_free()).
n_bytes The location to store size of bytes.

static Pointer<Coverage> Xfc::Pango::Coverage::from_bytes ( unsigned char *  bytes,
int  n_bytes 
) [static]

Convert data generated from to_bytes() back to a Coverage object.

bytes A binary data representing a Coverage object.
n_bytes The size of bytes in bytes.
A smart pointer to a newly allocated coverage, or null if the data was invalid.

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