Class
ShapeTool

Represents a tool which draws shapes over an image.

Definition

Constructors

ShapeTool()

Initializes a new instance of the ShapeTool class.

Declaration

cs-api-definition
public ShapeTool()

Properties

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

Shapes

Gets or sets the shapes.

Declaration

cs-api-definition
public ObservableCollection<IShape> Shapes { get; }

Property Value

ObservableCollection<IShape>

The shapes.

Methods

Draw(Point)

Draws a shape 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)