From 000cdb2e4cdcfdd10453bfd09039cc7432c63d78 Mon Sep 17 00:00:00 2001 From: vincents Date: Sat, 9 Oct 2004 17:15:42 +0000 Subject: [PATCH] Fix compilation with DisableFPImage defined. git-svn-id: trunk@6127 - --- lcl/postscriptcanvas.pas | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lcl/postscriptcanvas.pas b/lcl/postscriptcanvas.pas index 5054e0f8e5..70e89c3c7c 100644 --- a/lcl/postscriptcanvas.pas +++ b/lcl/postscriptcanvas.pas @@ -1391,7 +1391,7 @@ end; //Draw an picture with scale size procedure TPostscriptPrinterCanvas.StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic); -var X,Y,X1,Y1 : Integer; +var X1,Y1,X2,Y2 : Integer; DrawWidth : Integer; DrawHeight: Integer; ImgWidth : Integer; @@ -1402,13 +1402,13 @@ begin Changing; RequiredState([csHandleValid]); - X:=DestRect.Left; - Y:=DestRect.Top; - X1:=DestRect.Right; - Y1:=DestRect.Bottom; + X1:=DestRect.Left; + Y1:=DestRect.Top; + X2:=DestRect.Right; + Y2:=DestRect.Bottom; - TranslateCoord(X,Y); - TransLateCoord(X1,Y1); + TranslateCoord(X1,Y1); + TransLateCoord(X2,Y2); ImgWidth:=SrcGraphic.Width; ImgHeight:=SrcGraphic.Height; @@ -1416,12 +1416,12 @@ begin //if not FPImage then draw ab Rectangle because other wise PostScript //interpreter wait infinite some RGB datas {$ifndef DisableFPImage} - DrawWidth:=X1-X; - DrawHeight:=Y-Y1; + DrawWidth:=X2-X1; + DrawHeight:=Y1-Y2; ClearBuffer; WriteB('gsave'); - writeB(Format('%d %d translate',[X,Y-DrawHeight])); + writeB(Format('%d %d translate',[X1,Y1-DrawHeight])); WriteB(Format('%d %d scale',[DrawWidth,DrawHeight])); WriteB(Format('/scanline %d 3 mul string def',[ImgWidth])); WriteB(Format('%d %d %d',[ImgWidth,ImgHeight,8]));