This method draws a polygon.

[Visual Basic] Public Function DrawPolygon(pt As Point()) As Boolean
[C#] public bool DrawPolygon(Point[] pt);

Parameters

pt

The array of type Point that designate the points of the polygon

Return Value

Returns True if successful, otherwise returns False.

Explanation

The DrawPolygon method draws a polygon. To draw a polygon, set appropriate values in the PenWidth, ForeColor, ForeColorOpacity, BackColor, BackColorOpacity, Fill, DashStyle, and LineJoin properties. Set the array of type Point to designate the points of the polygon in the DrawPolygon's pt parameter. There must be 3 or more Points set in the pt parameter. When the DrawPolygon method is executed, the polygon will be drawn. If a portion of the polygon lies outside the ImageKit control and the LimitAnnotationPosition property or LimitDrawPosition property are true, the polygon will be resized to fit  completely within the ImageKit control.

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

The DrawPolygon method can be used without setting the EditKind property to KindOfEdit.Polygon.

It is also possible to draw a polygon by setting the EditKind property to KindOfEdit.Polygon 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.Win.ImageKit

 

The ImageKit.NET3 is created by Newtone Corporation