Class TextStyle
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
TextStyle(fontName, fontSize, bold, italic, alignment)
Creates a text style from its font's name, its size, style and alignment.
|
Method Attributes | Method Name and Description |
---|---|
deriveBoldStyle(bold)
Returns a derived style of this text style with a given bold style.
|
|
deriveItalicStyle(italic)
Returns a derived style of this text style with a given italic style.
|
|
deriveStyle(fontName)
Returns a derived style of this text style with a given font name.
|
|
equals(object)
Returns
true if this text style is equal to object . |
|
Returns the alignment applied on text using this style.
|
|
Returns the font name of this text style.
|
|
Returns the font size of this text style.
|
|
hashCode()
Returns a hash code for this text style.
|
|
isBold()
Returns whether this text style is bold or not.
|
|
isItalic()
Returns whether this text style is italic or not.
|
Class Detail
TextStyle(fontName, fontSize, bold, italic, alignment)
Creates a text style from its font's name, its size, style and alignment.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {string} fontName
- {number} fontSize
- {boolean} bold
- {boolean} italic
- {TextStyle.Alignment} alignment
Method Detail
{TextStyle}
deriveBoldStyle(bold)
Returns a derived style of this text style with a given bold style.
- Parameters:
- {boolean} bold
- Returns:
- {TextStyle}
{TextStyle}
deriveItalicStyle(italic)
Returns a derived style of this text style with a given italic style.
- Parameters:
- {boolean} italic
- Returns:
- {TextStyle}
{TextStyle}
deriveStyle(fontName)
Returns a derived style of this text style with a given font name.
- Parameters:
- {string} fontName
- Returns:
- {TextStyle}
{boolean}
equals(object)
Returns
true
if this text style is equal to object
.
- Parameters:
- {Object} object
- Returns:
- {boolean}
{TextStyle.Alignment}
getAlignment()
Returns the alignment applied on text using this style.
- Returns:
- {TextStyle.Alignment}
{string}
getFontName()
Returns the font name of this text style.
- Returns:
- {string}
{number}
getFontSize()
Returns the font size of this text style.
- Returns:
- {number}
{number}
hashCode()
Returns a hash code for this text style.
- Returns:
- {number}
{boolean}
isBold()
Returns whether this text style is bold or not.
- Returns:
- {boolean}
{boolean}
isItalic()
Returns whether this text style is italic or not.
- Returns:
- {boolean}