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(com.aspose.ms.System.Drawing.Color foregroundColor) |
TextState(Color foregroundColor,
double fontSize)
Creates text state object with foreground color and font size specification.
|
TextState(com.aspose.ms.System.Drawing.Color foregroundColor,
double fontSize) |
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.
|
com.aspose.ms.System.Drawing.Color |
getBackgroundColor()
Sets background color of the text.
|
float |
getCharacterSpacing()
Gets character spacing 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() |
float |
getLineSpacing()
Gets or sets
Note that the value is not preserved as a text characteristic within the document.
|
boolean |
getUnderline()
Sets underline for the text, represented by the
TextFragment object |
float |
getWordSpacing() |
void |
setBackgroundColor(Color value)
Sets background color 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
- public TextState(Color foregroundColor)
Creates text state object with foreground color specification.
foregroundColor
- public TextState(com.aspose.ms.System.Drawing.Color foregroundColor)
public TextState(Color foregroundColor, double fontSize)
Creates text state object with foreground color and font size specification.
foregroundColor
- fontSize
- public TextState(com.aspose.ms.System.Drawing.Color foregroundColor, double fontSize)
public TextState(String fontFamily)
Creates text state object with font family specification.
fontFamily
- public TextState(String fontFamily, boolean bold, boolean italic)
Creates text state object with font family and font style specification.
fontFamily
- bold
- italic
- public TextState(String fontFamily, double fontSize)
Creates text state object with font family and font size specification.
fontFamily
- fontSize
- public void applyChangesFrom(TextState textState)
Applies settings from another textState
textState
- public float getCharacterSpacing()
Gets character spacing of the text.
public void setCharacterSpacing(float value)
public float getLineSpacing()
public void setLineSpacing(float value)
public float getHorizontalScaling()
public void setHorizontalScaling(float value)
public float getWordSpacing()
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 void setBackgroundColor(Color value)
Sets background color of the text.
public com.aspose.ms.System.Drawing.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 © 2020 Aspose. All Rights Reserved.