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

Barcode image generation parameters. More...

Inherits _MwWrapper.

Public Member Functions

def __init__ (self, _java_class)
 
AutoSizeMode auto_size_mode (self)
 Specifies the different types of automatic sizing modes. More...
 
None auto_size_mode (self, AutoSizeMode value)
 Specifies the different types of automatic sizing modes. More...
 
Tuple[int, int, int] back_color (self)
 
None back_color (self, Tuple[int, int, int] value)
 
BarcodeParameters barcode (self)
 Gets the BarcodeParameters that contains all barcode properties. More...
 
BorderParameters border (self)
 Gets the BorderParameters that contains all configuration properties for barcode border. More...
 
CaptionParameters caption_above (self)
 Caption Above the BarCode image. More...
 
CaptionParameters caption_below (self)
 Caption Below the BarCode image. More...
 
ImageParameters image (self)
 
Unit image_height (self)
 BarCode image height when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION. More...
 
None image_height (self, Unit value)
 BarCode image height when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION. More...
 
Unit image_width (self)
 BarCode image width when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION. More...
 
None image_width (self, Unit value)
 BarCode image width when AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION. More...
 
float resolution (self)
 Gets the resolution of the BarCode image. More...
 
None resolution (self, float value)
 Sets the resolution of the BarCode image. More...
 
float rotation_angle (self)
 BarCode image rotation angle, measured in degree, e.g. More...
 
None rotation_angle (self, float value)
 BarCode image rotation angle, measured in degree, e.g. More...
 
bool use_anti_alias (self)
 
None use_anti_alias (self, bool value)
 

Detailed Description

Barcode image generation parameters.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  _java_class 
)

Member Function Documentation

◆ auto_size_mode() [1/2]

AutoSizeMode auto_size_mode (   self)

Specifies the different types of automatic sizing modes.

Default value: AutoSizeMode.NONE.

◆ auto_size_mode() [2/2]

None auto_size_mode (   self,
AutoSizeMode  value 
)

Specifies the different types of automatic sizing modes.

Default value: AutoSizeMode.NONE.

◆ back_color() [1/2]

Tuple[int, int, int] back_color (   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).

◆ back_color() [2/2]

None back_color (   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.

◆ barcode()

BarcodeParameters barcode (   self)

Gets the BarcodeParameters that contains all barcode properties.

◆ border()

BorderParameters border (   self)

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

◆ caption_above()

CaptionParameters caption_above (   self)

Caption Above the BarCode image.

See CaptionParameters.

◆ caption_below()

CaptionParameters caption_below (   self)

Caption Below the BarCode image.

See CaptionParameters.

◆ image()

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

◆ image_height() [1/2]

Unit image_height (   self)

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

◆ image_height() [2/2]

None image_height (   self,
Unit  value 
)

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

◆ image_width() [1/2]

Unit image_width (   self)

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

◆ image_width() [2/2]

None image_width (   self,
Unit  value 
)

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

◆ resolution() [1/2]

float resolution (   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.

◆ resolution() [2/2]

None resolution (   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.

◆ rotation_angle() [1/2]

float rotation_angle (   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 = BarcodeGenerator(EncodeTypes.DATA_MATRIX, "123456789")
generator.parameters.rotation_angle = 7
generator.save(self.image_path_to_save, BarCodeImageFormat.PNG)

◆ rotation_angle() [2/2]

None rotation_angle (   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 = BarcodeGenerator(EncodeTypes.DATA_MATRIX, "123456789")
generator.parameters.rotation_angle = 7
generator.save(self.image_path_to_save, BarCodeImageFormat.PNG)

◆ use_anti_alias() [1/2]

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

◆ use_anti_alias() [2/2]

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