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

Inherits BaseJavaClass.

Public Member Functions

 __construct ($source)
 
 getPixels ()
 
 setPixels (float $value)
 
 getInches ()
 
 setInches (float $value)
 
 getMillimeters ()
 
 setMillimeters (float $value)
 
 getPoint ()
 
 setPoint (float $value)
 
 getDocument ()
 
 setDocument (float $value)
 
 toString ()
 
 equals (Unit $obj)
 
- Public Member Functions inherited from BaseJavaClass
 getJavaClass ()
 
 getJavaClassName ()
 
 isNull ()
 
 printJavaClassName ()
 

Protected Member Functions

 init ()
 
- Protected Member Functions inherited from BaseJavaClass
 setJavaClass ($javaClass)
 

Static Private Member Functions

static initUnit ($source)
 

Detailed Description

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

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

$generator->getParameters()->getBarcode()->getBarHeight()->setMillimeters(10);
$generator->save("test.png");

Constructor & Destructor Documentation

◆ __construct()

Unit::__construct (   $source)

Reimplemented from BaseJavaClass.

Member Function Documentation

◆ equals()

Unit::equals ( Unit  $obj)

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

Parameters
Unit$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()

Unit::getDocument ( )

Gets size value in document units.

◆ getInches()

Unit::getInches ( )

Gets size value in inches.

◆ getMillimeters()

Unit::getMillimeters ( )

Gets size value in millimeters.

◆ getPixels()

Unit::getPixels ( )

Gets size value in pixels.

◆ getPoint()

Unit::getPoint ( )

Gets size value in point.

◆ init()

Unit::init ( )
protected

Reimplemented from BaseJavaClass.

◆ initUnit()

static Unit::initUnit (   $source)
staticprivate

◆ setDocument()

Unit::setDocument ( float  $value)

Sets size value in document units.

◆ setInches()

Unit::setInches ( float  $value)

Sets size value in inches.

◆ setMillimeters()

Unit::setMillimeters ( float  $value)

Sets size value in millimeters.

◆ setPixels()

Unit::setPixels ( float  $value)

Sets size value in pixels.

◆ setPoint()

Unit::setPoint ( float  $value)

Sets size value in point.

◆ toString()

Unit::toString ( )

Returns a human-readable string representation of this Unit.

Returns
string that represents this Unit.