From: Joe Hunt Date: Tue, 19 Aug 2008 16:48:53 +0000 (+0000) Subject: Fixed some color conversion problems in the new PDF Engine X-Git-Tag: v2.4.2~19^2~1862 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=a7644a40245495d37dd13871b14e593f3c5e21ae;p=fa-stable.git Fixed some color conversion problems in the new PDF Engine --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b3b26f8f..981efd66 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/reporting/includes/class.pdf.inc b/reporting/includes/class.pdf.inc index 726919f8..7c182017 100644 --- a/reporting/includes/class.pdf.inc +++ b/reporting/includes/class.pdf.inc @@ -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); } diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 744e92bf..f09ab57f 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -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)