TSdlTtfSurfaceTextEngine
A text engine for drawing text on SDL surfaces.
Definition
Unit: Neslib.Sdl3.Ttf
Inheritance
Inherits: TSdlTtfTextEngine
See Also
Constructors
Name | Description |
---|---|
Create | Create a text engine for drawing text on SDL surfaces. |
Methods
Name | Description |
---|---|
DestroyHandle | |
Draw(TSdlTtfText, TSdlPoint, TSdlSurface) | Draw text to an SDL surface. |
Draw(TSdlTtfText, Integer, Integer, TSdlSurface) | Draw text to an SDL surface. |
Constructor Descriptions
Create
Create a text engine for drawing text on SDL surfaces.
constructor Create
Exceptions
ESdlError
: Raised on failure.
Remarks
It is safe to call this constructor from any thread.
Method Descriptions
DestroyHandle
procedure DestroyHandle; override
Draw(TSdlTtfText, TSdlPoint, TSdlSurface)
Draw text to an SDL surface.
AText
must have been created using TSdlTtfSurfaceTextEngine.
procedure Draw(const AText: TSdlTtfText; const APosition: TSdlPoint; const ASurface: TSdlSurface); overload; inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AText
: TSdlTtfText
: The text to draw.
APosition
: TSdlPoint
: The coordinate in pixels, positive from the top-left edge towards the bottom-right.
ASurface
: TSdlSurface
: The surface to draw on.
Remarks
This function should be called on the thread that created the text.
Draw(TSdlTtfText, Integer, Integer, TSdlSurface)
Draw text to an SDL surface.
AText
must have been created using TSdlTtfSurfaceTextEngine.
procedure Draw(const AText: TSdlTtfText; const AX, AY: Integer; const ASurface: TSdlSurface); overload; inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AText
: TSdlTtfText
: The text to draw.
AX
: Integer
: The x coordinate in pixels, positive from the left edge towards the right.
AY
: Integer
: The y coordinate in pixels, positive from the top edge towards the bottom.
ASurface
: TSdlSurface
: The surface to draw on.
Remarks
This function should be called on the thread that created the text.