Class BarCodeRegionParameters

Class BarCodeRegionParameters

Namespace: Aspose.BarCode.BarCodeRecognition
Assembly: Aspose.BarCode.dll (25.2.0)

Represents the recognized barcode’s region and barcode angle

public sealed class BarCodeRegionParameters

Inheritance

objectBarCodeRegionParameters

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Examples

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

using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128, "12345"))
{
    generator.Save(@"c:\test.png");
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", DecodeType.Code39, 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);
    }
}
Using generator As New BarcodeGenerator(EncodeTypes.Code128, "12345")
    generator.Save("c:\test.png")
End Using
Using reader As New BarCodeReader("c:\test.png", DecodeType.Code39, 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

Properties

Angle

Gets the angle of the barcode (0-360).

public double Angle { get; }

Property Value

double

Points

Gets System.Drawing.Points array bounding barcode region

public Point[] Points { get; }

Property Value

Point[]

Quadrangle

Gets Aspose.BarCode.BarCodeRecognition.Quadrangle bounding barcode region

public Quadrangle Quadrangle { get; }

Property Value

Quadrangle

Rectangle

Gets System.Drawing.Rectangle bounding barcode region

public Rectangle Rectangle { get; }

Property Value

Rectangle

Methods

Equals(object)

Returns a value indicating whether this instance is equal to a specified Aspose.BarCode.BarCodeRecognition.BarCodeRegionParameters value.

public override bool Equals(object obj)

Parameters

obj object

An System.Object value to compare to this instance.

Returns

bool

true if obj has the same value as this instance; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer hash code.

ToString()

Returns a human-readable string representation of this Aspose.BarCode.BarCodeRecognition.BarCodeRegionParameters.

public override string ToString()

Returns

string

A string that represents this Aspose.BarCode.BarCodeRecognition.BarCodeRegionParameters.

Operators

operator ==(BarCodeRegionParameters, BarCodeRegionParameters)

Returns a value indicating whether the first Aspose.BarCode.BarCodeRecognition.BarCodeRegionParameters value is equal to the second.

public static bool operator ==(BarCodeRegionParameters first, BarCodeRegionParameters second)

Parameters

first BarCodeRegionParameters

A first compared value

second BarCodeRegionParameters

A second compared value

Returns

bool

true if first has the same value as second; otherwise, false.

operator !=(BarCodeRegionParameters, BarCodeRegionParameters)

Returns a value indicating if the first Aspose.BarCode.BarCodeRecognition.BarCodeRegionParameters value is different from the second.

public static bool operator !=(BarCodeRegionParameters first, BarCodeRegionParameters second)

Parameters

first BarCodeRegionParameters

A first compared value

second BarCodeRegionParameters

A second compared value

Returns

bool

true if first has the different value from second; otherwise, false.

 English