Strokable

public protocol Strokable

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.
  • strokeAttributes 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

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

    Parameters

    Key

    The SVG string value of the attribute

    Value

    A curried function to use to implement the SVG attribute

  • strokeLineCap(lineCap:) Extension method

    Sets the stroke line cap of the underlying SVGLayer

    See also

    CAShapeLayer’s lineCap for supported values.

    Declaration

    Swift

    internal func strokeLineCap(lineCap: String)
  • strokeColor(strokeColor:) Extension method

    Sets the stroke color of the underlying SVGLayer

    See also

    CAShapeLayer’s strokeColor

    Declaration

    Swift

    internal func strokeColor(strokeColor: String)
  • strokeLineJoin(lineJoin:) Extension method

    Sets the stroke line join of the underlying SVGLayer

    See also

    CAShapeLayer’s lineJoin

    Declaration

    Swift

    internal func strokeLineJoin(lineJoin: String)
  • Sets the stroke miter limit of the underlying SVGLayer

    See also

    CAShapeLayer’s miterLimit

    Declaration

    Swift

    internal func strokeMiterLimit(miterLimit: String)
  • strokeWidth(strokeWidth:) Extension method

    Sets the stroke width of the underlying SVGLayer

    See also

    CAShapeLayer’s strokeWidth

    Declaration

    Swift

    internal func strokeWidth(strokeWidth: String)
  • strokeAttributes 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 strokeAttributes: [String : (String) -> ()] { get }

    Parameters

    Key

    The SVG string value of the attribute

    Value

    A curried function to use to implement the SVG attribute

  • strokeLineCap(lineCap:) Extension method

    Sets the stroke line cap of all subelements

    See also

    CAShapeLayer’s lineCap for supported values.

    Declaration

    Swift

    internal func strokeLineCap(lineCap: String)
  • strokeColor(strokeColor:) Extension method

    Sets the stroke color of all subelements

    See also

    CAShapeLayer’s strokeColor

    Declaration

    Swift

    internal func strokeColor(strokeColor: String)
  • strokeLineJoin(lineJoin:) Extension method

    Sets the stroke line join of all subelements

    See also

    CAShapeLayer’s lineJoin

    Declaration

    Swift

    internal func strokeLineJoin(lineJoin: String)
  • Sets the stroke miter limit of all subelements

    See also

    CAShapeLayer’s miterLimit

    Declaration

    Swift

    internal func strokeMiterLimit(miterLimit: String)
  • strokeWidth(strokeWidth:) Extension method

    Sets the stroke width of all subelements

    See also

    CAShapeLayer’s strokeWidth

    Declaration

    Swift

    internal func strokeWidth(strokeWidth: String)