Class TextStyle.Builder
java.lang.Object
lol.trq.helios.text.TextStyle.Builder
- Enclosing class:
TextStyle
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the style.color(int argb) Sets the colour.formatting(boolean on) Sets whether§codes change colour and format, or are drawn as text.letterSpacing(float em) Sets extra space after every character.shadow(TextStyle.Shadow shadow) Sets the shadow.shadowColor(int argb) Sets a fixed shadow colour instead of one derived from the text colour.size(float size) Sets the size.weight(float em) Sets extra stroke weight.
-
Method Details
-
size
Sets the size.- Parameters:
size- the em height in drawing units- Returns:
- this builder
-
color
Sets the colour.- Parameters:
argb- packed0xAARRGGBB- Returns:
- this builder
-
shadow
Sets the shadow.- Parameters:
shadow- the kind- Returns:
- this builder
-
shadowColor
Sets a fixed shadow colour instead of one derived from the text colour.- Parameters:
argb- packed0xAARRGGBB- Returns:
- this builder
-
weight
Sets extra stroke weight.- Parameters:
em- thickening in em, such as 0.02 for semibold; negative thins- Returns:
- this builder
-
letterSpacing
Sets extra space after every character.- Parameters:
em- spacing in em- Returns:
- this builder
-
formatting
Sets whether§codes change colour and format, or are drawn as text.- Parameters:
on- whether codes apply- Returns:
- this builder
-
build
Builds the style.- Returns:
- the style
- Throws:
IllegalArgumentException- if the size is not positive
-