|
| PFont (byte w, byte h, byte start, byte count, byte *data) |
|
int | getCharWidth (uint32 chr) const override |
|
void | drawChar (Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const override |
|
| DgdsFont (byte w, byte h, byte start, byte count, const byte *glyphs) |
|
virtual int | getFontHeight () const override |
|
virtual int | getMaxCharWidth () const override |
|
virtual Common::String | getFontName () const |
|
virtual int | getFontAscent () const |
|
virtual int | getFontDescent () const |
|
virtual int | getFontLeading () const |
|
virtual int | getKerningOffset (uint32 left, uint32 right) const |
|
virtual Common::Rect | getBoundingBox (uint32 chr) const |
|
Common::Rect | getBoundingBox (const Common::String &str, int x=0, int y=0, const int w=0, TextAlign align=kTextAlignLeft, int deltax=0, bool useEllipsis=false) const |
|
Common::Rect | getBoundingBox (const Common::U32String &str, int x=0, int _y=0, const int w=0, TextAlign align=kTextAlignLeft, int deltax=0, bool useEllipsis=false) const |
|
virtual void | drawChar (ManagedSurface *dst, uint32 chr, int x, int y, uint32 color) const |
|
void | drawString (Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align=kTextAlignLeft, int deltax=0, bool useEllipsis=false) const |
|
void | drawString (Surface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align=kTextAlignLeft, int deltax=0, bool useEllipsis=false) const |
|
void | drawString (ManagedSurface *dst, const Common::String &str, int x, int _y, int w, uint32 color, TextAlign align=kTextAlignLeft, int deltax=0, bool useEllipsis=false) const |
|
void | drawString (ManagedSurface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align=kTextAlignLeft, int deltax=0, bool useEllipsis=false) const |
|
int | getStringWidth (const Common::String &str) const |
|
int | getStringWidth (const Common::U32String &str) const |
|
int | wordWrapText (const Common::String &str, int maxWidth, Common::Array< Common::String > &lines, int initWidth=0, uint32 mode=kWordWrapOnExplicitNewLines) const |
|
int | wordWrapText (const Common::U32String &str, int maxWidth, Common::Array< Common::U32String > &lines, int initWidth=0, uint32 mode=kWordWrapOnExplicitNewLines) const |
|
int | wordWrapText (const Common::U32String &str, int maxWidth, Common::Array< Common::U32String > &lines, Common::Array< bool > &lineContinuation, int initWidth=0, uint32 mode=kWordWrapOnExplicitNewLines) const |
|
void | scaleSingleGlyph (Surface *scaleSurface, int *grayScaleMap, int grayScaleMapSize, int width, int height, int xOffset, int yOffset, int grayLevel, int chr, int srcheight, int srcwidth, float scale) const |
|
void Dgds::PFont::drawChar |
( |
Graphics::Surface * |
dst, |
|
|
uint32 |
chr, |
|
|
int |
x, |
|
|
int |
y, |
|
|
uint32 |
color |
|
) |
| const |
|
overridevirtual |
Draw a character at a specific point on the surface.
Note that the point describes the top left edge point where to draw the character. This can be different from the top left edge point of the character's bounding box. For example, TTF fonts sometimes move characters like 't' by one (or more) pixels to the left to create better visual results. To query the actual bounding box of a character, use getBoundingBox.
- See also
- getBoundingBox
The Font implementation should take care of not drawing outside of the specified surface.
- Parameters
-
dst | The surface to draw on. |
chr | The character to draw. |
x | The x coordinate where to draw the character. |
y | The y coordinate where to draw the character. |
color | The color of the character. |
Implements Graphics::Font.