From be2491b093b1f0ca430bede679ecbb670041e483 Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 2 Jul 2013 09:46:45 +0400 Subject: restructuring of boca's git --- src/libchart/classes/Primitive.php | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/libchart/classes/Primitive.php (limited to 'src/libchart/classes/Primitive.php') diff --git a/src/libchart/classes/Primitive.php b/src/libchart/classes/Primitive.php new file mode 100644 index 0000000..9e5a896 --- /dev/null +++ b/src/libchart/classes/Primitive.php @@ -0,0 +1,59 @@ +img = $img; + } + + /** + * Draws a straight line + * + * @access public + * @param integer line start (X) + * @param integer line start (Y) + * @param integer line end (X) + * @param integer line end (Y) + * @param Color line color + */ + + function line($x1, $y1, $x2, $y2, $color, $width = 1) + { + imagefilledpolygon($this->img, array($x1, $y1 - $width / 2, $x1, $y1 + $width / 2, $x2, $y2 + $width / 2, $x2, $y2 - $width / 2), 4, $color->getColor($this->img)); +// imageline($this->img, $x1, $y1, $x2, $y2, $color->getColor($this->img)); + } + } +?> -- cgit v1.2.3