Reference Manual

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

# Inti::Pango::Coverage Class Reference

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

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

Inheritance diagram for Inti::Pango::Coverage:

List of all members.

## Public Member Functions

Constructors

- Coverage ()
    Construct a new coverage object, initialized to COVERAGE_NONE.
- Coverage (PangoCoverage *coverage)
    Construct a new coverage from an existing PangoCoverage.
- Coverage (const Coverage &src)
    Copy constructor.
- virtual ~Coverage ()
    Destructor.
- Coverage & operator= (const Coverage &src)
    Assignment operator.

Accessors

- PangoCoverage * pango_coverage () const
    Get a pointer to the PangoCoverage structure.
- operator PangoCoverage * () const
    Conversion operator; safely converts a Coverage to a PangoCoverage pointer.
- CoverageLevel get (int index) const
    Determine whether a particular index is covered by coverage.

Methods

- void set (int index, CoverageLevel level)
    Modify a particular index within the coverage.
- void 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.
- void to_bytes (unsigned char **bytes, int *n_bytes)
    Convert the coverage into a flat binary format.

## Static Public Member Functions

- Pointer< Coverage > from_bytes (unsigned char *bytes, int n_bytes)
    Convert data generated from to_bytes() back to a Coverage object.

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

## Constructor & Destructor Documentation

Inti::Pango::Coverage::Coverage | ( | PangoCoverage * | coverage | ) | `[explicit]`

Construct a new coverage from an existing PangoCoverage.

Parameters:

  coverage | A PangoCoverage.

Coverage references the PangoCoverage and releases the reference when it's no longer required.

Inti::Pango::Coverage::Coverage | ( | const Coverage & | src | ) |

Copy constructor.

Parameters:

  src | The source coverage.

## Member Function Documentation

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

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

Parameters:

  bytes | A binary data representing a Coverage object.
  n_bytes | The size of bytes in bytes.

Returns:
  A smart pointer to a newly allocated coverage, or null if the data was invalid.

CoverageLevel Inti::Pango::Coverage::get | ( | int | index | ) | const

Determine whether a particular index is covered by coverage.

Parameters:

  index | The index to check.

Returns:
  The Pango::CoverageLevel for index.

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

Parameters:

  other | Another coverage object.

Coverage& Inti::Pango::Coverage::operator= | ( | const Coverage & | src | ) |

Assignment operator.

Parameters:

  src | The source coverage.

void Inti::Pango::Coverage::set | ( | int | index,
|  | CoverageLevel | level
| ) |

Modify a particular index within the coverage.

Parameters:

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

void Inti::Pango::Coverage::to_bytes | ( | unsigned char ** | bytes,
|  | int * | n_bytes
| ) |

Convert the coverage into a flat binary format.

Parameters:

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

The documentation for this class was generated from the following file:

- coverage.h

Main Page - Footer