@@ 415-424 (lines=10) @@ | ||
412 | return $this->page; |
|
413 | } |
|
414 | ||
415 | function SetDrawColor($r, $g=null, $b=null) |
|
416 | { |
|
417 | // Set color for all stroking operations |
|
418 | if(($r==0 && $g==0 && $b==0) || $g===null) |
|
419 | $this->DrawColor = sprintf('%.3F G',$r/255); |
|
420 | else |
|
421 | $this->DrawColor = sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255); |
|
422 | if($this->page>0) |
|
423 | $this->_out($this->DrawColor); |
|
424 | } |
|
425 | ||
426 | /** |
|
427 | * @param integer $r |
|
@@ 443-451 (lines=9) @@ | ||
440 | $this->_out($this->FillColor); |
|
441 | } |
|
442 | ||
443 | function SetTextColor($r, $g=null, $b=null) |
|
444 | { |
|
445 | // Set color for text |
|
446 | if(($r==0 && $g==0 && $b==0) || $g===null) |
|
447 | $this->TextColor = sprintf('%.3F g',$r/255); |
|
448 | else |
|
449 | $this->TextColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); |
|
450 | $this->ColorFlag = ($this->FillColor!=$this->TextColor); |
|
451 | } |
|
452 | ||
453 | function GetStringWidth($s) |
|
454 | { |