Accusoft ImagXpress 13
RgnAddPoint Method
The x-coordinate (in pixels) of the point to be added to the region.
The y-coordinate (in pixels) of the point to be added to the region.
Description
Adds a point to the current region wherein subsequent processing methods will be performed on the current image.
Syntax
Visual Basic
Public Sub RgnAddPoint( _
   ByVal x As Long, _
   ByVal y As Long _
) 
Parameters
x
The x-coordinate (in pixels) of the point to be added to the region.
y
The y-coordinate (in pixels) of the point to be added to the region.
Remarks

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.

Example
The following Visual Basic example creates a 100x100 pixel square region that is 10 pixels from the top and 20 pixels from the left corner of the image.
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
See Also

ImagXpress Object  | ImagXpress Members  | RgnCreate Method  | Area and Region

 

 


©2019. Accusoft Corporation. All Rights Reserved.

Send Feedback