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

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:

C#
public abstract class DrawToolBase : ToolBase, ITool

Inheritance: objectToolBaseDrawToolBase

Derived Classes: DrawToolShapeTool

Implements: ITool

Inherited Members ToolBase.GetSettingsUI()ToolBase.IsDirty

Constructors

Initializes a new instance of the DrawToolBase class.

C#
public DrawToolBase()

Properties

Gets whether the tool is changing the image size.

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

Indicates whether a tool affects layout.

Overrides: ToolBase.AffectsLayout

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

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

Indicates if a tool has a preview overlay.

Overrides: ToolBase.IsPreviewOverlay

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

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

Indicates whether the settings can be reseted.

Overrides: ToolBase.IsResetSettingsSupported

Methods

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

C#
public override void AttachUI(ToolInitInfo previewInitInfo)
Parameters:previewInitInfoToolInitInfo

The preview init info.

Overrides: ToolBase.AttachUI(ToolInitInfo)

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

C#
public override void DetachUI()

Overrides: ToolBase.DetachUI()

Draws a geometry.

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

The current point related to the image.

Ends the drawing of a geometry.

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

The current point related to the image.

Gets the tool's associated command.

C#
public override IImageCommand GetCommand()
Returns:

IImageCommand

The command.

Overrides: ToolBase.GetCommand()

Gets the tool's command context.

C#
public override object GetContext()
Returns:

object

The command context.

Overrides: ToolBase.GetContext()

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

C#
public override void ResetSettings()

Overrides: ToolBase.ResetSettings()

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

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

The path.

Starts the drawing of a geometry.

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

The current point related to the image.