Operations
-
Add a shape to the drawing. Undoing removes the shape.
See moreDeclaration
Swift
public struct AddShapeOperation : DrawingOperation
-
Remove a shape from the drawing. Undoing adds the shape back.
See moreDeclaration
Swift
public struct RemoveShapeOperation : DrawingOperation
-
Change the transform of a
See moreShapeWithTransform
. Undoing sets its transform back to its original value.Declaration
Swift
public struct ChangeTransformOperation : DrawingOperation
-
Edit the text of a
TextShape
. Undoing sets the text back to the original value.If this operation immediately follows an
See moreAddShapeOperation
for the exact same text shape, andoriginalText
is empty, then this operation declines to be added to the undo stack and instead causes theAddShapeOperation
to simply add the shape with the new text value. This means that we avoid having an “add empty text shape” operation in the undo stack.Declaration
Swift
public struct EditTextOperation : DrawingOperation
-
Change the user-specified width of a text shape
See moreDeclaration
Swift
public struct ChangeExplicitWidthOperation : DrawingOperation