SetImageLayout()

Description

Sets the left, top, right, and bottom sides of the image layout rectangle for
the current Data Source. In other words, sets which area should be scanned.

Syntax

.SetImageLayout(float left, float top, float right, float bottom);

Parameters

<float> left: specifies the left side of the image layout rectangle.

<float> top: specifies the top side of the image layout rectangle.

<float> right: specifies the right side of the image layout rectangle.

<float> bottom: specifies the bottom side of the image layout rectangle.

Return value

bool

true indicates success. false indicates failure.

When false is returned, check ErrorCode or ErrorString for error information.

Remarks

The image layout rectangle defines what portion of the Data Source's scanning area is acquired.

You should set Unit before using this method.

Example

DWObject.SelectSource();
DWObject.OpenSource();
DWObject.IfShowUI = false;
DWObject.Unit=EnumDWT_UnitType.TWUN_PIXELS;
DWObject.SetImageLayout(50, 50, 100, 100);
DWObject.AcquireImage();

See also

Unit PageSize ResetImageLayout()

Is this page helpful?

Leave a Reply

Your email address will not be published.