|
Drag[en]gine Script Module DragonScript 1.35
|
Classes | |
| enum | Align |
| Text alignment. More... | |
Public Member Functions | |
| void | addToCanvas (CanvasView canvas, int x, int y) |
| Align | getAlignment () |
| bool | getAtLeastOneLine () |
| Color | getBorderColor () |
| Border color. | |
| float | getBorderThickness () |
| Border thickness in percentage of the font size or null. | |
| Color | getColor () |
| float | getDilation () |
| Dilation in percentage of the font size. | |
| Font | getFont () |
| int | getHeight () |
| TextLayoutLine | getLine (int index) |
| int | getLineCount () |
| int | getMaximalWidth () |
| String | getText () |
| int | getWidth () |
| void | layoutText () |
| TextLayout | new (String text, Font font) |
| TextLayout | new (TextLayout layout, int width) |
| void | setAlignment (Align alignment) |
| void | setAtLeastOneLine (bool atLastOneLine) |
| void | setBorderColor (Color color) |
| Set border color. | |
| void | setBorderThickness (float thickness) |
| Set border thickness in percentage of the font size or null. | |
| void | setColor (Color color) |
| void | setDilation (float dilation) |
| Set dilation in percentage of the font size. | |
| void | setFont (Font font) |
| void | setMaximalWidth (int width) |
| void | setText (String text) |
Public Attributes | |
| Align | pAlignment |
| bool | pAtLeastOneLine |
| float | pBorderThickness |
| Color | pColor |
| Font | pFont |
| Array | pLines |
| String | pText |
| int | pWidth |
Takes a text and formats it to fit into a predefined area. Help creating canvas for rendering.
| void Dragengine.Utils.TextLayout.addToCanvas | ( | CanvasView | canvas, |
| int | x, | ||
| int | y ) |
Add canvas for each line. Canvas has to be of type Canvas.VIEW. Caller is responsible to remove all canvas if required.
References addToCanvas(), getAtLeastOneLine(), getDilation(), getHeight(), getLine(), getLineCount(), getMaximalWidth(), getWidth(), layoutText(), pAlignment, pAtLeastOneLine, pBorderThickness, pFont, pLines, pText, pWidth, setAtLeastOneLine(), setBorderThickness(), setDilation(), and setMaximalWidth().
Referenced by addToCanvas().
| Align Dragengine.Utils.TextLayout.getAlignment | ( | ) |
Align.of text.
Referenced by setBorderColor().
| bool Dragengine.Utils.TextLayout.getAtLeastOneLine | ( | ) |
| Color Dragengine.Utils.TextLayout.getBorderColor | ( | ) |
| float Dragengine.Utils.TextLayout.getBorderThickness | ( | ) |
Border thickness in percentage of the font size or null.
A good starting value for balanced border size is 0.075 (7.5%) to 0.1 (10%).
References getFont(), pAlignment, and setAlignment().
Referenced by layoutText().
| Color Dragengine.Utils.TextLayout.getColor | ( | ) |
Referenced by setDilation().
| float Dragengine.Utils.TextLayout.getDilation | ( | ) |
| Font Dragengine.Utils.TextLayout.getFont | ( | ) |
| int Dragengine.Utils.TextLayout.getHeight | ( | ) |
Height of the layout text.
Referenced by addToCanvas().
| TextLayoutLine Dragengine.Utils.TextLayout.getLine | ( | int | index | ) |
Line by index.
Referenced by addToCanvas().
| int Dragengine.Utils.TextLayout.getLineCount | ( | ) |
| int Dragengine.Utils.TextLayout.getMaximalWidth | ( | ) |
| String Dragengine.Utils.TextLayout.getText | ( | ) |
Layout text.
Referenced by setColor().
| int Dragengine.Utils.TextLayout.getWidth | ( | ) |
Width of the layout text.
Referenced by addToCanvas().
| void Dragengine.Utils.TextLayout.layoutText | ( | ) |
| TextLayout Dragengine.Utils.TextLayout.new | ( | String | text, |
| Font | font ) |
| TextLayout Dragengine.Utils.TextLayout.new | ( | TextLayout | layout, |
| int | width ) |
Creates a new TextLayout object using the attributes stored in another TextLayout object but using a different max width.
References pAlignment, pColor, pFont, and pLines.
| void Dragengine.Utils.TextLayout.setAlignment | ( | Align | alignment | ) |
| void Dragengine.Utils.TextLayout.setAtLeastOneLine | ( | bool | atLastOneLine | ) |
| void Dragengine.Utils.TextLayout.setBorderColor | ( | Color | color | ) |
Set border color.
References getAlignment(), pAlignment, and pText.
Referenced by getLineCount().
| void Dragengine.Utils.TextLayout.setBorderThickness | ( | float | thickness | ) |
Set border thickness in percentage of the font size or null.
A good starting value for balanced border size is 0.075 (7.5%) to 0.1 (10%).
References pFont, and setFont().
Referenced by addToCanvas().
| void Dragengine.Utils.TextLayout.setColor | ( | Color | color | ) |
| void Dragengine.Utils.TextLayout.setDilation | ( | float | dilation | ) |
Set dilation in percentage of the font size.
References getColor(), and pColor.
Referenced by addToCanvas().
| void Dragengine.Utils.TextLayout.setFont | ( | Font | font | ) |
| void Dragengine.Utils.TextLayout.setMaximalWidth | ( | int | width | ) |
Set maximal text width.
Referenced by addToCanvas().
| void Dragengine.Utils.TextLayout.setText | ( | String | text | ) |
Set layout text.
Referenced by getBorderColor().
| Align Dragengine.Utils.TextLayout.pAlignment |
Referenced by addToCanvas(), getBorderThickness(), getFont(), new(), and setBorderColor().
| bool Dragengine.Utils.TextLayout.pAtLeastOneLine |
Referenced by addToCanvas().
| float Dragengine.Utils.TextLayout.pBorderThickness |
Referenced by addToCanvas(), layoutText(), and setFont().
| Color Dragengine.Utils.TextLayout.pColor |
Referenced by getAtLeastOneLine(), new(), setDilation(), and setFont().
| Font Dragengine.Utils.TextLayout.pFont |
Referenced by addToCanvas(), getDilation(), getFont(), new(), and setBorderThickness().
| Array Dragengine.Utils.TextLayout.pLines |
Referenced by addToCanvas(), getFont(), and new().
| String Dragengine.Utils.TextLayout.pText |
Referenced by addToCanvas(), new(), setAlignment(), setBorderColor(), and setColor().
| int Dragengine.Utils.TextLayout.pWidth |
Referenced by addToCanvas().