ScummVM API documentation

Description

API for representing and managing fonts on the screen.

Classes

class  Graphics::Font
 

Enumerations

enum  Graphics::TextAlign {
  Graphics::kTextAlignInvalid, Graphics::kTextAlignStart, Graphics::kTextAlignLeft, Graphics::kTextAlignCenter,
  Graphics::kTextAlignEnd, Graphics::kTextAlignRight
}
 
enum  Graphics::WordWrapMode { Graphics::kWordWrapDefault = 0, Graphics::kWordWrapEvenWidthLines = 1 << 0, Graphics::kWordWrapOnExplicitNewLines = 1 << 1, Graphics::kWordWrapAllowTrailingWhitespace = 1 << 2 }
 

Functions

TextAlign Graphics::convertTextAlignH (TextAlign alignH, bool rtl)
 

Enumeration Type Documentation

◆ TextAlign

Text alignment modes.

Enumerator
kTextAlignInvalid 

Indicates invalid alignment.

kTextAlignStart 

Align the text to start of line (virtual).

kTextAlignLeft 

Align the text to the left.

kTextAlignCenter 

Center the text.

kTextAlignEnd 

Align the text to end of line (virtual).

kTextAlignRight 

Align the text to the right.

◆ WordWrapMode

Word wrapping modes.

Enumerator
kWordWrapDefault 

Default wrapping mode.

kWordWrapEvenWidthLines 

Make the resulting line segments close to the same width.

kWordWrapOnExplicitNewLines 

Text is wrapped on new lines. Otherwise, treats them as single whitespace.

kWordWrapAllowTrailingWhitespace 

Allow any amount of trailing whitespace before wrapping as it won't be drawn.

Function Documentation

◆ convertTextAlignH()

TextAlign Graphics::convertTextAlignH ( TextAlign  alignH,
bool  rtl 
)

Convert virtual text alignments (start + end) to actual text alignment (left + right + center) for drawing.

If actual text alignment is provided, it is returned as-is.

Parameters
alignHThe horizontal alignment to convert.
rtlIndicates whether this is an RTL (right-to-left) language (such as Hebrew), or a left-to-right language (such as English).