Shape
open class Shape
Represents a diagram shape.
-
Loads this Shape from the specified XML context and element.
Declaration
Swift
open func loadFromXml(_ element: XmlElement?, context: XmlContext)Parameters
elementThe XmlElement, which contains this Shape. The value can be nil.
contextThe XmlContext, which contains this Shape.
-
Fills the Shape.
Declaration
Swift
public func fillShape(_ canvas: Canvas, elements: [ShapeSegment?], targetRect: Rect)Parameters
canvasThe canvas where the Shape is drawn.
elementsAn array with ShapeSegment objects that build this Shape.
targetRectThe rectangle where the Shape is drawn.
-
Loads the segments of this Shape from the specified XmlElement.
Declaration
Swift
open func loadSegments(_ xmlRoot: XmlElement?, elementName: String) -> [ShapeSegment?]Parameters
xmlRootThe XmlElement, which is the root.
elementNameThe name of the element to load.
Return Value
An array with ShapeSegment objects; nil if none are loaded.
-
Undocumented
Declaration
Swift
public static func fromId(id: String) -> Shape? -
Gets or sets the id of the Shape.
Declaration
Swift
open var id: String -
Gets or sets the outline of the Shape. An array of ShapeSegment objects.
Declaration
Swift
open var outline: [ShapeSegment?] -
Gets or sets the decorations of the Shape. An array of ShapeSegment objects.
Declaration
Swift
open var decorations: [ShapeSegment?] -
Gets or sets the filled decorations of the Shape. An array of ShapeSegment objects.
Declaration
Swift
open var filledDecorations: [[ShapeSegment?]] -
Gets or sets the inset of the link segment.
Declaration
Swift
open var linkSegmentInset: Double
Shape Class Reference