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

Barcode image generation parameters. More...

Inherits BaseJavaClass.

Public Member Functions

def __init__ (self, javaClass)
 
AutoSizeMode getAutoSizeMode (self)
 Specifies the different types of automatic sizing modes. More...
 
Tuple[int, int, int] getBackColor (self)
 
BarcodeParameters getBarcode (self)
 Gets the BarcodeParameters that contains all barcode properties. More...
 
BorderParameters getBorder (self)
 Gets the BorderParameters that contains all configuration properties for barcode border. More...
 
CaptionParameters getCaptionAbove (self)
 Caption Above the BarCode image. More...
 
CaptionParameters getCaptionBelow (self)
 Caption Below the BarCode image. More...
 
ImageParameters getImage (self)
 
'UnitgetImageHeight (self)
 BarCode image height when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION. More...
 
Unit getImageWidth (self)
 BarCode image width when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION. More...
 
float getResolution (self)
 Gets the resolution of the BarCode image. More...
 
float getRotationAngle (self)
 BarCode image rotation angle, measured in degree, e.g. More...
 
bool getUseAntiAlias (self)
 
None init (self)
 
None setAutoSizeMode (self, AutoSizeMode value)
 Specifies the different types of automatic sizing modes. More...
 
None setBackColor (self, Tuple[int, int, int] value)
 
None setImageHeight (self, Unit value)
 BarCode image height when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION. More...
 
None setImageWidth (self, Unit value)
 BarCode image width when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION. More...
 
None setResolution (self, float value)
 Sets the resolution of the BarCode image. More...
 
None setRotationAngle (self, float value)
 BarCode image rotation angle, measured in degree, e.g. More...
 
None setUseAntiAlias (self, bool value)
 
- Public Member Functions inherited from BaseJavaClass
def getJavaClass (self)
 
str getJavaClassName (self)
 
bool isNull (self)
 
None printJavaClassName (self)
 
None setJavaClass (self, javaClass)
 

Public Attributes

 imageHeight
 
 imageWidth
 
- Public Attributes inherited from BaseJavaClass
 javaClass
 
 javaClassName
 

Detailed Description

Barcode image generation parameters.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  javaClass 
)

Reimplemented from BaseJavaClass.

Member Function Documentation

◆ getAutoSizeMode()

AutoSizeMode getAutoSizeMode (   self)

Specifies the different types of automatic sizing modes.

Default value: AutoSizeMode.NONE.

◆ getBackColor()

Tuple[int, int, int] getBackColor (   self)
Retrieves the background color of the barcode image as an RGB tuple.

@return tuple[int, int, int] The background color in the format (Red, Green, Blue).

◆ getBarcode()

BarcodeParameters getBarcode (   self)

Gets the BarcodeParameters that contains all barcode properties.

◆ getBorder()

BorderParameters getBorder (   self)

Gets the BorderParameters that contains all configuration properties for barcode border.

◆ getCaptionAbove()

CaptionParameters getCaptionAbove (   self)

Caption Above the BarCode image.

See CaptionParameters.

◆ getCaptionBelow()

CaptionParameters getCaptionBelow (   self)

Caption Below the BarCode image.

See CaptionParameters.

◆ getImage()

ImageParameters getImage (   self)
    Image parameters. See ImageParameters
    @return ImageParameters

◆ getImageHeight()

'Unit' getImageHeight (   self)

BarCode image height when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.

◆ getImageWidth()

Unit getImageWidth (   self)

BarCode image width when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.

◆ getResolution()

float getResolution (   self)

Gets the resolution of the BarCode image.

One value for both dimensions. Default value: 96 dpi. The Resolution parameter value is less than or equal to 0.

◆ getRotationAngle()

float getRotationAngle (   self)

BarCode image rotation angle, measured in degree, e.g.

RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0. This sample shows how to create and save a BarCode image.

generator = Generation.BarcodeGenerator(Generation.EncodeTypes.DATA_MATRIX,"123456789")
generator.getParameters().setRotationAngle(7)
generator.save(self.image_path_to_save, Generation.BarCodeImageFormat.PNG)

◆ getUseAntiAlias()

bool getUseAntiAlias (   self)
    Gets a value indicating whether is used anti-aliasing mode to render image

◆ init()

None init (   self)

Reimplemented from BaseJavaClass.

◆ setAutoSizeMode()

None setAutoSizeMode (   self,
AutoSizeMode  value 
)

Specifies the different types of automatic sizing modes.

Default value: AutoSizeMode.NONE.

◆ setBackColor()

None setBackColor (   self,
Tuple[int, int, int]  value 
)
Sets the background color of the barcode image using an RGB tuple.

@param value A tuple (Red, Green, Blue) where each component is an integer from 0 to 255.
@throws Exception if the provided RGB values exceed the allowed range.

◆ setImageHeight()

None setImageHeight (   self,
Unit  value 
)

BarCode image height when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.

◆ setImageWidth()

None setImageWidth (   self,
Unit  value 
)

BarCode image width when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.

◆ setResolution()

None setResolution (   self,
float  value 
)

Sets the resolution of the BarCode image.

One value for both dimensions. Default value: 96 dpi. The Resolution parameter value is less than or equal to 0.

◆ setRotationAngle()

None setRotationAngle (   self,
float  value 
)

BarCode image rotation angle, measured in degree, e.g.

RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0.

This sample shows how to create and save a BarCode image.
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.DATA_MATRIX,"123456789")
generator.getParameters().setRotationAngle(7)
generator.save(self.image_path_to_save, Generation.BarCodeImageFormat.PNG)

◆ setUseAntiAlias()

None setUseAntiAlias (   self,
bool  value 
)
    Sets a value indicating whether is used anti-aliasing mode to render image

Member Data Documentation

◆ imageHeight

imageHeight

◆ imageWidth

imageWidth