summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorJean-Marc Levecque <jean-marc.levecque@jmlesite.fr>2012-04-11 10:56:06 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-04-11 10:56:06 +0200
commit97e64210f7e4304fc43d9a4a1d08b581b73e7a86 (patch)
tree60d35eb737b9051430fcec3e39a9b60319c77543 /extras
parent6a207381e677de1e58cfcac14f4ca3a8fd1b27eb (diff)
downloadfpGUI-97e64210f7e4304fc43d9a4a1d08b581b73e7a86.tar.xz
pdf: Testing for color values of -1 is not needed any more.
Diffstat (limited to 'extras')
-rw-r--r--extras/contributed/report_tool/reportengine/u_pdf.pas24
1 files changed, 6 insertions, 18 deletions
diff --git a/extras/contributed/report_tool/reportengine/u_pdf.pas b/extras/contributed/report_tool/reportengine/u_pdf.pas
index 59f6d606..0ee3c1ea 100644
--- a/extras/contributed/report_tool/reportengine/u_pdf.pas
+++ b/extras/contributed/report_tool/reportengine/u_pdf.pas
@@ -1502,12 +1502,8 @@ for Cpt:= 0 to Pred(PdfPage.Count) do
// adjust font size to display device
Fnt.FTxtSize:= IntToStr(Round((StrToInt(FontSize)*fpgApplication.Screen_dpi_y) div 72));
TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Fnt);
- if Couleur> -1
- then
- begin
- Clr:= TPdfColor.CreateColor(True,Couleur);
- TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Clr);
- end;
+ Clr:= TPdfColor.CreateColor(True,Couleur);
+ TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Clr);
end;
Txt:= TPdfText.CreateText(TextPosX,TextPosY,Writting);
TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Txt);
@@ -1518,12 +1514,8 @@ for Cpt:= 0 to Pred(PdfPage.Count) do
then
with TPdfRect(PdfPage[Cpt]) do
begin
- if RectColor> -1
- then
- begin
- Clr:= TPdfColor.CreateColor(True,RectColor);
- TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Clr);
- end;
+ Clr:= TPdfColor.CreateColor(True,RectColor);
+ TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Clr);
if RectStroke
then
begin
@@ -1539,12 +1531,8 @@ for Cpt:= 0 to Pred(PdfPage.Count) do
then
with TPdfLine(PdfPage[Cpt]) do
begin
- if LineColor> -1
- then
- begin
- Clr:= TPdfColor.CreateColor(False,LineColor);
- TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Clr);
- end;
+ Clr:= TPdfColor.CreateColor(False,LineColor);
+ TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Clr);
Sty:= TPdfLineStyle.CreateLineStyle(LineStyle,0);
TPdfStream(TPdfXRef(FXRefObjets[PageNum]).FStream).AddItem(Sty);
Lin:= TPdfLigne.CreateLigne(LineThikness,LineBeginX,LineBeginY,LineEndX,LineEndY);