ShapeNode
open class ShapeNode : DiagramNode
ShapeNode instances are diagram nodes that represent geometric shapes.
-
Initializes a new instance of the ShapeNode class.
Declaration
Swift
public override init()Return Value
The newly created ShapeNode object.
-
Draws the node using the specified canvas object.
Declaration
Swift
open override func drawLocal(_ canvas: Canvas, options: RenderOptions) -
Makes the shape node big enough to display its text without clipping.
Declaration
Swift
public func resizeToFitText() -
Loads this shape node from the specified XML context and element. Overrides DiagramNode.loadFromXml.
Declaration
Swift
open override func loadFromXml(_ element: XmlElement, context: XmlContext)Parameters
elementThe XmlElement, which contains this shape node.
contextThe XmlContext, which contains this shape node.
-
Saves this shape node into the specified XML context and element. Overrides DiagramNode.saveToXml.
Declaration
Swift
open override func saveToXml(_ element: XmlElement, context: XmlContext)Parameters
elementThe XmlElement, where the shape node will be saved.
contextThe XmlContext, where the shape node will be saved.
-
Create state storage for the diagram item.
Declaration
Swift
open override func createState() -> DiagramItemState -
Saves the state of the diagram item.
Declaration
Swift
open override func saveState() -> DiagramItemState -
Restores the state of the diagram item.
Declaration
Swift
open override func restoreState(_ state: DiagramItemState) -
Saves the state of this node. Overrides DiagramNode.saveState.
Declaration
Swift
open override func saveLocationState() -> DiagramItemState -
Restores the state of the diagram item.
Declaration
Swift
open override func restoreLocationState(_ state: DiagramItemState) -
Gets the id for the class. Overrides DiagramNode.getClassId.
Declaration
Swift
open override func getClassId() -> StringReturn Value
The id of the class.
-
Looks for a
Stylethat defines an appearance property’s value in specifiedTheme. OverridesDiagramNode.resolveInheritedStyle(...).Declaration
Swift
open override func resolveInheritedStyle(_ check: StyleCheck, theme: Theme?) -> Style?Parameters
checkA
StyleCheckpredicate that verifies if property is set.Return Value
The
Styleif resolved, or nil otherwise. -
Undocumented
Declaration
Swift
public var flipX: Bool { get set } -
Undocumented
Declaration
Swift
public var flipY: Bool { get set } -
Undocumented
Declaration
Swift
public var allowFlip: Bool -
Specifies the image of this ShapeNode. The value can be nil.
Declaration
Swift
open var image: UIImage? -
Specifies the ImageAlign of this ShapeNode.
Declaration
Swift
open var imageAlign: ImageAlign -
Gets or sets a value indicating whether this shape node is transparent.
Declaration
Swift
open var transparent: Bool
ShapeNode Class Reference