This method draws a line.

[Visual Basic] Public Function DrawLine(pt As System.Windows.Point()) As Boolean
[C#] public bool DrawLine(System.Windows.Point[] pt);

Parameters

pt

The array of type System.Windows.Point that set the two endpoints of the line.

Return Value

Returns True if successful, otherwise returns False.

Explanation

The DrawLine method draws a line. To draw a line, set appropriate values in the PenWidth, ForeColor, ForeColorOpacity, DoubleLine, StartLineCap, EndLineCap, DashStyle, StartArrowCap, StartArrowCapFilled, StartArrowCapSize, EndArrowCap, EndArrowCapFilled, and EndArrowCapSize properties. Set the array of type System.Windows.Point to designate the end points of the line in the DrawLine's pt parameter. There must be 2 or more Points set in the pt parameter. Note that if an array containing more than two Points is set in the pt parameter and error will not occur. The first two points will be used to draw the line and the others ignored. When the DrawLine method is executed, the line will be drawn. If a portion of the line lies outside the ImageKit control and the LimitAnnotationPosition property or LimitDrawPosition property are true, the line will be resized to fit completely within the ImageKit control.

To delete the line drawn with the DrawLine method, right click the object and display the context menu, the select "Undo" or execute the Undo method.

The DrawLine method can be used without setting the EditKind property to KindOfEdit.Line.

It is also possible to draw a line by setting the EditKind property to KindOfEdit.Line then, on the base image displayed in the ImageKit control, use the mouse. For more details, please refer to the Edit Overview.

See also

ImageKit.Edit Members | Newtone.ImageKit.Wpf.ImageKit

 

The ImageKit WPF is created by Newtone Corporation