|
@@ 2290-2296 (lines=7) @@
|
| 2287 |
|
* sets the colour for fill operations |
| 2288 |
|
* @access public |
| 2289 |
|
*/ |
| 2290 |
|
public function setColor($r, $g, $b, $force = 0) |
| 2291 |
|
{ |
| 2292 |
|
if ($r>=0 && ($force || $r!=$this->currentColour['r'] || $g!=$this->currentColour['g'] || $b!=$this->currentColour['b'])) { |
| 2293 |
|
$this->objects[$this->currentContents]['c'].="\n".sprintf('%.3F', $r).' '.sprintf('%.3F', $g).' '.sprintf('%.3F', $b).' rg'; |
| 2294 |
|
$this->currentColour=array('r'=>$r,'g'=>$g,'b'=>$b); |
| 2295 |
|
} |
| 2296 |
|
} |
| 2297 |
|
|
| 2298 |
|
/** |
| 2299 |
|
* sets the colour for stroke operations |
|
@@ 2302-2308 (lines=7) @@
|
| 2299 |
|
* sets the colour for stroke operations |
| 2300 |
|
* @access public |
| 2301 |
|
*/ |
| 2302 |
|
public function setStrokeColor($r, $g, $b, $force = 0) |
| 2303 |
|
{ |
| 2304 |
|
if ($r>=0 && ($force || $r!=$this->currentStrokeColour['r'] || $g!=$this->currentStrokeColour['g'] || $b!=$this->currentStrokeColour['b'])) { |
| 2305 |
|
$this->objects[$this->currentContents]['c'].="\n".sprintf('%.3F', $r).' '.sprintf('%.3F', $g).' '.sprintf('%.3F', $b).' RG'; |
| 2306 |
|
$this->currentStrokeColour=array('r'=>$r,'g'=>$g,'b'=>$b); |
| 2307 |
|
} |
| 2308 |
|
} |
| 2309 |
|
|
| 2310 |
|
/** |
| 2311 |
|
* draw a line from one set of coordinates to another |