Class
DrawToolBase

Represents an abstraction of a tool which is responsible for drawing a geometries over an image.

Definition

Namespace:Telerik.Windows.Media.Imaging.Tools

Assembly:Telerik.Windows.Controls.ImageEditor.dll

Syntax:

cs-api-definition
public abstract class DrawToolBase : ToolBase, ITool

Inheritance: objectToolBaseDrawToolBase

Derived Classes: DrawToolShapeTool

Implements: ITool

Inherited Members ToolBase.GetSettingsUI()ToolBase.IsDirty

Constructors

DrawToolBase()

Initializes a new instance of the DrawToolBase class.

Declaration

cs-api-definition
public DrawToolBase()

Properties

AffectsLayout

Gets whether the tool is changing the image size.

Declaration

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

Property Value

bool

Indicates whether a tool affects layout.

Overrides ToolBase.AffectsLayout

IsPreviewOverlay

Gets whether the tool has a preview overlay on the main image.

Declaration

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

Property Value

bool

Indicates if a tool has a preview overlay.

Overrides ToolBase.IsPreviewOverlay

IsResetSettingsSupported

Specifies whether the settings of a tool can be reset. The common implementation of a tool returns true.

Declaration

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

Property Value

bool

Indicates whether the settings can be reseted.

Overrides ToolBase.IsResetSettingsSupported

Methods

AttachUI(ToolInitInfo)

Attaches the UI. The method is invoked on tool's execution.

Declaration

cs-api-definition
public override void AttachUI(ToolInitInfo previewInitInfo)

Parameters

previewInitInfo

ToolInitInfo

The preview init info.

Overrides ToolBase.AttachUI(ToolInitInfo)

DetachUI()

Detaches the UI. The method is invoked when the tool execution is canceled.

Declaration

cs-api-definition
public override void DetachUI()

Overrides ToolBase.DetachUI()

Draw(Point)

Draws a geometry.

Declaration

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

Parameters

currentPoint

Point

The current point related to the image.

EndDraw(Point)

Ends the drawing of a geometry.

Declaration

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

Parameters

currentPoint

Point

The current point related to the image.

GetCommand()

Gets the tool's associated command.

Declaration

cs-api-definition
public override IImageCommand GetCommand()

Returns

IImageCommand

The command.

Overrides ToolBase.GetCommand()

GetContext()

Gets the tool's command context.

Declaration

cs-api-definition
public override object GetContext()

Returns

object

The command context.

Overrides ToolBase.GetContext()

ResetSettings()

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

Declaration

cs-api-definition
public override void ResetSettings()

Overrides ToolBase.ResetSettings()

SetPathProperties(Path)

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

Declaration

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

Parameters

path

Path

The path.

StartDraw(Point)

Starts the drawing of a geometry.

Declaration

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

Parameters

currentPoint

Point

The current point related to the image.