Structure

PKEraserTool

A tool for erasing previously drawn content in a canvas view.

Declaration

struct PKEraserTool

Overview

A PKEraserTool object supports the deletion of content from a PKCanvasView object. The eraser tool’s type determines whether the canvas removes entire items or just the portion of an item that it touches.

Create an eraser tool programmatically or display a PKToolPicker object and let the user pick it. Assign the resulting object to the tool property of your PKCanvasView object. The canvas uses any subsequent touch sequences to erase content on the canvas.

Topics

Creating an Eraser Tool

init(PKEraserTool.EraserType)

Creates an eraser tool object that removes objects wholly or partially from a canvas view.

Getting the Eraser Type

var eraserType: PKEraserTool.EraserType

The behavior adopted by the eraser when deleting content.

enum PKEraserTool.EraserType

Constants that indicates the behavior of the eraser.

Comparing Eraser Tools

static func != (PKEraserTool, PKEraserTool) -> Bool

Returns a Boolean value indicating whether the two eraser tools are equivalent.

Relationships

Conforms To

See Also

Tools

class PKToolPicker

An object that displays a selection of drawing tools and colors from which to select in the current window.

struct PKInkingTool

An object that defines the drawing characteristics (width, color, pen style) to use when drawing lines on a canvas view.

class PKInkingToolReference

An object that defines the drawing characteristics (width, color, pen style) to use when drawing lines on a canvas view.

class PKEraserToolReference

A tool for erasing previously drawn content in a canvas view.

struct PKLassoTool

A tool for selecting stroked lines in a canvas view.

class PKLassoToolReference

A tool for selecting stroked lines in a canvas view.

protocol PKTool

An interface adopted by tools used by a canvas view.