# ToolsOptions

## Content

# Type Alias: ToolsOptions

```ts
type ToolsOptions = object;
```

Default visual properties applied to each paint and object tool when the toolbar opens.

All values are optional, omitted properties fall back to the built-in defaults.
User interactions during a session override these values and are persisted in `localStorage`.

Shape properties (`lineWidth`, `lineColor`, `fillColor`) define the initial style for
newly created Rectangle, Line, Arrow, Ellipse, and Brackets objects.

## See

PaintToolsPluginOptions.toolsOptions

## Example

```javascript
viewer.addPlugin(new PaintToolsPlugin({
  tools: {
    penSize: 2,
    penColor: '#e03030',
    brushSize: 20,
    brushHardness: 50,
    eraserSize: 30,
    lineWidth: 2,
    lineColor: '#0055cc',
    objects: {
      text: { fontSize: 16, fontColor: '#222222', fontName: 'Arial', fontBold: true },
      rectangle: { fillColor: 'transparent', borderRadius: 4 },
      line: { endCapStyle: 'closedArrow', capSize: 12 },
    },
  }
}));
```

## Properties

### penSize

```ts
penSize: number;
```

Pencil stroke width in pixels.

#### Default

```ts
1
```

***

### penColor

```ts
penColor: string;
```

Pencil stroke color.

#### Default

```ts
'#000000'
```

***

### penOpacity

```ts
penOpacity: number;
```

Pencil stroke opacity as a percentage (0–100).

#### Default

```ts
100
```

***

### brushSize

```ts
brushSize: number;
```

Brush stroke width in pixels.

#### Default

```ts
12
```

***

### brushColor

```ts
brushColor: string;
```

Brush stroke color.

#### Default

```ts
'#000000'
```

***

### brushHardness

```ts
brushHardness: number;
```

Brush edge hardness as a percentage (0–100).
Lower values produce a soft airbrush effect; higher values produce hard edges.

#### Default

```ts
70
```

***

### brushOpacity

```ts
brushOpacity: number;
```

Brush stroke opacity as a percentage (0–100).

#### Default

```ts
100
```

***

### cloneStampSize

```ts
cloneStampSize: number;
```

Clone Stamp brush width in pixels.

#### Default

```ts
60
```

***

### cloneStampOpacity

```ts
cloneStampOpacity: number;
```

Clone Stamp opacity as a percentage (0–100).

#### Default

```ts
100
```

***

### cloneStampHardness

```ts
cloneStampHardness: number;
```

Clone Stamp edge hardness as a percentage (0–100).

#### Default

```ts
70
```

***

### eraserSize

```ts
eraserSize: number;
```

Eraser brush width in pixels.

#### Default

```ts
12
```

***

### eraserOpacity

```ts
eraserOpacity: number;
```

Eraser opacity as a percentage (0–100).

#### Default

```ts
100
```

***

### eraserHardness

```ts
eraserHardness: number;
```

Eraser edge hardness as a percentage (0–100).

#### Default

```ts
70
```

***

### lineWidth

```ts
lineWidth: number;
```

Default stroke width in pixels for shape objects (Rectangle, Line, Arrow, Ellipse, Brackets).

#### Default

```ts
1
```

***

### lineColor

```ts
lineColor: string;
```

Default stroke color for shape objects.

#### Default

```ts
'#000000'
```

***

### fillColor

```ts
fillColor: string;
```

Default fill color for shape objects.
Use `'transparent'` or a color with zero alpha to draw unfilled (outline-only) shapes.

#### Default

```ts
'transparent'
```

***

### objects?

```ts
optional objects: ToolsObjectsOptions;
```

Default style overrides for all paint objects.
Allows control over the initial appearance of each object type.
Values specified here override lineWidth, lineColor, and fillColor for that specific type.
