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

Specifies the size value in different units (Pixel, Inches, etc.). More...

Inherits BaseJavaClass.

Public Member Functions

def __init__ (self, source)
 
def init (self)
 
def getPixels (self)
 Gets size value in pixels. More...
 
def setPixels (self, value)
 Sets size value in pixels. More...
 
def getInches (self)
 Gets size value in inches. More...
 
def setInches (self, value)
 Sets size value in inches. More...
 
def getMillimeters (self)
 Gets size value in millimeters. More...
 
def setMillimeters (self, value)
 Sets size value in millimeters. More...
 
def getPoint (self)
 Gets size value in point. More...
 
def setPoint (self, value)
 Sets size value in point. More...
 
def getDocument (self)
 Gets size value in document units. More...
 
def setDocument (self, value)
 Sets size value in document units. More...
 
def toString (self)
 Returns a human-readable string representation of this Unit. More...
 
def equals (self, obj)
 Determines whether this instance and a specified object, which must also be a Unit object, have the same value. More...
 
- Public Member Functions inherited from BaseJavaClass
def getJavaClass (self)
 
def setJavaClass (self, javaClass)
 
def getJavaClassName (self)
 
def isNull (self)
 
def printJavaClassName (self)
 

Static Public Member Functions

def initUnit (source)
 

Additional Inherited Members

- Public Attributes inherited from BaseJavaClass
 javaClass
 
 javaClassName
 

Detailed Description

Specifies the size value in different units (Pixel, Inches, etc.).

This sample shows how to create and save a BarCode image.

generator = BarcodeGenerator(EncodeTypes.CODE_128)
generator.getParameters().getBarcode().getBarHeight().setMillimeters(10)
generator.save("test.png")

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  source 
)

Reimplemented from BaseJavaClass.

Member Function Documentation

◆ equals()

def equals (   self,
  obj 
)

Determines whether this instance and a specified object, which must also be a Unit object, have the same value.

Parameters
objThe Unit to compare to this instance.
Returns
true if obj is a Unit and its value is the same as this instance otherwise, false. If obj is None, the method returns false.

◆ getDocument()

def getDocument (   self)

Gets size value in document units.

◆ getInches()

def getInches (   self)

Gets size value in inches.

◆ getMillimeters()

def getMillimeters (   self)

Gets size value in millimeters.

◆ getPixels()

def getPixels (   self)

Gets size value in pixels.

◆ getPoint()

def getPoint (   self)

Gets size value in point.

◆ init()

def init (   self)

Reimplemented from BaseJavaClass.

◆ initUnit()

def initUnit (   source)
static

◆ setDocument()

def setDocument (   self,
  value 
)

Sets size value in document units.

◆ setInches()

def setInches (   self,
  value 
)

Sets size value in inches.

◆ setMillimeters()

def setMillimeters (   self,
  value 
)

Sets size value in millimeters.

◆ setPixels()

def setPixels (   self,
  value 
)

Sets size value in pixels.

◆ setPoint()

def setPoint (   self,
  value 
)

Sets size value in point.

◆ toString()

def toString (   self)

Returns a human-readable string representation of this Unit.

Returns
A string that represents this Unit.