PHP Class PHPRtfLite_Unit

Author: Steffen Zeidler ([email protected])
Show file Open project: phprtflite/phprtflite Class Usage Examples

Public Methods

Method Description
convertTo ( float $value, float $unitFrom, float $unitTo ) : float converts the value to another unit
getGlobalUnit ( ) : string gets global unit
getPointsInTwips ( float $value ) : integer gets points in twips
getUnitInTwips ( float $value ) : float gets unit in twips
setGlobalUnit ( string $unit ) sets global unit

Method Details

convertTo() public static method

converts the value to another unit
public static convertTo ( float $value, float $unitFrom, float $unitTo ) : float
$value float
$unitFrom float
$unitTo float
return float

getGlobalUnit() public static method

gets global unit
public static getGlobalUnit ( ) : string
return string

getPointsInTwips() public static method

gets points in twips
public static getPointsInTwips ( float $value ) : integer
$value float
return integer

getUnitInTwips() public static method

gets unit in twips
public static getUnitInTwips ( float $value ) : float
$value float
return float

setGlobalUnit() public static method

sets global unit
public static setGlobalUnit ( string $unit )
$unit string