Differential D350 Diff 976 branches/5.2.x/core/units/general/libchart/classes/view/primitive/Primitive.php
Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/general/libchart/classes/view/primitive/Primitive.php
Show All 26 Lines | |||||
class LibchartPrimitive { | class LibchartPrimitive { | ||||
private $img; | private $img; | ||||
/** | /** | ||||
* Creates a new primitive object | * Creates a new primitive object | ||||
* | * | ||||
* @param resource GD image resource | * @param resource GD image resource | ||||
*/ | */ | ||||
public function LibchartPrimitive($img) { | public function __construct($img) { | ||||
$this->img = $img; | $this->img = $img; | ||||
} | } | ||||
/** | /** | ||||
* Draws a straight line. | * Draws a straight line. | ||||
* | * | ||||
* @param integer line start (X) | * @param integer line start (X) | ||||
* @param integer line start (Y) | * @param integer line start (Y) | ||||
Show All 19 Lines | |||||
public function outlinedBox($x1, $y1, $x2, $y2, $color0, $color1) { | public function outlinedBox($x1, $y1, $x2, $y2, $color0, $color1) { | ||||
imagefilledrectangle($this->img, $x1, $y1, $x2, $y2, $color0->getColor($this->img)); | imagefilledrectangle($this->img, $x1, $y1, $x2, $y2, $color0->getColor($this->img)); | ||||
imagerectangle($this->img, $x1, $y1, $x1 + 1, $y1 + 1, $color1->getColor($this->img)); | imagerectangle($this->img, $x1, $y1, $x1 + 1, $y1 + 1, $color1->getColor($this->img)); | ||||
imagerectangle($this->img, $x2 - 1, $y1, $x2, $y1 + 1, $color1->getColor($this->img)); | imagerectangle($this->img, $x2 - 1, $y1, $x2, $y1 + 1, $color1->getColor($this->img)); | ||||
imagerectangle($this->img, $x1, $y2 - 1, $x1 + 1, $y2, $color1->getColor($this->img)); | imagerectangle($this->img, $x1, $y2 - 1, $x1 + 1, $y2, $color1->getColor($this->img)); | ||||
imagerectangle($this->img, $x2 - 1, $y2 - 1, $x2, $y2, $color1->getColor($this->img)); | imagerectangle($this->img, $x2 - 1, $y2 - 1, $x2, $y2, $color1->getColor($this->img)); | ||||
} | } | ||||
} | } | ||||
No newline at end of file |