AccusoftImagXpress13 ActiveX DLL > ImagXpress Object : RgnAddPoint Method |
A region consists of a series of connected points that forms a polygon.
When the RgnEnabled property is set True, all image processing functions will operate in that region.
Points cannot be added to a region once it is created. To create a new region, the region must first be deleted by invoking the RgnDelete Method. If an x- or y-coordinate of a point falls outside of the boundaries of the image, then that point is adjusted so that if falls within the boundary of the image as follows: Negative points will be set to zero, positive x-coordinates greater that the width of the image minus 1 will be set to the width of the image minus 1, positive y-coordinates greater than the height of the image minus 1 will be set to the height of the image minus 1. A region can have a maximum of 32767 points.
Xpress1.AddPoint 20,10 ' Top left point Xpress1.AddPoint120,10 ' Top right point Xpress1.AddPoint120,110 ' Bottom right point Xpress1.Addpoint20,110 ' Bottom left point Xpress1.RgnCreate ' Create the region