BarCodeRegionParameters

BarCodeRegionParameters class

Represents the recognized barcode’s region and barcode angle

public sealed class BarCodeRegionParameters

Properties

Name Description
Angle { get; } Gets the angle of the barcode (0-360).
Points { get; } Gets Points array bounding barcode region
Quadrangle { get; } Gets Quadrangle bounding barcode region
Rectangle { get; } Gets Rectangle bounding barcode region

Methods

Name Description
override Equals(object) Returns a value indicating whether this instance is equal to a specified BarCodeRegionParameters value.
override GetHashCode() Returns the hash code for this instance.
override ToString() Returns a human-readable string representation of this BarCodeRegionParameters.
operator == Returns a value indicating whether the first BarCodeRegionParameters value is equal to the second.
operator != Returns a value indicating if the first BarCodeRegionParameters value is different from the second.

Examples

This sample shows how to get barcode Angle and bounding quadrangle values

[C#]
using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128, "12345"))
{
    generator.Save(@"c:\test.png");
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", DecodeType.Code39Standard, DecodeType.Code128))
{
    foreach (BarCodeResult result in reader.ReadBarCodes())
    {
        Console.WriteLine("BarCode CodeText: " + result.CodeText);
        Console.WriteLine("BarCode Angle: " + result.Region.Angle);
        Console.WriteLine("BarCode Quadrangle: " + result.Region.Quadrangle);
    }
}
[VB.NET]
Using generator As New BarcodeGenerator(EncodeTypes.Code128, "12345")
    generator.Save("c:\test.png")
End Using
Using reader As New BarCodeReader("c:\test.png", DecodeType.Code39Standard, DecodeType.Code128)
    For Each result As BarCodeResult In reader.ReadBarCodes()
        Console.WriteLine("BarCode CodeText: " + result.CodeText)
        Console.WriteLine("BarCode Angle: " + result.Region.Angle)
        Console.WriteLine("BarCode Quadrangle: " + result.Region.Quadrangle)
    Next
End Using

See Also