x = $x;
$this->x_percentage = $x_percentage;
$this->y = $y;
$this->y_percentage = $y_percentage;
}
/**
* A "deep copy" routine; it is required for compatibility with PHP 5
*
* @return BackgroundPosition A copy of current object
*/
function ©() {
$value =& new BackgroundPosition($this->x, $this->x_percentage,
$this->y, $this->y_percentage);
return $value;
}
/**
* Test is current value is equal to default 'background-position' CSS property value
*/
function is_default() {
return
$this->x == 0 &&
$this->x_percentage &&
$this->y == 0 &&
$this->y_percentage;
}
/**
* Converts the absolute lengths to the device points
*
* @param float $font_size Font size to use during conversion of 'ex' and 'em' units
*/
function units2pt($font_size) {
if (!$this->x_percentage) {
$this->x = units2pt($this->x, $font_size);
};
if (!$this->y_percentage) {
$this->y = units2pt($this->y, $font_size);
};
}
}
?>