Style
open class Style : Hashable, Equatable
Encapsulates the appearance properties of an element. Implements Hashable and Equatable.
-
Initializes a new instance of the Style class.
Declaration
Swift
public init() -
Initializes a new instance of the Style class from the specified prototype.
Declaration
Swift
public init(prototype: Style)Parameters
prototypeThe Style to use as a prototype.
-
Loads this Style from the specified XML context and element.
Declaration
Swift
open func loadFromXml(_ element: XmlElement?, context: XmlContext)Parameters
elementThe XmlElement, which contains this style. The value can be nil.
contextThe XmlContext, which contains this style.
-
Saves this style into the specified XML element.
Declaration
Swift
open func saveToXml(_ element: XmlElement?)Parameters
elementThe XmlElement, where the Style will be saved. The value can be nil.
-
Checks if there is a back brush associated with this Style.
Declaration
Swift
open func hasBackBrush() -> BoolReturn Value
true if there is a back brush; otherwise false.
-
Checks if the stroke associated with this Style has thickness.
Declaration
Swift
open func hasStrokeThickness() -> BoolReturn Value
true if there is stroke thickness; otherwise false.
-
Checks if there is text color associated with this Style.
Declaration
Swift
open func hasTextColor() -> BoolReturn Value
true if there is text color; otherwise false.
-
Checks if there font name associated with this Style.
Declaration
Swift
open func hasFontName() -> BoolReturn Value
true if there is font name; otherwise false.
-
Checks if there font size associated with this Style.
Declaration
Swift
open func hasFontSize() -> BoolReturn Value
true if there is font size; otherwise false.
-
Checks if there font unit associated with this Style.
Declaration
Swift
open func hasFontUnit() -> BoolReturn Value
true if there is font unit; otherwise false.
-
Checks if this Style defines vertical alignment for text.
Declaration
Swift
open func hasVerticalTextAlignment() -> BoolReturn Value
true if there is vertical alignment for text; otherwise false.
-
Checks if this Style defines horizontal alignment for text.
Declaration
Swift
open func hasHorizontalTextAlignment() -> BoolReturn Value
true if there is horizontal alignment for text; otherwise false.
-
Checks if this Style defines head stroke.
Declaration
Swift
open func hasHeadStroke() -> BoolReturn Value
true if there is head stroke; otherwise false.
-
Checks if this Style defines thickness for the head stroke.
Declaration
Swift
open func hasHeadStrokeThickness() -> BoolReturn Value
true if there is thickness for the head stroke; otherwise false.
-
Declaration
Swift
public func hash(into hasher: inout Hasher) -
Specifies the back brush for this Style.
Declaration
Swift
open var backBrush: Brush? -
Specifies the stroke thickness for this Style.
Declaration
Swift
open var strokeThickness: Double -
Specifies the text color for this Style.
Declaration
Swift
open var textColor: Color -
Specifies the font name for text in this Style.
Declaration
Swift
open var fontName: String -
Specifies the font size for text in this Style.
Declaration
Swift
open var fontSize: Double -
Specifies the font measure unit for text in this Style.
Declaration
Swift
open var fontUnit: MeasureUnit? -
Specifies the vertical alignment for text in this Style.
Declaration
Swift
open var verticalTextAlignment: VerticalAlignment -
Specifies the horizontal alignment for text in this Style.
Declaration
Swift
open var horizontalTextAlignment: HorizontalAlignment -
Specifies the head stroke in this Style.
Declaration
Swift
open var headStroke: Color -
Specifies the thickness for the head stroke.
Declaration
Swift
open var headStrokeThickness: Double
Style Class Reference