Docs For Class WideImage_Coordinate

Internals

# Class: WideImage_Coordinate Source Location: /Coordinate.php
### Class Overview
A utility class for smart coordinates | ### Variables $coord_align $coord_numeric | ### Methods evaluate fix parse
### Class Details [line 36] A utility class for smart coordinates [ Top ] ### Class Variables #### static $coord_align = array("left", "center", "right", "top", "middle", "bottom") [line 38] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### static $coord_numeric = array("[0-9]+", "[0-9]+\.[0-9]+", "[0-9]+%", "[0-9]+\.[0-9]+%") [line 39] #### Tags:
access: | protected
Type: | mixed
[ Top ] ### Class Methods ### static method evaluate [line 102]
`static int evaluate( string $coord, int $dim, [int $sec_dim = null])`
Evaluates the $coord relatively to $dim #### Tags:
return: | Calculated value
#### Parameters:
string | $coord | A numeric value or percent string
int | $dim | Dimension
int | $sec_dim | Secondary dimension (for align)
[ Top ] ### static method fix [line 167]
`static int fix( mixed $value, int $dim, [int $sec_dim = null])`
Calculates and fixes a smart coordinate into a numeric value #### Tags:
return: | Calculated value
#### Parameters:
mixed | $value | Smart coordinate, relative to $dim
int | $dim | Coordinate to which $value is relative
int | $sec_dim | Secondary dimension (for align)
[ Top ] ### static method parse [line 47]
`static array parse( $c, string $coord)`
Parses a numeric or string representation of a corrdinate into a structure #### Tags:
return: | Parsed smart coordinate
#### Parameters:
string | $coord | Smart coordinate
| $c |
[ Top ] Documentation generated on Sat, 19 Feb 2011 12:55:41 +0100 by phpDocumentor 1.4.3