Shape building blocks
-
Base protocol which all shapes must implement.
Note: If you implement your own shapes, see
See moreDrawing.shapeDecoder
!Declaration
Swift
public protocol Shape : AnyObject, Decodable, Encodable
-
Simplified representation of three ordered affine transforms (translate, rotate, scale) that can be applied to
See moreShapeWithTransform
.Declaration
Swift
public struct ShapeTransform : Codable, Equatable
-
Enhancement to
See moreShape
protocol that enforces requirements necessary for a shape to be used with the selection tool. This includesShapeWithBoundingRect
to render the selection rect around the shape, andShapeWithTransform
to allow the shape to be moved from its original positionDeclaration
Swift
public protocol ShapeSelectable : ShapeWithBoundingRect, ShapeWithTransform
-
Enhancement to
See moreShape
adding properties to match allUserSettings
properties. There is a convenience methodapply(userSettings:)
which updates the shape to match the given values.Declaration
Swift
public protocol ShapeWithStandardState : AnyObject
-
Like
See moreShapeWithStandardState
, but ignoresUserSettings.fillColor
.Declaration
Swift
public protocol ShapeWithStrokeState : AnyObject
-
Declaration
Swift
public protocol ShapeWithThreePoints