Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Utils.StyledText.Definition.STDStyle Class Reference

Styled text definition style. More...

Inheritance diagram for Dragengine.Utils.StyledText.Definition.STDStyle:

Classes

enum  Align
 Text alignment. More...

Public Member Functions

Align getAlignment ()
 Align.
Color getBackgroundColor ()
 Background color.
int getCharacterSpacing ()
 Spacing between characters in pixels.
int getFirstLineIndent ()
 Indention of the first line in pixels.
Font getFont ()
 Font.
int getLineSpacing ()
 Spacing between lines in pixels.
RectArea getMargins ()
 Margins in pixels.
String getName ()
 Name of style.
Color getTextBorderColor ()
 Text border color.
float getTextBorderThickness ()
 Text border thickness in percentage of the font size or null.
Color getTextColor ()
 Text color.
float getTextDilation ()
 Text dilation in percentage of the font size.
STDStyle new (STDStyle style)
 Create copy of style.
STDStyle new (String name)
 Create style.
STDStyle new (String name, DefaultLabelDesigner.LabelStateDesign design)
 Create style using parameters from label designer state design.
STDStyle new (String name, DefaultWidgetDesigner.StateDesign design)
 Create style using parameters from widget designer state design.
STDStyle new (String name, STDStyle style)
 Create copy of style with different name.
void setAlignment (Align alignment)
 Set alignment.
void setBackgroundColor (Color color)
 Set background color.
void setCharacterSpacing (int spacing)
 Set spacing between characters in pixels.
void setFirstLineIndent (int indent)
 Set indention of the first line in pixels.
void setFont (Font font)
 Set font.
void setLineSpacing (int spacing)
 Set spacing between lines in pixels.
void setMargins (RectArea margins)
 Set margins in pixels.
void setTextBorderColor (Color color)
 Set text border color.
void setTextBorderThickness (float thickness)
 Set text border thickness in percentage of the font size or null.
void setTextColor (Color color)
 Set text color.
void setTextDilation (float dilation)
 Set text dilation in percentage of the font size.

Public Attributes

Align pAlignment
int pFirstLineIndent
Font pFont
RectArea pMargins
String pName
float pTextBorderThickness
Color pTextColor

Detailed Description

Styled text definition style.

Defines a style for nodes in a styled text definition. The left and right margins are relative to the left and right page margins of the parent styled text definition object. The top margin is relative to the previous node lower position augmented by the previous node bottom margin. Hence the starting position of a node is the lower boundary of the previous node plus a gap equal to the sum of the previous nodes style bottom margin and this styles top margin.

Member Function Documentation

◆ getAlignment()

Align Dragengine.Utils.StyledText.Definition.STDStyle.getAlignment ( )

Align.

Referenced by setCharacterSpacing().

◆ getBackgroundColor()

Color Dragengine.Utils.StyledText.Definition.STDStyle.getBackgroundColor ( )

Background color.

Referenced by setCharacterSpacing().

◆ getCharacterSpacing()

int Dragengine.Utils.StyledText.Definition.STDStyle.getCharacterSpacing ( )

Spacing between characters in pixels.

Referenced by setCharacterSpacing().

◆ getFirstLineIndent()

int Dragengine.Utils.StyledText.Definition.STDStyle.getFirstLineIndent ( )

Indention of the first line in pixels.

References getName(), and pName.

Referenced by setCharacterSpacing().

◆ getFont()

Font Dragengine.Utils.StyledText.Definition.STDStyle.getFont ( )

Font.

References pName.

Referenced by getLineSpacing().

◆ getLineSpacing()

int Dragengine.Utils.StyledText.Definition.STDStyle.getLineSpacing ( )

Spacing between lines in pixels.

References getFont(), and pFont.

Referenced by setCharacterSpacing().

◆ getMargins()

RectArea Dragengine.Utils.StyledText.Definition.STDStyle.getMargins ( )

Margins in pixels.

References pMargins.

Referenced by setCharacterSpacing().

◆ getName()

String Dragengine.Utils.StyledText.Definition.STDStyle.getName ( )

Name of style.

Referenced by getFirstLineIndent().

◆ getTextBorderColor()

Color Dragengine.Utils.StyledText.Definition.STDStyle.getTextBorderColor ( )

Text border color.

Version
1.35

References pAlignment.

Referenced by setCharacterSpacing().

◆ getTextBorderThickness()

float Dragengine.Utils.StyledText.Definition.STDStyle.getTextBorderThickness ( )

Text border thickness in percentage of the font size or null.

Version
1.35

A good starting value for balanced border size is 0.075 (7.5%) to 0.1 (10%).

References pFont, and pTextColor.

Referenced by setCharacterSpacing().

◆ getTextColor()

Color Dragengine.Utils.StyledText.Definition.STDStyle.getTextColor ( )

Text color.

Referenced by setCharacterSpacing().

◆ getTextDilation()

float Dragengine.Utils.StyledText.Definition.STDStyle.getTextDilation ( )

Text dilation in percentage of the font size.

Version
1.35

References pTextBorderThickness.

Referenced by setCharacterSpacing().

◆ new() [1/5]

STDStyle Dragengine.Utils.StyledText.Definition.STDStyle.new ( STDStyle style)

Create copy of style.

References Dragengine.Gui.Color.black, pMargins, and pTextColor.

◆ new() [2/5]

STDStyle Dragengine.Utils.StyledText.Definition.STDStyle.new ( String name)

◆ new() [3/5]

STDStyle Dragengine.Utils.StyledText.Definition.STDStyle.new ( String name,
DefaultLabelDesigner.LabelStateDesign design )

Create style using parameters from label designer state design.

Allows to derive a style from a designer obtained from a widget.

Uses the parameters "padding", "font", "textColor" and "alignment".

Todo
Support canvas designer as background. This way the canvas creator from the design can be used. Right now Color.transparent is used.

◆ new() [4/5]

STDStyle Dragengine.Utils.StyledText.Definition.STDStyle.new ( String name,
DefaultWidgetDesigner.StateDesign design )

Create style using parameters from widget designer state design.

Allows to derive a style from a designer obtained from a widget.

Uses the parameters "padding", "font" and "textColor".

Todo
Support canvas designer as background. This way the canvas creator from the design can be used. Right now Color.transparent is used.

References pFirstLineIndent, pMargins, and pTextBorderThickness.

◆ new() [5/5]

STDStyle Dragengine.Utils.StyledText.Definition.STDStyle.new ( String name,
STDStyle style )

Create copy of style with different name.

References pAlignment, pFont, pName, and pTextColor.

◆ setAlignment()

void Dragengine.Utils.StyledText.Definition.STDStyle.setAlignment ( Align alignment)

Set alignment.

Referenced by setCharacterSpacing().

◆ setBackgroundColor()

void Dragengine.Utils.StyledText.Definition.STDStyle.setBackgroundColor ( Color color)

Set background color.

References pMargins.

Referenced by setCharacterSpacing().

◆ setCharacterSpacing()

◆ setFirstLineIndent()

void Dragengine.Utils.StyledText.Definition.STDStyle.setFirstLineIndent ( int indent)

Set indention of the first line in pixels.

Referenced by setCharacterSpacing().

◆ setFont()

void Dragengine.Utils.StyledText.Definition.STDStyle.setFont ( Font font)

Set font.

Referenced by setLineSpacing().

◆ setLineSpacing()

void Dragengine.Utils.StyledText.Definition.STDStyle.setLineSpacing ( int spacing)

Set spacing between lines in pixels.

References setFont().

Referenced by setCharacterSpacing().

◆ setMargins()

void Dragengine.Utils.StyledText.Definition.STDStyle.setMargins ( RectArea margins)

Set margins in pixels.

Referenced by setCharacterSpacing().

◆ setTextBorderColor()

void Dragengine.Utils.StyledText.Definition.STDStyle.setTextBorderColor ( Color color)

Set text border color.

Version
1.35

References pAlignment.

Referenced by setCharacterSpacing().

◆ setTextBorderThickness()

void Dragengine.Utils.StyledText.Definition.STDStyle.setTextBorderThickness ( float thickness)

Set text border thickness in percentage of the font size or null.

Version
1.35

A good starting value for balanced border size is 0.075 (7.5%) to 0.1 (10%).

Referenced by setCharacterSpacing().

◆ setTextColor()

void Dragengine.Utils.StyledText.Definition.STDStyle.setTextColor ( Color color)

Set text color.

References pName.

Referenced by setCharacterSpacing().

◆ setTextDilation()

void Dragengine.Utils.StyledText.Definition.STDStyle.setTextDilation ( float dilation)

Set text dilation in percentage of the font size.

Version
1.35

Referenced by setCharacterSpacing().

Member Data Documentation

◆ pAlignment

Align Dragengine.Utils.StyledText.Definition.STDStyle.pAlignment

◆ pFirstLineIndent

int Dragengine.Utils.StyledText.Definition.STDStyle.pFirstLineIndent

Referenced by new(), and setCharacterSpacing().

◆ pFont

Font Dragengine.Utils.StyledText.Definition.STDStyle.pFont

◆ pMargins

RectArea Dragengine.Utils.StyledText.Definition.STDStyle.pMargins

◆ pName

String Dragengine.Utils.StyledText.Definition.STDStyle.pName

◆ pTextBorderThickness

float Dragengine.Utils.StyledText.Definition.STDStyle.pTextBorderThickness

◆ pTextColor

Color Dragengine.Utils.StyledText.Definition.STDStyle.pTextColor

The documentation for this class was generated from the following file: