BoundingRect Property
Description
Gets the boundary of a barcode.
Syntax
public Rectangle BoundingRect { get; }
Data type
Rectangle
Remarks

Example
try
{
BarcodeResult[] results = reader.DecodeFile("C:\\test.bmp");
string sResults = "Total barcode(s) found: " + results.Length;
for(int i = 0; i < results.Length; ++i)
{
BarcodeResult barcode = results[i];
sResults += "\r\nLeft: " + barcode.BoundingRect.Left.ToString();
sResults += " ,Right: " + barcode.BoundingRect.Right.ToString();
sResults += " ,Top: " + barcode.BoundingRect.Top.ToString();
sResults += " ,Bottom: " + barcode.BoundingRect.Bottom.ToString();
sResults += "\r\nSize: " + barcode.BoundingRect.Size.ToString();
sResults += "\r\nWidth: " + barcode.BoundingRect.Width.ToString();
sResults += " ,Height: " + barcode.BoundingRect.Height.ToString();
sResults += "\r\nLocation: " + barcode.BoundingRect.Location.ToString();
sResults += "\r\nX: " + barcode.BoundingRect.X.ToString();
sResults += " ,Y: " + barcode.BoundingRect.Y.ToString();
}
}
catch(BarcodeReaderException exp)
{
Console.WriteLine("Error: {0}, {1}", exp.Code.ToString(), exp.Message);
}
See Also
.NET > Classes > BarcodeReader > DecodeFile
.NET > Classes > BarcodeResult
.NET > Classes > BarcodeReaderException