The leading provider of version control solutions and TWAIN SDKs
  • Contact us









Erase Method

Description

Clears the specified area of a specified image, and fill the area with the fill color.

ActiveX Edition Plug-in Edition Mac Edition
Since V6.0 Since V6.0 Since V6.4

Syntax

ObjectName.Erase(short sImageIndex, Int32 iLeft, Int32 iTop, Int32 iRight, Int32 iBottom)

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.

Return value

True indicates success. False indicates failure.

Remarks

The unit of width and height is pixel.

The fill color can be defined by BackgroundFillColor. The valid area is the intersection of specified area (defined by the input parameters) and the whole image. If the intersection is invalid, an error will be thrown out.

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

BackgroundFillColor property.