diff options
author | RichieSams | 2013-09-21 01:43:28 -0500 |
---|---|---|
committer | RichieSams | 2013-09-21 13:37:38 -0500 |
commit | 7a557c4bcd970582fcd28eacb9644bac5714edbf (patch) | |
tree | 815b7b5a399c46ab19ba0268ab1c5a3bba86be03 | |
parent | cfe176619a52de5d31eebbca228639db49110102 (diff) | |
download | scummvm-rg350-7a557c4bcd970582fcd28eacb9644bac5714edbf.tar.gz scummvm-rg350-7a557c4bcd970582fcd28eacb9644bac5714edbf.tar.bz2 scummvm-rg350-7a557c4bcd970582fcd28eacb9644bac5714edbf.zip |
ZVISION: Add documentation to TruetypeFont
-rw-r--r-- | engines/zvision/truetype_font.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/zvision/truetype_font.h b/engines/zvision/truetype_font.h index d35da878ee..c7475d1adb 100644 --- a/engines/zvision/truetype_font.h +++ b/engines/zvision/truetype_font.h @@ -55,7 +55,25 @@ public: int32 _fontHeight; public: + /** + * Loads a .ttf file into memory. This must be called + * before any calls to drawTextToSurface + * + * @param filename The file name of the .ttf file to load + */ bool loadFile(const Common::String &filename); + /** + * Renders the supplied text to a Surface using 0x0 as the + * background color. + * + * @param text The to render + * @param textColor The color to render the text with + * @param maxWidth The max width the text should take up. + * @param maxHeight The max height the text should take up. + * @param align The alignment of the text within the bounds of maxWidth + * @param wrap If true, any words extending past maxWidth will wrap to a new line. If false, ellipses will be rendered to show that the text didn't fit + * @return A Surface containing the rendered text + */ Graphics::Surface *drawTextToSurface(const Common::String &text, uint16 textColor, int maxWidth, int maxHeight, Graphics::TextAlign align, bool wrap); }; |