Aspose.BarCode for Python via Java  24.11
Aspose.Barcode for Python via Java Generation and Recognition API docs
BarCodeRegionParameters Class Reference

Represents the recognized barcode's region and barcode angle. More...

Inherits BaseJavaClass.

Public Member Functions

def __init__ (self, javaClass)
 
bool __eq__ (self, BarCodeRegionParameters other)
 Returns a value indicating whether this instance is equal to a specified BarCodeRegionParameters value. More...
 
int __hash__ (self)
 Returns the hash code for the current instance. More...
 
str __str__ (self)
 Returns a human-readable string representation of this BarCodeRegionParameters. More...
 
float getAngle (self)
 Gets the angle of the barcode (0-360). More...
 
Optional[List[Assist.Point]] getPoints (self)
 Gets Points array bounding barcode region. More...
 
Optional[QuadranglegetQuadrangle (self)
 Gets Quadrangle bounding barcode region. More...
 
Optional[Assist.RectanglegetRectangle (self)
 Gets Rectangle bounding barcode region. More...
 
None init (self)
 
- Public Member Functions inherited from BaseJavaClass
def getJavaClass (self)
 
str getJavaClassName (self)
 
bool isNull (self)
 
None printJavaClassName (self)
 
None setJavaClass (self, javaClass)
 

Static Public Member Functions

List[Assist.PointconvertJavaPoints (javaPoints)
 

Public Attributes

 points
 
 quad
 
 rect
 
- Public Attributes inherited from BaseJavaClass
 javaClass
 
 javaClassName
 

Detailed Description

Represents the recognized barcode's region and barcode angle.

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

generator = Generation.BarcodeGenerator(Generation.EncodeTypes.CODE_128, "12345")
generator.save(self.image_path_to_save, Generation.BarCodeImageFormat.PNG)
reader = Recognition.BarCodeReader(self.image_path_to_save, None, [Recognition.DecodeType.CODE_39, Recognition.DecodeType.CODE_128])
for result in reader.readBarCodes():
print("\nBarCode CodeText: " + result.getCodeText())
print("BarCode Angle: " + str(result.getRegion().getAngle()))
print("BarCode Quadrangle: " + str(result.getRegion().getQuadrangle()))

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  javaClass 
)

Reimplemented from BaseJavaClass.

Member Function Documentation

◆ __eq__()

bool __eq__ (   self,
BarCodeRegionParameters  other 
)

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

Parameters
obj An object value to compare to this instance.
Returns
: True if obj has the same value as this instance, otherwise False.

◆ __hash__()

int __hash__ (   self)

Returns the hash code for the current instance.

Returns
A hash code for the current object.

◆ __str__()

str __str__ (   self)

Returns a human-readable string representation of this BarCodeRegionParameters.

Returns
: A string that represents this BarCodeRegionParameters.

◆ convertJavaPoints()

List[Assist.Point] convertJavaPoints (   javaPoints)
static

◆ getAngle()

float getAngle (   self)

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

Returns
: The angle for barcode (0-360).

◆ getPoints()

Optional[List[Assist.Point]] getPoints (   self)

Gets Points array bounding barcode region.

Returns
: Returns Points array bounding barcode region.

◆ getQuadrangle()

Optional[Quadrangle] getQuadrangle (   self)

Gets Quadrangle bounding barcode region.

Returns
Quadrangle bounding barcode region.

◆ getRectangle()

Optional[Assist.Rectangle] getRectangle (   self)

Gets Rectangle bounding barcode region.

Returns
: Returns Rectangle bounding barcode region.

◆ init()

None init (   self)

Reimplemented from BaseJavaClass.

Member Data Documentation

◆ points

points

◆ quad

quad

◆ rect

rect