ScummVM API documentation
Graphics::FontKoreanBase Class Referenceabstract

#include <korfont.h>

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

Public Member Functions

virtual void setDrawingMode (DrawingMode mode)
 
virtual void toggleFlippedMode (bool enable)
 
virtual uint getFontHeight () const
 
virtual uint getMaxFontWidth () const
 
virtual uint getCharWidth (uint16 ch) const
 
virtual void drawChar (void *dst, uint16 ch, int pitch, int bpp, uint32 c1, uint32 c2, int maxW, int maxH) const
 
- Public Member Functions inherited from Graphics::FontKorean
virtual bool loadData (const char *fontFile)=0
 
virtual void setDrawingMode (DrawingMode mode)
 
virtual void setCharSpacing (int spacing)
 
virtual void setLineSpacing (int spacing)
 
void drawChar (Graphics::Surface &dst, uint16 ch, int x, int y, uint32 c1, uint32 c2) const
 

Protected Types

enum  DrawingFeature {
  kFeatDefault = 1 << 0, kFeatOutline = 1 << 1, kFeatShadow = 1 << 2, kFeatFMTownsShadow = 1 << 3,
  kFeatFlipped = 1 << 4
}
 

Protected Member Functions

bool isASCII (uint16 ch) const
 
virtual const uint8 * getCharData (uint16 c) const =0
 
virtual bool hasFeature (int feat) const =0
 

Protected Attributes

DrawingMode _drawMode
 
bool _flippedMode
 
int _fontWidth
 
int _fontHeight
 
uint8 _bitPosNewLineMask
 

Additional Inherited Members

- Public Types inherited from Graphics::FontKorean
enum  DrawingMode { kDefaultMode, kOutlineMode, kShadowMode }
 
- Static Public Member Functions inherited from Graphics::FontKorean
static FontKoreancreateFont (const char *fontFile)
 

Detailed Description

A base class to render monochrome Korean fonts.

Member Function Documentation

◆ toggleFlippedMode()

virtual void Graphics::FontKoreanBase::toggleFlippedMode ( bool  enable)
virtual

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 from Graphics::FontKorean.

◆ getFontHeight()

virtual uint Graphics::FontKoreanBase::getFontHeight ( ) const
virtual

Returns the height of the font.

Implements Graphics::FontKorean.

◆ getMaxFontWidth()

virtual uint Graphics::FontKoreanBase::getMaxFontWidth ( ) const
virtual

Returns the max. width of the font.

Implements Graphics::FontKorean.

◆ getCharWidth()

virtual uint Graphics::FontKoreanBase::getCharWidth ( uint16  ch) const
virtual

Returns the width of a specific character.

Implements Graphics::FontKorean.

◆ drawChar()

virtual void Graphics::FontKoreanBase::drawChar ( void *  dst,
uint16  ch,
int  pitch,
int  bpp,
uint32  c1,
uint32  c2,
int  maxW,
int  maxH 
) const
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

Implements Graphics::FontKorean.


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