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 moreShapeprotocol that enforces requirements necessary for a shape to be used with the selection tool. This includesShapeWithBoundingRectto render the selection rect around the shape, andShapeWithTransformto allow the shape to be moved from its original positionDeclaration
Swift
public protocol ShapeSelectable : ShapeWithBoundingRect, ShapeWithTransform -
Enhancement to
See moreShapeadding properties to match allUserSettingsproperties. 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
View on GitHub
Shape building blocks Reference