PNMTextGlyph

from panda3d.core import PNMTextGlyph
class PNMTextGlyph

Bases: DTOOL_SUPER_BASE

A single glyph in a PNMTextMaker.

Inheritance diagram

Inheritance diagram of PNMTextGlyph

__init__(*args, **kwargs)
getAdvance()

C++ Interface: get_advance(PNMTextGlyph self)

/**
  • Returns the number of pixels by which the pen should be advanced after

  • rendering this glyph.

*/

getBottom()

C++ Interface: get_bottom(PNMTextGlyph self)

/**
  • Returns the y coordinate of the bottommost pixel in the glyph.

*/

getHeight()

C++ Interface: get_height(PNMTextGlyph self)

/**
  • Returns the height of the glyph in pixels.

*/

getInteriorFlag()

C++ Interface: get_interior_flag(PNMTextGlyph self, int x, int y)

/**
  • Returns true if the indicated pixel represents a pixel in the interior of a

  • hollow font, false otherwise.

*/

getLeft()

C++ Interface: get_left(PNMTextGlyph self)

/**
  • Returns the x coordinate of the leftmost pixel in the glyph.

*/

getRight()

C++ Interface: get_right(PNMTextGlyph self)

/**
  • Returns the x coordinate of the rightmost pixel in the glyph.

*/

getTop()

C++ Interface: get_top(PNMTextGlyph self)

/**
  • Returns the y coordinate of the topmost pixel in the glyph.

*/

getValue()

C++ Interface: get_value(PNMTextGlyph self, int x, int y)

/**
  • Returns the value of the indicated pixel of the glyph. The result is in

  • the range [0, 1], where 0 indicates the pixel is not part of the glyph, and

  • 1 indicates it is. Intermediate values are used to represent antialiasing.

*/

getWidth()

C++ Interface: get_width(PNMTextGlyph self)

/**
  • Returns the width of the glyph in pixels.

*/

get_advance()

C++ Interface: get_advance(PNMTextGlyph self)

/**
  • Returns the number of pixels by which the pen should be advanced after

  • rendering this glyph.

*/

get_bottom()

C++ Interface: get_bottom(PNMTextGlyph self)

/**
  • Returns the y coordinate of the bottommost pixel in the glyph.

*/

get_height()

C++ Interface: get_height(PNMTextGlyph self)

/**
  • Returns the height of the glyph in pixels.

*/

get_interior_flag()

C++ Interface: get_interior_flag(PNMTextGlyph self, int x, int y)

/**
  • Returns true if the indicated pixel represents a pixel in the interior of a

  • hollow font, false otherwise.

*/

get_left()

C++ Interface: get_left(PNMTextGlyph self)

/**
  • Returns the x coordinate of the leftmost pixel in the glyph.

*/

get_right()

C++ Interface: get_right(PNMTextGlyph self)

/**
  • Returns the x coordinate of the rightmost pixel in the glyph.

*/

get_top()

C++ Interface: get_top(PNMTextGlyph self)

/**
  • Returns the y coordinate of the topmost pixel in the glyph.

*/

get_value()

C++ Interface: get_value(PNMTextGlyph self, int x, int y)

/**
  • Returns the value of the indicated pixel of the glyph. The result is in

  • the range [0, 1], where 0 indicates the pixel is not part of the glyph, and

  • 1 indicates it is. Intermediate values are used to represent antialiasing.

*/

get_width()

C++ Interface: get_width(PNMTextGlyph self)

/**
  • Returns the width of the glyph in pixels.

*/

place()

C++ Interface: place(const PNMTextGlyph self, PNMImage dest_image, int xp, int yp, const LVecBase4f fg) place(const PNMTextGlyph self, PNMImage dest_image, int xp, int yp, const LVecBase4f fg, const LVecBase4f interior)

/**
  • Copies the glyph to the indicated destination image at the indicated

  • origin. It colors the glyph pixels the indicated foreground color, blends

  • antialiased pixels with the appropriate amount of the foreground color and

  • the existing background color, and leaves other pixels alone.

*/

/**
  • This flavor of place() also fills in the interior color. This requires

  • that determine_interior was called earlier.

*/