OnImageAreaSelected


Description

This event is triggered when user selects an area (draws a rectangle) or move a selected area on an image in Dynamic Web TWAIN viewer.

Syntax

.RegisterEvent('OnImageAreaSelected',function(sImageIndex, left, top, right, bottom, sAreaIndex){...});

Parameters

<number> sImageIndex: specifies the index of image in buffer. The index is 0-based.
<int> left: specifies the x-coordinate of the upper-left corner of the rectangle.
<int> top: specifies the y-coordinate of the upper-left corner of the rectangle.
<int> right: specifies the x-coordinate of the lower-right corner of the rectangle.
<int> bottom: specifies the y-coordinate of the lower-right corner of the rectangle.
<number> sAreaIndex: specifies the index of the selected area. The index is 1-based. This is useful when you have multiple selected areas on one image.

See Also

OnMouseRightClick
OnMouseMove
OnMouseDoubleClick
OnMouseClick
OnImageAreaDeSelected

Example

DWObject.RegisterEvent('OnImageAreaSelected', function(sImageIndex, left, top, right, bottom, sAreaIndex){
    alert(sImageIndex + 'left: ' + left);
});
Is this page helpful?

Leave a Reply

Your email address will not be published.