‪Aspose.Barcode for PHP via Java  22.4
‪Aspose.Barcode for PHP via Java Generation and Recognition API docs
Unit Class Reference

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)
 
 getJavaClass ()
 
 getJavaClassName ()
 
 isNull ()
 
 printJavaClassName ()
 

Protected Member Functions

 init ()
 
 setJavaClass ($javaClass)
 

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$obj‪The 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.

◆ getJavaClass()

BaseJavaClass::getJavaClass ( )
inherited

◆ getJavaClassName()

BaseJavaClass::getJavaClassName ( )
inherited

◆ 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.

◆ isNull()

BaseJavaClass::isNull ( )
inherited

◆ printJavaClassName()

BaseJavaClass::printJavaClassName ( )
inherited

◆ setDocument()

Unit::setDocument ( float  $value)

Sets size value in document units.

◆ setInches()

Unit::setInches ( float  $value)

Sets size value in inches.

◆ setJavaClass()

BaseJavaClass::setJavaClass (   $javaClass)
protectedinherited

◆ 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.