mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-16 00:02:48 +02:00
Fix compilation with DisableFPImage defined.
git-svn-id: trunk@6127 -
This commit is contained in:
parent
ff34364753
commit
000cdb2e4c
@ -1391,7 +1391,7 @@ end;
|
|||||||
|
|
||||||
//Draw an picture with scale size
|
//Draw an picture with scale size
|
||||||
procedure TPostscriptPrinterCanvas.StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic);
|
procedure TPostscriptPrinterCanvas.StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic);
|
||||||
var X,Y,X1,Y1 : Integer;
|
var X1,Y1,X2,Y2 : Integer;
|
||||||
DrawWidth : Integer;
|
DrawWidth : Integer;
|
||||||
DrawHeight: Integer;
|
DrawHeight: Integer;
|
||||||
ImgWidth : Integer;
|
ImgWidth : Integer;
|
||||||
@ -1402,13 +1402,13 @@ begin
|
|||||||
Changing;
|
Changing;
|
||||||
RequiredState([csHandleValid]);
|
RequiredState([csHandleValid]);
|
||||||
|
|
||||||
X:=DestRect.Left;
|
X1:=DestRect.Left;
|
||||||
Y:=DestRect.Top;
|
Y1:=DestRect.Top;
|
||||||
X1:=DestRect.Right;
|
X2:=DestRect.Right;
|
||||||
Y1:=DestRect.Bottom;
|
Y2:=DestRect.Bottom;
|
||||||
|
|
||||||
TranslateCoord(X,Y);
|
TranslateCoord(X1,Y1);
|
||||||
TransLateCoord(X1,Y1);
|
TransLateCoord(X2,Y2);
|
||||||
|
|
||||||
ImgWidth:=SrcGraphic.Width;
|
ImgWidth:=SrcGraphic.Width;
|
||||||
ImgHeight:=SrcGraphic.Height;
|
ImgHeight:=SrcGraphic.Height;
|
||||||
@ -1416,12 +1416,12 @@ begin
|
|||||||
//if not FPImage then draw ab Rectangle because other wise PostScript
|
//if not FPImage then draw ab Rectangle because other wise PostScript
|
||||||
//interpreter wait infinite some RGB datas
|
//interpreter wait infinite some RGB datas
|
||||||
{$ifndef DisableFPImage}
|
{$ifndef DisableFPImage}
|
||||||
DrawWidth:=X1-X;
|
DrawWidth:=X2-X1;
|
||||||
DrawHeight:=Y-Y1;
|
DrawHeight:=Y1-Y2;
|
||||||
ClearBuffer;
|
ClearBuffer;
|
||||||
|
|
||||||
WriteB('gsave');
|
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('%d %d scale',[DrawWidth,DrawHeight]));
|
||||||
WriteB(Format('/scanline %d 3 mul string def',[ImgWidth]));
|
WriteB(Format('/scanline %d 3 mul string def',[ImgWidth]));
|
||||||
WriteB(Format('%d %d %d',[ImgWidth,ImgHeight,8]));
|
WriteB(Format('%d %d %d',[ImgWidth,ImgHeight,8]));
|
||||||
|
Loading…
Reference in New Issue
Block a user