Fillable
public protocol Fillable
A protocol that described an instance that can be filled. Two default implementations are provided for this protocol:
SVGShapeElement
- Will set the fill color, fill opacity, and fill rule on the underlyingSVGLayer
which is a subclass ofCAShapeLayer
SVGGroup
- Will set the fill color, fill opacity, and fill rule of all of aSVGGroup
‘s subelements
-
fillAttributes
Extension methodThe curried functions to be used for the
SVGShapeElement
‘s default implementation. This dictionary is meant to be used in theSVGParserSupportedElements
instanceDeclaration
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 -
fillRule(fillRule:)
Extension methodSets the fill rule of the underlying
SVGLayer
.CAShapeLayer
s have 2 possible values:non-zero
(default), andevenodd
See also
Core Animation’s Shape Fill Mode ValueDeclaration
Swift
func fillRule(fillRule: String)
-
fillOpacity(opacity:)
Extension methodSets 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 thefill-color
attribute.Declaration
Swift
func fillOpacity(opacity: String)
-
fillAttributes
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 fillAttributes: [String : (String) -> ()] { get }
-
fill(_:)
Extension methodSets the fill color for all subelements of the
SVGGroup
Declaration
Swift
func fill(_ fillColor: String)
-
fillRule(_:)
Extension methodSets the fill rule for all subelements of the
SVGGroup
.CAShapeLayer
s have 2 possible values:non-zero
(default), andevenodd
See also
Core Animation’s Shape Fill Mode ValueDeclaration
Swift
func fillRule(_ fillRule: String)
-
fillOpacity(_:)
Extension methodSets the fill opacity for all subelements of the
SVGGroup
through its CGColor, not the CALayer’s opacity property.Declaration
Swift
func fillOpacity(_ opacity: String)