Class
DrawTool

Represents a drawing tool.

Definition

Namespace:Telerik.Windows.Media.Imaging.Tools

Assembly:Telerik.Windows.Controls.ImageEditor.dll

Syntax:

cs-api-definition
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

DrawTool()

Initializes a new instance of the DrawTool class.

Declaration

cs-api-definition
public DrawTool()

Properties

DefaultBrushColor

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

Declaration

cs-api-definition
public Color DefaultBrushColor { get; set; }

Property Value

Color

The default color of the brush.

DefaultBrushSize

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

Declaration

cs-api-definition
public double DefaultBrushSize { get; set; }

Property Value

double

The default size of the brush.

IsDirty

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

Declaration

cs-api-definition
public override bool IsDirty { get; }

Property Value

bool

Indicates is there any changes.

Overrides ToolBase.IsDirty

Methods

CreatePathFigure(Point)

Declaration

cs-api-definition
protected virtual PathFigure CreatePathFigure(Point currentPosition)

Parameters

currentPosition

Point

Returns

PathFigure

CreatePathSegment(Point)

Declaration

cs-api-definition
protected virtual PathSegment CreatePathSegment(Point currentPosition)

Parameters

currentPosition

Point

Returns

PathSegment

Draw(Point)

Draws a geometry.

Declaration

cs-api-definition
protected override void Draw(Point currentPoint)

Parameters

currentPoint

Point

The current point related to the image.

Overrides DrawToolBase.Draw(Point)

EndDraw(Point)

Ends the drawing of a geometry.

Declaration

cs-api-definition
protected override void EndDraw(Point currentPoint)

Parameters

currentPoint

Point

The current point related to the image.

Overrides DrawToolBase.EndDraw(Point)

GetSettingsUI()

Gets the tool' settings UI.

Declaration

cs-api-definition
public override UIElement GetSettingsUI()

Returns

UIElement

The UI settings.

Overrides ToolBase.GetSettingsUI()

ResetSettings()

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

Declaration

cs-api-definition
public override void ResetSettings()

Overrides DrawToolBase.ResetSettings()

SetPathProperties(Path)

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

Declaration

cs-api-definition
protected override void SetPathProperties(Path path)

Parameters

path

Path

The path.

Overrides DrawToolBase.SetPathProperties(Path)

StartDraw(Point)

Starts the drawing of a geometry.

Declaration

cs-api-definition
protected override void StartDraw(Point currentPoint)

Parameters

currentPoint

Point

The current point related to the image.

Overrides DrawToolBase.StartDraw(Point)