VectorImage AddRectangle
Adds a Rectangle to the VectorImage
Overloads
public void AddRectangle(float x, float y, float width, float height, float angle, float elevation) |
Return value
void |
Parameters
float | x | The x coordinate of the reference point of the rectangle |
float | y | The y coordinate of the reference point of the rectangle |
float | width | The width of the rectangle |
float | height | The height of the rectangle |
float | angle | The angle(radians) of rotation from the X direction in CCW, around the reference point. |
float | elevation | The z coordinate of the reference point of the rectangle |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
if (scanDocument != null)
{
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
vectorImage.SetMarkSpeed(1000);
vectorImage.SetJumpSpeed(2000);
vectorImage.SetJumpDelay(100);
vectorImage.SetMarkDelay(100);
//Set Laser Delays
vectorImage.SetLaserOnDelay(10);
vectorImage.SetLaserOffDelay(10);
float x = -40;
float y = -30;
float width = 80;
float height = 60;
float angle = 0;
float elevation = 0;
vectorImage.AddRectangle(x, y, width, height, angle, elevation);
scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
//scanDocument.Scripts.Add(DefautScript());
try
{
scanDocument.StartScanning();
}
catch
{
}
}