SVGElement

public protocol SVGElement

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

  • The element name as defined in the SVG specification

    See also

    Official SVG Element Names

    Declaration

    Swift

    static var elementName: String { get }
  • Dictionary of attributes of a given element that are supported by the SVGParser. Keys are the name of an element’s attribute such as d, fill, and rx. Values are a closure that is used to process the given attribute.

    Declaration

    Swift

    var supportedAttributes: [String : (String) -> ()] { get set }
  • An action to perform once the parser has dispatched all attributes to a given SVGElement instance

    Note

    If using the default NSXMLSVGParser and the element parses asynchronously, there is no guarantee that the instance will be finished processing all the attribites when this is called.

    Declaration

    Swift

    func didProcessElement(in container: SVGContainerElement?)