Font.render - multiple declarations
Function Font.render
Wraps TTF_RenderGlyph_Solid, TTF_RenderGlyph_Shaded, TTF_RenderGlyph_Blended, and additionally
TTF_RenderGlyph_LCD (from SDL_ttf 2.20) to render a glyph in the Font
Surface render
(
wchar glyph,
Color foreground,
Color background = Color(SDL_Color(cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u)) .this(cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u),
RenderQuality quality = RenderQuality .shaded
) @trusted const;
Parameters
| Name | Description |
|---|---|
| glyph | wchar glyph to render |
| foreground | foreground dsdl of the glyph |
| background | background dsdl of the resulted surface (only for RenderQuality and
RenderQuality) |
| quality | RenderQuality of the resulted render |
Returns
dsdl containing the rendered glyph
Throws
dsdl if failed to render glyph
Function Font.render
Wraps TTF_RenderGlyph32_Solid, TTF_RenderGlyph32_Shaded, TTF_RenderGlyph32_Blended (from SDL_ttf
2.0.18), and additionally TTF_RenderGlyph32_LCD (from SDL_ttf 2.20) to render a glyph in the
Font
Surface render
(
dchar glyph,
Color foreground,
Color background = Color(SDL_Color(cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u)) .this(cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u),
RenderQuality quality = RenderQuality .shaded
) @trusted const;
Parameters
| Name | Description |
|---|---|
| glyph | dchar glyph to render |
| foreground | foreground dsdl of the glyph |
| background | background dsdl of the resulted surface (only for RenderQuality and
RenderQuality) |
| quality | RenderQuality of the resulted render |
Returns
dsdl containing the rendered glyph
Throws
dsdl if failed to render glyph
Function Font.render
Wraps TTF_RenderUTF8_Solid, TTF_RenderUTF8_Shaded, TTF_RenderUTF8_Blended, and additionally
TTF_RenderUTF8_LCD (from SDL_ttf 2.20), as well as TTF_RenderUTF8_Solid_Wrapped,
TTF_RenderUTF8_Shaded_Wrapped, TTF_RenderUTF8_Blended_Wrapped (from SDL_ttf 2.0.18),
and TTF_RenderUTF8_LCD_Wrapped (from SDL_ttf 2.20) to render a text string in the Font
Surface render
(
string text,
Color foreground,
Color background = Color(SDL_Color(cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u)) .this(cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u),
RenderQuality quality = RenderQuality .shaded,
uint wrapLength = 4294967295u
) @trusted const;
Parameters
| Name | Description |
|---|---|
| text | string text to render |
| foreground | foreground dsdl of the text |
| background | background dsdl of the resulted surface (only for RenderQuality and
RenderQuality) |
| quality | RenderQuality of the resulted render |
| wrapLength | maximum width in pixels for wrapping text to the new line; 0 to only wrap on line breaks
(wrapping only available from SDL_ttf 2.0.18) |
Returns
dsdl containing the rendered text
Throws
dsdl if failed to render text
Function Font.render
Wraps TTF_RenderUNICODE_Solid, TTF_RenderUNICODE_Shaded, TTF_RenderUNICODE_Blended, and additionally
TTF_RenderUNICODE_LCD (from SDL_ttf 2.20), as well as TTF_RenderUNICODE_Solid_Wrapped,
TTF_RenderUNICODE_Shaded_Wrapped, TTF_RenderUNICODE_Blended_Wrapped (from SDL_ttf 2.0.18),
and TTF_RenderUNICODE_LCD_Wrapped (from SDL_ttf 2.20) to render a text string in the Font
Surface render
(
wstring text,
Color foreground,
Color background = Color(SDL_Color(cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u)) .this(cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u),
RenderQuality quality = RenderQuality .shaded,
uint wrapLength = 4294967295u
) @trusted const;
Parameters
| Name | Description |
|---|---|
| text | wstring text to render |
| foreground | foreground dsdl of the text |
| background | background dsdl of the resulted surface (only for RenderQuality and
RenderQuality) |
| quality | RenderQuality of the resulted render |
| wrapLength | maximum width in pixels for wrapping text to the new line; 0 to only wrap on line breaks
(wrapping only available from SDL_ttf 2.0.18) |
Returns
dsdl containing the rendered text
Throws
dsdl if failed to render text