# Drawing

The **DrawTool** is one of the tools that come out-of-the-box with the **RadImageEditor** and enables you to draw over the image. You can choose different brush color and size. The tool provides some customization options that are explained in detail in this topic.

Similarly to the other **RadImageEditor** tools, the **DrawTool** is located in the **Telerik.Windows.Media.Imaging.Tools** namespace, inherits the [DrawToolBase](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/how-to/implement-drawtoolbase) class and can be defined in XAML as follows:

**Example 1: Define DrawTool**

```XAML
<tools:DrawTool />
```

## Modifying

The **DrawTool** introduces the following two properties which can be set by declaring them in XAML as well:

* **DefaultBrushSize**: Specifies the default size of the brush. The property is of type **double**.

* **DefaultBrushColor**: Specifies the default brush color. The property is of type **Color**.

**Example 2: Customize DrawTool**

```XAML
<tools:DrawTool DefaultBrushColor="Blue" DefaultBrushSize="5"/>
```

**Example 2: Customize DrawTool**

```C#
DrawTool drawTool = new DrawTool();
drawTool.DefaultBrushColor = Colors.Blue;
drawTool.DefaultBrushSize = 5;
```

```VB.NET
Dim drawTool = New DrawTool()
drawTool.DefaultBrushColor = Colors.Blue
drawTool.DefaultBrushSize = 5
```

## Inheritance and Customizing

The **DrawTool** introduces the following virtual methods which can be overridden in order to achieve different than the default behavior:

* **CreatePathFigure(Point currentPosition)**: Returns a [PathFigure](https://msdn.microsoft.com/en-us/library/system.windows.media.pathfigure%28v=vs.110%29.aspx) object which is added to the path’s geometry figures collection. The method is invoked at the beginning of the drawing right after the **Path**’s initialization.

* **CreatePathSegment(Point currentPosition)**: Returns a [PathSegment](https://msdn.microsoft.com/en-us/library/system.windows.media.pathsegment\(v=vs.110\).aspx) object which is added to the drawn path’s figure during the drawing. A [LineSegment](https://msdn.microsoft.com/en-us/library/system.windows.media.linesegment%28v=vs.110%29.aspx) is inserted by default.

## See Also

* [Cropping](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/tools/howto-use-crop)
* [Commands and Tools](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/features/commands)
* [Shape Tool](https://www.telerik.com/products/wpf/documentation/controls/radimageeditor/tools/shape-tool)
