ShapeDetail

public struct ShapeDetail

A struct storing all of the information describing shape content. This includes the primitive shapes and polygons from Lightwell and path information from svg assets.

  • Path to descibe the shape. Contents may be nil if shape was invalid or empty in the svg.

    Declaration

    Swift

    public var path: UIBezierPath?
  • The fill color for the interior of the shape. Will be nil if the no fill is defined.

    Declaration

    Swift

    public var fillColor: UIColor?
  • The fill rule for determining what is the inside of the path. Will be kCAFillRuleNonZero or kCAFillRuleEvenOdd.

    Declaration

    Swift

    public var fillRule: String
  • The stroke color for the shape. Will be nil if the no stroke is defined.

    Declaration

    Swift

    public var strokeColor: UIColor?
  • The line width for the stroke.

    Declaration

    Swift

    public var lineWidth: CGFloat
  • The line cap for non-closed paths. Will be kCALineCapButt, kCALineCapRound, or kCALineCapSquare.

    Declaration

    Swift

    public var lineCap: String
  • The line join for the meeting point of two line segments. Will be kCALineJoinMiter, kCALineJoinRound, or kCALineJoinBevel.

    Declaration

    Swift

    public var lineJoin: String
  • Determines the distance of drawn passed the edge of the shape with a miter joint.

    Declaration

    Swift

    public var miterLimit: CGFloat
  • Dash pattern for the stroke. Will be nil if the line is solid.

    Declaration

    Swift

    public var lineDashPattern: [NSNumber]?
  • Offset of line dash pattern.

    Declaration

    Swift

    public var lineDashPhase: CGFloat
  • Relative position to containing view. In the case of a primitive shape or polygon this will be half the shape size, and can be safely ignored as all relavant positioning data will be in the path property.

    Declaration

    Swift

    public var position: CGPoint
  • Size of shape. In the case of a primitive shape or polygon the shape size will match LWKLayerInfo.size, and can be safely ignored as all relavant sizing data will be in the path property.

    Declaration

    Swift

    public var size: CGSize
  • Relative position to parent. Only differs from the LWKLayerInfo.position when coming from an svg.

    Declaration

    Swift

    public var opacity: CGFloat