Fillable

public protocol Fillable

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
  • fillAttributes Extension method

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

    Declaration

    Swift

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

    Parameters

    Key

    The SVG string value of the attribute

    Value

    A curried function to use to implement the SVG attribute

  • fill(fillColor:) Extension method

    Sets the fill color of the underlying SVGLayer

    See also

    CAShapeLayer’s fillColor

    Declaration

    Swift

    func fill(fillColor: String)
  • fillRule(fillRule:) Extension method

    Sets the fill rule of the underlying SVGLayer. CAShapeLayers have 2 possible values: non-zero (default), and evenodd

    See also

    Core Animation’s Shape Fill Mode Value

    Declaration

    Swift

    func fillRule(fillRule: String)
  • fillOpacity(opacity:) Extension method

    Sets the fill opacity of the underlying SVGLayer through its CGColor, not the CALayer’s opacity property. This value will override any opacity value passed in with the fill-color attribute.

    Declaration

    Swift

    func fillOpacity(opacity: String)
  • fillAttributes Extension method

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

    Declaration

    Swift

    var fillAttributes: [String : (String) -> ()] { get }
  • fill(_:) Extension method

    Sets the fill color for all subelements of the SVGGroup

    Declaration

    Swift

    func fill(_ fillColor: String)
  • fillRule(_:) Extension method

    Sets the fill rule for all subelements of the SVGGroup. CAShapeLayers have 2 possible values: non-zero (default), and evenodd

    See also

    Core Animation’s Shape Fill Mode Value

    Declaration

    Swift

    func fillRule(_ fillRule: String)
  • fillOpacity(_:) Extension method

    Sets the fill opacity for all subelements of the SVGGroup through its CGColor, not the CALayer’s opacity property.

    Declaration

    Swift

    func fillOpacity(_ opacity: String)