ScummVM API documentation
Graphics::FontKorean Class Referenceabstract

#include <korfont.h>

Inheritance diagram for Graphics::FontKorean:
Graphics::FontKoreanBase Graphics::FontKoreanSVM Graphics::FontKoreanWansung

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 FontKoreancreateFont (const char *fontFile)
 

Detailed Description

A font that is able to draw Korean encoded characters.

Member Enumeration Documentation

◆ DrawingMode

Enable drawing with outline or shadow if supported by the Font.

After changing outline state, getFontHeight and getMaxFontWidth / getCharWidth might return different values!

Member Function Documentation

◆ createFont()

static FontKorean* Graphics::FontKorean::createFont ( const char *  fontFile)
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.

◆ loadData()

virtual bool Graphics::FontKorean::loadData ( const char *  fontFile)
pure virtual

Load the font data.

Implemented in Graphics::FontKoreanWansung, and Graphics::FontKoreanSVM.

◆ toggleFlippedMode()

virtual void Graphics::FontKorean::toggleFlippedMode ( bool  enable)
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.

◆ setCharSpacing()

virtual void Graphics::FontKorean::setCharSpacing ( int  spacing)
inlinevirtual

Set spacing between characters and lines. This affects font height / char width

◆ getFontHeight()

virtual uint Graphics::FontKorean::getFontHeight ( ) const
pure virtual

Returns the height of the font.

Implemented in Graphics::FontKoreanBase.

◆ getMaxFontWidth()

virtual uint Graphics::FontKorean::getMaxFontWidth ( ) const
pure virtual

Returns the max. width of the font.

Implemented in Graphics::FontKoreanBase.

◆ getCharWidth()

virtual uint Graphics::FontKorean::getCharWidth ( uint16  ch) const
pure virtual

Returns the width of a specific character.

Implemented in Graphics::FontKoreanBase.

◆ drawChar() [1/2]

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.

◆ drawChar() [2/2]

virtual void Graphics::FontKorean::drawChar ( void *  dst,
uint16  ch,
int  pitch,
int  bpp,
uint32  c1,
uint32  c2,
int  maxW,
int  maxH 
) const
pure virtual

Draws a Korean char on the given raw buffer.

Parameters
dstpointer to the destination
chcharacter to draw (in little endian)
pitchpitch of the destination buffer (size in bytes)
bppbytes per pixel of the destination buffer
c1forground color
c2outline color
maxWmax draw width (to ensure that character drawing takes place within surface boundaries), -1 = no check
maxHmax draw height (to ensure that character drawing takes place within surface boundaries), -1 = no check

Implemented in Graphics::FontKoreanBase.


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