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

PkGlyph Class Reference

#include <PkFont.h>

List of all members.

Public Member Functions

 PkGlyph (unsigned int cc, unsigned int tfmwidth, unsigned int dm, unsigned int w, unsigned int h, int hoff, int voff, PkRasterdata *rasterdata, PkFont *f)
 Represents a single glyph in a font.
 PkGlyph (unsigned int cc, unsigned int tfmwidth, unsigned int dx, unsigned int dy, unsigned int w, unsigned int h, int hoff, int voff, PkRasterdata *rasterdata, PkFont *f)
 Represents a single glyph in a font.
 PkGlyph (int resolution, PkFont *f)
 Constructs a dummy glyph for a font.
unsigned int characterCode () const
 The character code for this glyph.
char characterChar () const
 The character which this glyph represents.
const Bytebitmap ()
 Returns the bitmap which represents this glyph.
unsigned int w () const
 Width of this character.
unsigned int h () const
 Height of this character.
int hoff () const
 Obtains the horizontal offset of the first pixel of the bitmap from the reference point for this glyph, with positive numbers indicating a rightward offset.
int voff () const
 Obtains the vertical offset of the first pixel of the bitmap from the reference point for this glyph, with positive numbers indicating a downward offset (which is rather rare, since the reference point is generally near the lower-left corner of the glyph).
double tfmWidth () const
 The glyph's width.
int hEscapement () const
 The glyph's horizontal escapement.
int vEscapement () const
 The glyph's vertical escapement.

Static Public Member Functions

verbosities verbosity (const verbosities level)
 Sets the verbosity of this module.


Constructor & Destructor Documentation

PkGlyph::PkGlyph unsigned int  cc,
unsigned int  tfmwidth,
unsigned int  dm,
unsigned int  w,
unsigned int  h,
int  hoff,
int  voff,
PkRasterdata rasterdata,
PkFont f
 

Represents a single glyph in a font.

The parameters here correspond to the parameters of the same names which are read from the PK file.

Parameters:
cc the character code of this glyph
tfmwidth the width of the character, in DVI units
dm the horizontal escapement, in pixels; this is the number of pixels rightwards (towards increasing x) that the reference should move after this glyph is set; the vertical escapement is taken to be zero
w width of the bitmap in pixels
h height of the bitmap in pixels
hoff (hoff,voff) is the position of the glyph reference point, as an offset from the top-left pixel, in units of pixels, and with right and down being positive
voff see parameter hoff
rasterdata the raster information for this glyph
f the font which this glyph belongs to

PkGlyph::PkGlyph unsigned int  cc,
unsigned int  tfmwidth,
unsigned int  dx,
unsigned int  dy,
unsigned int  w,
unsigned int  h,
int  hoff,
int  voff,
PkRasterdata rasterdata,
PkFont f
 

Represents a single glyph in a font.

The parameters here correspond to the parameters of the same names which are read from the PK file.

Parameters:
cc the character code of this glyph
tfmwidth the width of the character, in DVI units
dx the horizontal escapement, in pixels times 216; this defines the number of pixels rightwards (towards increasing x) that the reference should move after this glyph is set
dy the vertical escapement, in pixels times 216
w width of the bitmap in pixels
h height of the bitmap in pixels
hoff (hoff,voff) is the position of the glyph reference point, as an offset from the top-left pixel, in units of pixels, and with right and down being positive
voff see parameter hoff
rasterdata the raster information for this glyph
f the font which this glyph belongs to

PkGlyph::PkGlyph int  resolution,
PkFont f
 

Constructs a dummy glyph for a font.

Parameters:
resolution the resolution which this glyph corresponds to
f the font which this glyph is a member of


Member Function Documentation

const Byte * PkGlyph::bitmap  ) 
 

Returns the bitmap which represents this glyph.

This runs from the top-left of the character, with the width and height as given by methods w() and h().

Returns:
the bitmap for this glyph

char PkGlyph::characterChar  )  const [inline]
 

The character which this glyph represents.

Returns:
the (ASCII) printable character which this glyph purports to represent

unsigned int PkGlyph::characterCode  )  const [inline]
 

The character code for this glyph.

unsigned int PkGlyph::h  )  const [inline]
 

Height of this character.

This is the number of columns in the bitmap returned by method bitmap()

Returns:
height in device units (ie, pixels)

int PkGlyph::hEscapement  )  const [inline]
 

The glyph's horizontal escapement.

Returns:
the escapement in pixels

int PkGlyph::hoff  )  const [inline]
 

Obtains the horizontal offset of the first pixel of the bitmap from the reference point for this glyph, with positive numbers indicating a rightward offset.

This is the negative of the horizontal offset of the reference point from the bitmap, as discussed in the constructor.

Returns:
the offset (in pixels, with right being positive)

double PkGlyph::tfmWidth  )  const [inline]
 

The glyph's width.

Returns:
the glyph's width in points

verbosities PkGlyph::verbosity const verbosities  level  )  [inline, static]
 

Sets the verbosity of this module.

Parameters:
level the required verbosity
Returns:
the previous verbosity level

int PkGlyph::vEscapement  )  const [inline]
 

The glyph's vertical escapement.

Returns:
the escapement in pixels

int PkGlyph::voff  )  const [inline]
 

Obtains the vertical offset of the first pixel of the bitmap from the reference point for this glyph, with positive numbers indicating a downward offset (which is rather rare, since the reference point is generally near the lower-left corner of the glyph).

This is the negative of the vertical offset of the reference point from the bitmap, as discussed in the constructor.

Returns:
the offset (in pixels, with down being positive)

unsigned int PkGlyph::w  )  const [inline]
 

Width of this character.

This is the row-length of the bitmap returned by method bitmap()

Returns:
width in device units (ie, pixels)


The documentation for this class was generated from the following files:
Generated on Sun Aug 21 18:21:09 2005 for dvi2bitmap by doxygen 1.3.8