Aspose.Barcode for Python via Java Generation and Recognition API docs

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

Inherits BaseJavaClass.

Public Member Functions

def __init__ (self, javaClass)
 
bool equals (self, BarCodeRegionParameters obj)
 Returns a value indicating whether this instance is equal to a specified BarCodeRegionParameters value. 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...
 
int hashCode (self)
 Returns the hash code for this instance. More...
 
None init (self)
 
str toString (self)
 Returns a human-readable string representation of this BarCodeRegionParameters. More...
 
- 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

◆ convertJavaPoints()

List[Assist.Point] convertJavaPoints (   javaPoints)
static

◆ equals()

bool equals (   self,
BarCodeRegionParameters  obj 
)

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.

◆ 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.

◆ hashCode()

int hashCode (   self)

Returns the hash code for this instance.

Returns
: A 32-bit signed integer hash code.

◆ init()

None init (   self)

Reimplemented from BaseJavaClass.

◆ toString()

str toString (   self)

Returns a human-readable string representation of this BarCodeRegionParameters.

Returns
: A string that represents this BarCodeRegionParameters.

Member Data Documentation

◆ points

points

◆ quad

quad

◆ rect

rect