public class TextState extends Object
Represents a text state of a text
Constructor and Description |
---|
TextState()
Creates text state object.
|
TextState(Color foregroundColor)
Creates text state object with foreground color specification.
|
TextState(Color foregroundColor,
double fontSize)
Creates text state object with foreground color and font size specification.
|
TextState(double fontSize)
Creates text state object with font size specification.
|
TextState(String fontFamily)
Creates text state object with font family specification.
|
TextState(String fontFamily,
boolean bold,
boolean italic)
Creates text state object with font family and font style specification.
|
TextState(String fontFamily,
double fontSize)
Creates text state object with font family and font size specification.
|
Modifier and Type | Method and Description |
---|---|
void |
applyChangesFrom(TextState textState)
Applies settings from another textState
|
double |
calculateFontSize(String str,
Rectangle rect)
Calculates the font size for the rectangle.
|
Color |
getBackgroundColor()
Sets background color of the text.
|
Font |
getFont()
Gets or sets font of the text.
|
float |
getFontSize()
Gets or sets font size of the text.
|
Color |
getForegroundColor()
Gets or sets foreground color of the text.
|
int |
getHorizontalAlignment()
Gets or sets horizontal alignment for the text.
|
float |
getHorizontalScaling()
Gets or sets horizontal scaling of the text.
|
float |
getLineSpacing()
Gets or sets line spacing of the text.
|
boolean |
getUnderline()
Sets underline for the text, represented by the
TextFragment object |
float |
getWordSpacing()
Gets or sets word spacing of the text.
|
void |
setBackgroundColor(Color value) |
void |
setCharacterSpacing(float value) |
void |
setFont(Font value) |
void |
setFontSize(float value) |
void |
setFontStyle(int value)
Sets font style of the text.
|
void |
setForegroundColor(Color value) |
void |
setHorizontalAlignment(int value) |
void |
setHorizontalScaling(float value) |
void |
setLineSpacing(float value) |
void |
setUnderline(boolean value) |
void |
setWordSpacing(float value) |
public TextState()
Creates text state object.
public TextState(double fontSize)
Creates text state object with font size specification.
fontSize
- Font size.public TextState(Color foregroundColor)
Creates text state object with foreground color specification.
foregroundColor
- Foreground color.public TextState(Color foregroundColor, double fontSize)
Creates text state object with foreground color and font size specification.
foregroundColor
- Foreground color.fontSize
- Font size.public TextState(String fontFamily)
Creates text state object with font family specification.
fontFamily
- Font family.public TextState(String fontFamily, boolean bold, boolean italic)
Creates text state object with font family and font style specification.
fontFamily
- Font family.bold
- Bold font style.italic
- Italic font style.public TextState(String fontFamily, double fontSize)
Creates text state object with font family and font size specification.
fontFamily
- Font family.fontSize
- Font size.public void applyChangesFrom(TextState textState)
Applies settings from another textState
textState
- textState
- Text state object.public void setCharacterSpacing(float value)
public float getLineSpacing()
Gets or sets line spacing of the text.
public void setLineSpacing(float value)
public float getHorizontalScaling()
Gets or sets horizontal scaling of the text.
public void setHorizontalScaling(float value)
public float getWordSpacing()
Gets or sets word spacing of the text.
public void setWordSpacing(float value)
public float getFontSize()
Gets or sets font size of the text.
public void setFontSize(float value)
public Font getFont()
Gets or sets font of the text.
public void setFont(Font value)
public Color getForegroundColor()
Gets or sets foreground color of the text.
public void setForegroundColor(Color value)
public boolean getUnderline()
Sets underline for the text, represented by the TextFragment
object
public void setUnderline(boolean value)
public Color getBackgroundColor()
Sets background color of the text.
public void setBackgroundColor(Color value)
public void setFontStyle(int value)
Sets font style of the text.
public int getHorizontalAlignment()
Gets or sets horizontal alignment for the text.
public void setHorizontalAlignment(int value)
Copyright © 2014 Aspose. All Rights Reserved.