1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | class Color { private $r; private $g; private $b; private $a; function __construct($r, $g, $b, $a = 0) { $this->r = $r; $this->g = $g; $this->b = $b; $this->a = $a; } function getRed() { return $this->r; } function getGreen() { return $this->g; } function getBlue() { return $this->b; } function getAlpha() { return $this->a; } function getGDColor($im) { return imagecolorallocatealpha($im, $this->r, $this->g, $this->b, $this->a); } } |
Color 1.0
22 Nov 2009 at 10:41
No Comment
Leave a Reply
