Fixed some color conversion problems in the new PDF Engine
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 19 Aug 2008 16:48:53 +0000 (16:48 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 19 Aug 2008 16:48:53 +0000 (16:48 +0000)
CHANGELOG.txt
reporting/includes/class.pdf.inc
reporting/includes/pdf_report.inc

index b3b26f8f1caa9ce12cefcd5a2270dbf441b8e298..981efd66cf3022ade9936f428f07a835a2209c9f 100644 (file)
@@ -19,6 +19,11 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+19-Aug-2008 Joe Hunt
+# Fixed some color conversion problems in the new PDF Engine
+$ /reporting/includes/pdf_report.inc
+  /reporting/includes/class.pdf.inc
+  
 19-Aut-2008 Joe Hunt
 ! Optimized the textwraplines in pdf_report.inc and header2.inc
   /reporting/includes/pdf_report.inc
index 726919f896de3142baa16634e6e14e0f95b51d43..7c182017526dc8cd406e95c39f3946f55e719ed5 100644 (file)
@@ -263,7 +263,7 @@ class Cpdf extends TCPDF {
 */
     function setStrokeColor($r,$g,$b,$force=0)
     {
-        TCPDF::SetDrawColor(255*$r,255*$g,255*$b);
+        TCPDF::SetDrawColor($r,$g,$b);
     }
 /**
 * this sets the line drawing style.
@@ -283,7 +283,7 @@ class Cpdf extends TCPDF {
                $this->SetLineWidth($width);
        }
 
-       function Text($x, $y, $txt, $stroke=0, $clip=false) 
+       function Text($x, $y, $txt, $stroke=0, $clip=false)
        {
                TCPDF::Text($x,$y, TCPDF::unhtmlentities($txt), $stroke, $clip);
        }
index 744e92bfcbe56a86955efcbb23c7f84ccd0eddaa..f09ab57fcd3d81d3d5ab45b1b10cff6645a4540d 100644 (file)
@@ -278,12 +278,12 @@ class FrontReport extends Cpdf
 
        function SetDrawColor($r, $g, $b)
        {
-               $this->setStrokeColor($r / 255, $g / 255, $b / 255);
+               $this->setStrokeColor($r, $g, $b);
        }
 
        function SetTextColor($r, $g, $b)
        {
-               TCPDF::SetTextColor($r / 255, $g / 255, $b / 255);
+               TCPDF::SetTextColor($r, $g, $b);
        }
 
        function Text($c, $txt, $n=0, $corr=0, $r=0)