Strokable
public protocol Strokable
A protocol that described an instance that can be stroked. Two default implementations are provided for this protocol:
SVGShapeElement
- Will set the underlyingSVGLayer
‘s stroke color, width, line cap, line join, and miter limit. Note thatSVGLayer is a subclass of
CAShapeLayer, so this default implementation wil;l set the
CAShapeLayer's line properties and not the
CALayer`’s border attributes.SVGGroup
- The default implementation just saves the attributes and values to be applied after all the subelements have been processed.
-
strokeAttributes
Extension methodThe curried functions to be used for the
SVGShapeElement
‘s default implementation. This dictionary is meant to be used in theSVGParserSupportedElements
instanceDeclaration
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 -
strokeColor(strokeColor:)
Extension methodSets the stroke color of the underlying
SVGLayer
See also
CAShapeLayer’sstrokeColor
Declaration
Swift
internal func strokeColor(strokeColor: String)
-
strokeLineJoin(lineJoin:)
Extension method -
strokeMiterLimit(miterLimit:)
Extension methodSets the stroke miter limit of the underlying
SVGLayer
See also
CAShapeLayer’smiterLimit
Declaration
Swift
internal func strokeMiterLimit(miterLimit: String)
-
strokeWidth(strokeWidth:)
Extension methodSets the stroke width of the underlying
SVGLayer
See also
CAShapeLayer’sstrokeWidth
Declaration
Swift
internal func strokeWidth(strokeWidth: String)
-
strokeAttributes
Extension methodThe curried functions to be used for the
SVGGroup
‘s default implementation. This dictionary is meant to be used in theSVGParserSupportedElements
instanceDeclaration
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 methodSets the stroke line cap of all subelements
See also
CAShapeLayer’slineCap
for supported values.Declaration
Swift
internal func strokeLineCap(lineCap: String)
-
strokeColor(strokeColor:)
Extension methodSets the stroke color of all subelements
See also
CAShapeLayer’sstrokeColor
Declaration
Swift
internal func strokeColor(strokeColor: String)
-
strokeLineJoin(lineJoin:)
Extension methodSets the stroke line join of all subelements
See also
CAShapeLayer’slineJoin
Declaration
Swift
internal func strokeLineJoin(lineJoin: String)
-
strokeMiterLimit(miterLimit:)
Extension methodSets the stroke miter limit of all subelements
See also
CAShapeLayer’smiterLimit
Declaration
Swift
internal func strokeMiterLimit(miterLimit: String)
-
strokeWidth(strokeWidth:)
Extension methodSets the stroke width of all subelements
See also
CAShapeLayer’sstrokeWidth
Declaration
Swift
internal func strokeWidth(strokeWidth: String)