---
title: PKInkingTool
framework: pencilkit
role: symbol
role_heading: Structure
path: pencilkit/pkinkingtool-swift.struct
---

# PKInkingTool

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

## Declaration

```swift
struct PKInkingTool
```

## Mentioned in

Supporting backward compatibility for ink types

## Overview

Overview A PKInkingTool object supports the creation of new content on a PKCanvasView. With an inking tool, the canvas turns touch input from the user into a continuously rendered stroke. The value in the width property determines the base width of that stroke; however, that base value also depends on input from Apple Pencil, including force, azimuth, and angle data. Create an inking tool programmatically, or display a PKToolPicker object and from which a user can select a tool. Assign the resulting object to the tool property of your PKCanvasView object. The canvas uses any subsequent touch sequences to draw new content on the canvas. Assigning a new inking tool doesn’t change the characteristics for any previously drawn strokes.

## Topics

### Creating an inking tool

- [init(_:color:width:)](pencilkit/pkinkingtool-swift.struct/init(_:color:width:)-2l7v.md)
- [init(_:color:width:)](pencilkit/pkinkingtool-swift.struct/init(_:color:width:)-4i3ft.md)
- [init(ink:width:)](pencilkit/pkinkingtool-swift.struct/init(ink:width:).md)

### Getting the width information

- [defaultWidth](pencilkit/pkinkingtool-swift.struct/inktype-swift.enum/defaultwidth.md)
- [validWidthRange](pencilkit/pkinkingtool-swift.struct/inktype-swift.enum/validwidthrange.md)

### Getting the inking tool attributes

- [color](pencilkit/pkinkingtool-swift.struct/color-5xmlo.md)
- [color](pencilkit/pkinkingtool-swift.struct/color-22zaw.md)
- [width](pencilkit/pkinkingtool-swift.struct/width.md)
- [ink](pencilkit/pkinkingtool-swift.struct/ink.md)

### Getting the tool type

- [inkType](pencilkit/pkinkingtool-swift.struct/inktype-swift.property.md)
- [PKInkingTool.InkType](pencilkit/pkinkingtool-swift.struct/inktype-swift.enum.md)

### Working with colors

- [convertColor(_:from:to:)](pencilkit/pkinkingtool-swift.struct/convertcolor(_:from:to:).md)

### Supporting backward compatibility

- [requiredContentVersion](pencilkit/pkinkingtool-swift.struct/requiredcontentversion.md)

### Using reference types

- [PKInkingToolReference](pencilkit/pkinkingtoolreference.md)

### Initializers

- [init(_:color:width:azimuth:)](pencilkit/pkinkingtool-swift.struct/init(_:color:width:azimuth:)-24rf4.md)
- [init(_:color:width:azimuth:)](pencilkit/pkinkingtool-swift.struct/init(_:color:width:azimuth:)-5dtjs.md)

### Instance Properties

- [azimuth](pencilkit/pkinkingtool-swift.struct/azimuth.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [PKTool](pencilkit/pktool-swift.protocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Tools

- [Configuring the PencilKit tool picker](pencilkit/configuring-the-pencilkit-tool-picker.md)
- [PKToolPicker](pencilkit/pktoolpicker.md)
- [PKEraserTool](pencilkit/pkerasertool-swift.struct.md)
- [PKLassoTool](pencilkit/pklassotool-swift.struct.md)
- [PKTool](pencilkit/pktool-swift.protocol.md)
