Protocols

The following protocols are available globally.

  • A protocol that describes an instance that can store bounding box information

    See more

    Declaration

    Swift

    public protocol SVGLayerType
  • A protocol that describes an instance that will delay processing attributes, usually until in didProcessElement(in container: SVGContainerElement?) because either all path information isn’t available or when the element needs to apply an attribute to all subelements.

    See more

    Declaration

    Swift

    public protocol DelaysApplyingAttributes
  • A protocol that described an instance that can be filled. Two default implementations are provided for this protocol:

    1. SVGShapeElement - Will set the fill color, fill opacity, and fill rule on the underlying SVGLayer which is a subclass of CAShapeLayer
    2. SVGGroup - Will set the fill color, fill opacity, and fill rule of all of a SVGGroup‘s subelements
    See more

    Declaration

    Swift

    public protocol Fillable
  • A protocol that described an instance that can be stroked. Two default implementations are provided for this protocol:

    1. SVGShapeElement - Will set the underlying SVGLayer‘s stroke color, width, line cap, line join, and miter limit. Note that SVGLayer is a subclass ofCAShapeLayer, so this default implementation wil;l set theCAShapeLayer's line properties and not theCALayer`’s border attributes.
    2. SVGGroup - The default implementation just saves the attributes and values to be applied after all the subelements have been processed.
    See more

    Declaration

    Swift

    public protocol Strokable
  • A protocol that describes instances whose attributes that can be set vis a css style string. A default implementation is supplied that parses the style string and applies the attributes using the SVGelement‘s supportedAttributes.

    See more

    Declaration

    Swift

    public protocol Stylable
  • A protocol that describes an instance that can be transformed via an SVG element’s transform attribute. Currently, matrix, rotate, scale, skewX, and skewY are supported. A default implementation is supplied for SVGContainerElements that sets the affineTransform of the container layer itself, not on all of its subelements.

    See more

    Declaration

    Swift

    public protocol Transformable
  • A protocol describing an instance that can manage elements that can parse asynchronously. In the NSXMLSVGParser implementation, the parser maintains a simple count of pending asynchronous tasks and decrements the count when an element has finished parsing. When the count has reached zero, a completion block is called

    See more

    Declaration

    Swift

    protocol CanManageAsychronousParsing
  • A protocol describing an instance that parses asynchronously

    See more

    Declaration

    Swift

    protocol ParsesAsynchronously
  • A protocol describing an instance that can parse a single SVG element such as <path>, <svg>, <rect>.

    See more

    Declaration

    Swift

    public protocol SVGElement
  • A protocol that describes an instance that can act as a stack data structure

    See more

    Declaration

    Swift

    protocol StackType
  • A protocol that describes an instance that can process an individual SVG Element

    See more

    Declaration

    Swift

    internal protocol PathCommand : PreviousCommand
  • A protocol that describes an instance that represents an SVGElement right before the current one

    See more

    Declaration

    Swift

    internal protocol PreviousCommand
  • A protocol describing an XML parser capable of parsing SVG data

    See more

    Declaration

    Swift

    public protocol SVGParser