- ObjectCreate
- ObjectName
- ObjectDelete
- ObjectsDeleteAll
- ObjectFind
- ObjectGetTimeByValue
- ObjectGetValueByTime
- ObjectMove
- ObjectsTotal
- ObjectSetDouble
- ObjectSetInteger
- ObjectSetString
- ObjectGetDouble
- ObjectGetInteger
- ObjectGetString
- TextSetFont
- TextOut
- TextGetSize
TextOut
The function displays a text in a custom array (buffer) and returns the result of that operation. The array is designed to create the graphical resource.
bool TextOut(
|
Parameters
text
[in] Displayed text that will be written to the buffer. Only one-lined text is displayed.
x
[in] X coordinate of the anchor point of the displayed text.
y
[in] Y coordinate of the anchor point of the displayed text.
anchor
[in] The value out of the 9 pre-defined methods of the displayed text's anchor point location. The value is set by a combination of two flags – flags of horizontal and vertical text align. Flag names are listed in the Note below.
data[]
[in] Buffer, in which text is displayed. The buffer is used to create the graphical resource.
width
[in] Buffer width in pixels.
height
[in] Buffer height in pixels.
color
[in] Text color.
color_format
[in] Color format is set by ENUM_COLOR_FORMAT enumeration value.
Return Value
Returns true if successful, otherwise false.
Note
Anchor point specified by anchor is a combination of two flags of horizontal and vertical text align. Horizontal text align flags:
- TA_LEFT – anchor point on the left side of the bounding box
- TA_CENTER – horizontal anchor point is located at the center of the bounding box
- TA_RIGHT – anchor point on the right side of the bounding box
Vertical text align flags:
- TA_TOP – anchor point at the upper side of the bounding box
- TA_VCENTER – vertical anchor point is located at the center of the bounding box
- TA_BOTTOM – anchor point at the lower side of the bounding box
Possible combinations of flags and specified anchor points are shown in the image.
Example:
//--- width and height of the canvas (used for drawing)
|
See also
Resources, ResourceCreate(), ResourceSave(), TextGetSize(), TextSetFont()