OverlayRectangle Method
Description
Decorates image of a specified index in buffer with rectangles of transparent color.
| ActiveX Edition | Plug-in Edition | Mac Edition |
|---|---|---|
| Since V5.0 | Since V5.0 | Not Supported |
Syntax
Boolean ObjectName.OverlayRectangle(short sImageIndex, Int32 iLeft, Int32 iTop, Int32 iRight, Int32 iBottom, Int32 ColorRGB, Single Opacity)
Parameters
short sImageIndex: Specifies the index of image in buffer. The index is 0-based.
Int32 iLeft: Specifies the x-coordinate of the upper-left corner of the rectangle.
Int32 iTop: Specifies the y-coordinate of the upper-left corner of the rectangle.
Int32 iRight: Specifies the x-coordinate of the lower-right corner of the rectangle.
Int32 iBottom: Specifies the y-coordinate of the lower-right corner of the rectangle.
Int32 ColorRGB: Specifies the fill color of the rectangle. The byte-ordering of the RGB value is 0xBBGGRR. GG represents green, BB represents blue, RR represents red.
Single Opacity: Specifies the opacity of the rectangle. The value represents opacity. 1.0 is 100% opaque and 0.0 is totally transparent.
Return value
Boolean.
TRUE indicates success. FALSE indicates failure.
Remarks
When an error occurs and IfThrowException property is TRUE, an exception will be thrown.
When FALSE is returned or an exception is thrown, check ErrorCode property and ErrorString property for error information.
See also
Sample
Javascript Sample:
function DynamicWebcam_OnMouseClick()
{
var Xcoordinate = Webcam.MouseX;
var Ycoordinate = Webcam.MouseY;
Webcam.OverlayRectangle(Webcam.CurrentImageIndexInBuffer,Xcoordinate-300,Ycoordinate-10,Xcoordinate+300,Ycoordinate+10,0xff0000,0.5);
}
