SVGPath

Concrete implementation that creates a CAShapeLayer from a <path> element and its attributes

  • Initializer to to set the svgLayer‘s cgPath. The path string does not have to be a single path for the whole element, but can include multiple subpaths in the d attribute. For instance, the following is a valid path string to pass:

    <path d="M30 20 L25 15 l10 50z M40 60 l80 10 l 35 55z">
    

    Declaration

    Swift

    init(singlePathString: String)

    Parameters

    singlePathString

    The d attribute value of a <path> element

  • Function that takes a d path string attribute and sets the svgLayer‘s cgPath

    Declaration

    Swift

    internal func parseD(_ pathString: String)