ShapeLibrary

open class ShapeLibrary

Represents a library of shapes.

  • Initializes a new instance of the ShapeLibrary class.

    Declaration

    Swift

    public init()

    Return Value

    The newly created ShapeLibrary object.

  • Gets the appropriate Shape from its id.

    Declaration

    Swift

    open func shapeFromId(_ id: String) -> Shape?

    Parameters

    id

    The id of the Shape to search.

    Return Value

    The Shape that corresponds to this id; nil if none is found.

  • Loads this ShapeLibrary from the specified XML context and element. Overrides DiagramItem.loadFromXml.

    Declaration

    Swift

    open func loadFromXml(_ document: XmlElement?, context: XmlContext)

    Parameters

    element

    The XmlElement, which contains this ShapeLibrary. The value can be nil.

    context

    The XmlContext, which contains this ShapeLibrary.

  • An array with all Shape-s.

    Declaration

    Swift

    open var shapes: [String : Shape?]