#include <korfont.h>
Public Types | |
enum | DrawingMode { kDefaultMode, kOutlineMode, kShadowMode } |
Public Member Functions | |
virtual bool | loadData (const char *fontFile)=0 |
virtual void | setDrawingMode (DrawingMode mode) |
virtual void | toggleFlippedMode (bool enable) |
virtual void | setCharSpacing (int spacing) |
virtual void | setLineSpacing (int spacing) |
virtual uint | getFontHeight () const =0 |
virtual uint | getMaxFontWidth () const =0 |
virtual uint | getCharWidth (uint16 ch) const =0 |
void | drawChar (Graphics::Surface &dst, uint16 ch, int x, int y, uint32 c1, uint32 c2) const |
virtual void | drawChar (void *dst, uint16 ch, int pitch, int bpp, uint32 c1, uint32 c2, int maxW, int maxH) const =0 |
Static Public Member Functions | |
static FontKorean * | createFont (const char *fontFile) |
A font that is able to draw Korean encoded characters.
Enable drawing with outline or shadow if supported by the Font.
After changing outline state, getFontHeight and getMaxFontWidth / getCharWidth might return different values!
|
static |
Creates the first Korean font, which ROM/font file is present. It will also call loadData, so the user can just start using the font.
The last file tried is ScummVM's Korean.FNT file.
|
pure virtual |
Load the font data.
Implemented in Graphics::FontKoreanWansung, and Graphics::FontKoreanSVM.
|
inlinevirtual |
Enable flipped character drawing if supported by the Font (e.g. in the MI1 circus scene after Guybrush gets shot out of the cannon).
Reimplemented in Graphics::FontKoreanBase.
|
inlinevirtual |
Set spacing between characters and lines. This affects font height / char width
|
pure virtual |
Returns the height of the font.
Implemented in Graphics::FontKoreanBase.
|
pure virtual |
Returns the max. width of the font.
Implemented in Graphics::FontKoreanBase.
|
pure virtual |
Returns the width of a specific character.
Implemented in Graphics::FontKoreanBase.
void Graphics::FontKorean::drawChar | ( | Graphics::Surface & | dst, |
uint16 | ch, | ||
int | x, | ||
int | y, | ||
uint32 | c1, | ||
uint32 | c2 | ||
) | const |
Draws a Korean encoded character on the given surface.
|
pure virtual |
Draws a Korean char on the given raw buffer.
dst | pointer to the destination |
ch | character to draw (in little endian) |
pitch | pitch of the destination buffer (size in bytes) |
bpp | bytes per pixel of the destination buffer |
c1 | forground color |
c2 | outline color |
maxW | max draw width (to ensure that character drawing takes place within surface boundaries), -1 = no check |
maxH | max draw height (to ensure that character drawing takes place within surface boundaries), -1 = no check |
Implemented in Graphics::FontKoreanBase.