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

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

Inherits asposebarcode.Assist.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 asposebarcode.Assist.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 asposebarcode.Assist.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 asposebarcode.Generation.Unit.__init__ (   self,
  source 
)

Member Function Documentation

◆ equals()

def asposebarcode.Generation.Unit.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 null, the method returns false.

◆ getDocument()

def asposebarcode.Generation.Unit.getDocument (   self)

Gets size value in document units.

◆ getInches()

def asposebarcode.Generation.Unit.getInches (   self)

Gets size value in inches.

◆ getMillimeters()

def asposebarcode.Generation.Unit.getMillimeters (   self)

Gets size value in millimeters.

◆ getPixels()

def asposebarcode.Generation.Unit.getPixels (   self)

Gets size value in pixels.

◆ getPoint()

def asposebarcode.Generation.Unit.getPoint (   self)

Gets size value in point.

◆ init()

def asposebarcode.Generation.Unit.init (   self)

◆ initUnit()

def asposebarcode.Generation.Unit.initUnit (   source)
static

◆ setDocument()

def asposebarcode.Generation.Unit.setDocument (   self,
  value 
)

Sets size value in document units.

◆ setInches()

def asposebarcode.Generation.Unit.setInches (   self,
  value 
)

Sets size value in inches.

◆ setMillimeters()

def asposebarcode.Generation.Unit.setMillimeters (   self,
  value 
)

Sets size value in millimeters.

◆ setPixels()

def asposebarcode.Generation.Unit.setPixels (   self,
  value 
)

Sets size value in pixels.

◆ setPoint()

def asposebarcode.Generation.Unit.setPoint (   self,
  value 
)

Sets size value in point.

◆ toString()

def asposebarcode.Generation.Unit.toString (   self)

Returns a human-readable string representation of this Unit.

Returns
A string that represents this Unit.