Transformable

public protocol Transformable

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.

  • layerToTransform Extension method

    Default implementation for a SVGContainerElement that transforms the containerLayer

    Declaration

    Swift

    var layerToTransform: CALayer { get }
  • layerToTransform Extension method

    Default implementation for a SVGShapeElement that transforms the svgLayer

    Declaration

    Swift

    var layerToTransform: CALayer { get }
  • transformAttributes Extension method

    The curried function to be used for the SVGElement‘s default implementation. This dictionary is meant to be used in the SVGParserSupportedElements instance

    Declaration

    Swift

    var transformAttributes: [String : (String) -> ()] { get }

    Parameters

    Key

    The SVG string value of the attribute

    Value

    A curried function to use to implement the SVG attribute

  • transformAttributes Extension method

    The curried function to be used for the SVGElement‘s default implementation. This dictionary is meant to be used in the SVGParserSupportedElements instance

    Declaration

    Swift

    var transformAttributes: [String : (String) -> ()] { get }

    Parameters

    Key

    The SVG string value of the attribute

    Value

    A curried function to use to implement the SVG attribute

  • transform(_:) Extension method

    Parses and applies the SVG transform string to this SVGElement‘s SVGLayer. Can parse multiple transforms separated by spaces

    Declaration

    Swift

    func transform(_ transformString: String)