|
$value
Value of this length |
|
$type
Type of this length |
|
$_absolutes
Definition of absolute length types |
|
$_fixeds
Definition of fixed length types |
|
$_method
Measurement method of this length |
|
$_ref
Reference of this length |
|
$_relatives
Definition of relative length types |
|
$_type
Type of this length |
|
$_types
Length type declarations |
|
$_value
Value of this length |
|
__construct (string|number $value, [string|null $type = null])
The constructor |
int |
compare (Sgss_Graphics_Length $length, [int $precision = -1])
Compares the measurement of this length with that of the specified length |
Sgss_Graphics_Length |
convertTo (string $type)
Converts the type of this length to the specified type of length |
boolean |
equals (Sgss_Graphics_Length $length, [int $precision = -1])
Determines the measurement of this length is equals to that of the specified length |
Sgss_Graphics_Length |
getLength (string $type)
Alias of the convertTo() |
string |
getType ()
Returns the type of this length |
number |
getValue ([string|null $type = null])
Returns the value of this length, or converts it into the specified type of length |
number |
pixel ()
|
Sgss_Graphics_Length |
referTo (Sgss_Graphics_Length_Interface $ref)
Sets the reference of this length to the specified value |
|
_contains (Sgss_Graphics_Length $ref)
Determines whether this length contains the specified length in the reference chain of this length |
|
_findRes ()
Returns the resolution in the reference chain of this length |
|
_methodOf (string $type)
Returns method of the specified type |
|
_needRef ()
Determines whether this length needs reference |
mixed |
__get (mixed $name)
|
array |
__sleep ()
|
string |
__toString ()
|
void |
__wakeup ()
|
CENTIMETER = 'CENTIMETER' |
Type of length |
EM = 'EM' |
Type of length |
EX = 'EX' |
Type of length |
FACTOR = 'FACTOR' |
Type of length |
INCH = 'INCH' |
Type of length |
METER = 'METER' |
Type of length |
METHOD_ABSOLUTE = 1 |
Absolute measurement type identifier |
METHOD_FIXED = 0 |
Fixed measurement type identifier |
METHOD_RELATIVE = 2 |
Relative measurement type identifier |
MILLIMETER = 'MILLIMETER' |
Type of length |
PERCENT = 'PERCENT' |
Type of length |
PERMILLE = 'PERMILLE' |
Type of length |
PICA = 'PICA' |
Type of length |
PIXEL = 'PIXEL' |
Type of length |
POINT = 'POINT' |
Type of length |
Definition of absolute length types
This takes the following form:
array(name1 => zend_measure_type1name2 => zend_measure_type2nameN => zend_measure_typeN);protected static array $_absolutes = array(...)
Definition of fixed length types
This takes the following form:
array(name1, name, ...., nameN);protected static array $_fixeds = array(...)
Measurement method of this length
protected int $_method
Reference of this length
protected Sgss_Graphics_Length_Interface|null $_ref = null
Definition of relative length types
array(name1 => array(multiplier1, class1),name2 => array(multiplier2, class2),nameN => array(multiplierN, classN));protected static array $_relatives = array(...)
Type of this length
protected string $_type
Length type declarations
This takes the following form:
array(suffix1 => name1suffix2 => name2suffixN => nameN);protected static array $_types = array(...)
Value of this length
protected number $_value
The constructor
string|number $value
Value or expression of length
string|null $type
Type of length
When the specified type is undefined
public __construct (string|number $value, [string|null $type = null])
Compares the measurement of this length with that of the specified length
Sgss_Graphics_Length $length
Length with which this length is to be compared
int $precision
Number of decimals to be compared
public int compare (Sgss_Graphics_Length $length, [int $precision = -1])
Converts the type of this length to the specified type of length
string $type
The type to which this length is to be converted
public Sgss_Graphics_Length convertTo (string $type)
Determines the measurement of this length is equals to that of the specified length
Sgss_Graphics_Length $length
Length with which this length is to be determined
int $precision
Number of decimals to be determined
public boolean equals (Sgss_Graphics_Length $length, [int $precision = -1])
Alias of the convertTo()
string $type
The type to which this length is to be converted
Returns the length of this object expressed in the specified type of length
public Sgss_Graphics_Length getLength (string $type)
Returns the type of this length
public string getType ()
Returns the value of this length, or converts it into the specified type of length
string|null $type
The type into which the value of this length is to be converted
When the specified type is undefined, or unable to convert
public number getValue ([string|null $type = null])
public number pixel ()
Sets the reference of this length to the specified value
Sgss_Graphics_Length_Interface $ref
Reference to be set
When the specified reference is illegal, or attempling to refer in cyclic
public Sgss_Graphics_Length referTo (Sgss_Graphics_Length_Interface $ref)
Determines whether this length contains the specified length in the reference chain of this length
Sgss_Graphics_Length $ref
Length to determine
protected boolean _contains (Sgss_Graphics_Length $ref)
Returns the resolution in the reference chain of this length
protected Sgss_Graphics_Length_Interface|null _findRes ()
Returns method of the specified type
string $type
Type to be converted
protected static int _methodOf (string $type)
Determines whether this length needs reference
protected boolean _needRef ()
mixed $name
public mixed __get (mixed $name)
public array __sleep ()
public string __toString ()
public void __wakeup ()
Type of length
const CENTIMETER = 'CENTIMETER'
Type of length
const EM = 'EM'
Type of length
const EX = 'EX'
Type of length
const FACTOR = 'FACTOR'
Type of length
const INCH = 'INCH'
Type of length
const METER = 'METER'
Absolute measurement type identifier
const METHOD_ABSOLUTE = 1
Fixed measurement type identifier
const METHOD_FIXED = 0
Relative measurement type identifier
const METHOD_RELATIVE = 2
Type of length
const MILLIMETER = 'MILLIMETER'
Type of length
const PERCENT = 'PERCENT'
Type of length
const PERMILLE = 'PERMILLE'
Type of length
const PICA = 'PICA'
Type of length
const PIXEL = 'PIXEL'
Type of length
const POINT = 'POINT'