New to Telerik UI for WPFStart a free 30-day trial

Represents a drawing tool.

Definition

Namespace:Telerik.Windows.Media.Imaging.Tools

Assembly:Telerik.Windows.Controls.ImageEditor.dll

Syntax:

C#
public class DrawTool : DrawToolBase, ITool

Inheritance: objectToolBaseDrawToolBaseDrawTool

Derived Classes: SelectionTool

Implements: ITool

Inherited Members DrawToolBase.GetCommand()DrawToolBase.GetContext()DrawToolBase.AttachUI(ToolInitInfo)DrawToolBase.DetachUI()DrawToolBase.IsResetSettingsSupportedDrawToolBase.IsPreviewOverlayDrawToolBase.AffectsLayout...

Constructors

Initializes a new instance of the DrawTool class.

C#
public DrawTool()

Properties

Gets or sets the default color of the brush which is used for drawing.

C#
public Color DefaultBrushColor { get; set; }
Property Value:

The default color of the brush.

Gets or sets the default size of the brush which is used for drawing.

C#
public double DefaultBrushSize { get; set; }
Property Value:

The default size of the brush.

Gets whether the tool has made any changes on the image.

C#
public override bool IsDirty { get; }
Property Value:

Indicates is there any changes.

Overrides: ToolBase.IsDirty

Methods

C#
protected virtual PathFigure CreatePathFigure(Point currentPosition)
Parameters:currentPositionPointReturns:

PathFigure

C#
protected virtual PathSegment CreatePathSegment(Point currentPosition)
Parameters:currentPositionPointReturns:

PathSegment

Draws a geometry.

C#
protected override void Draw(Point currentPoint)
Parameters:currentPointPoint

The current point related to the image.

Overrides: DrawToolBase.Draw(Point)

Ends the drawing of a geometry.

C#
protected override void EndDraw(Point currentPoint)
Parameters:currentPointPoint

The current point related to the image.

Overrides: DrawToolBase.EndDraw(Point)

Gets the tool' settings UI.

C#
public override UIElement GetSettingsUI()
Returns:

UIElement

The UI settings.

Overrides: ToolBase.GetSettingsUI()

Resets the tool' settings if the tool's IsResetSettingsSupported property is true.

C#
public override void ResetSettings()

Overrides: DrawToolBase.ResetSettings()

Sets properties to the path which contains the geometry which shall be drawn.

C#
protected override void SetPathProperties(Path path)
Parameters:pathPath

The path.

Overrides: DrawToolBase.SetPathProperties(Path)

Starts the drawing of a geometry.

C#
protected override void StartDraw(Point currentPoint)
Parameters:currentPointPoint

The current point related to the image.

Overrides: DrawToolBase.StartDraw(Point)