text_params
This type is used to determine text alignment.
Line alignment only makes sense if you have multiple lines in your text. By default, all next lines will start from the left side of the text. You can change this behavior by using one of the functions that take line as a parameter. For example, if you pass right to the line alignment, all next lines will start from the right side. Text alignment will remain as dictated by v and h parameters.
with_v๏ปฟ
Function
Creates text_params instance with vertical alignment.
Arguments
Name
Type
Description
Returns
Type
Description
text_params
Created text params.
Example
local align_top = draw.text_params.with_v(draw.text_alignment.top);with_h๏ปฟ
Function
Creates text_params instance with horizontal alignment.
Arguments
Name
Type
Description
Returns
Type
Description
text_params
Created text params.
Example
with_line๏ปฟ
Function
Creates text_params instance with line alignment.
Arguments
Name
Type
Description
Returns
Type
Description
text_params
Created text params.
Example
with_vh๏ปฟ
Function
Creates text_params instance with vertical and horizontal alignments.
Arguments
Returns
Type
Description
text_params
Created text params.
Example
with_vline๏ปฟ
Function
Creates text_params instance with vertical alignment and line alignment.
Arguments
Returns
Type
Description
text_params
Created text params.
Example
with_hline๏ปฟ
Function
Creates text_params instance with horizontal alignment and line alignment.
Arguments
Returns
Type
Description
text_params
Created text params.
Example
with_vhline๏ปฟ
Function
Creates text_params instance with vertical, horizontal and line alignments.
Arguments
Name
Type
Description
Returns
Type
Description
text_params
Created text params.
Example
Last updated