From 2ba2c46cf2ddd415d6018cb568493aab3ec8adc8 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 20 Mar 2020 14:51:20 +0000 Subject: [PATCH] LazMapViewer: Fix compilation with Laz 1.8.4 git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7333 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../lazmapviewer/source/mvde_intfgraphics.pas | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/components/lazmapviewer/source/mvde_intfgraphics.pas b/components/lazmapviewer/source/mvde_intfgraphics.pas index ddce7ec02..98326203b 100644 --- a/components/lazmapviewer/source/mvde_intfgraphics.pas +++ b/components/lazmapviewer/source/mvde_intfgraphics.pas @@ -5,7 +5,7 @@ unit mvDE_IntfGraphics; interface uses - Classes, SysUtils, Graphics, Types, LazVersion, + Classes, SysUtils, Graphics, Types, LclVersion, FPImage, FPCanvas, IntfGraphics, mvDrawingEngine; @@ -65,7 +65,14 @@ begin Result := (x >= min) and (x <= max); end; -{$IF Laz_FullVersion < 1090000} + +{$IF Lcl_FullVersion < 1090000} + +function IfThen(ACondition: Boolean; a, b: Integer): Integer; +begin + if ACondition then Result := a else Result := b; +end; + // Workaround for http://mantis.freepascal.org/view.php?id=27144 procedure CopyPixels(ASource, ADest: TLazIntfImage; XDst: Integer = 0; YDst: Integer = 0; @@ -117,9 +124,12 @@ begin ADest.Masked[x+XDst,y+YDst] := True; end; end; + {$IFEND} +{ TMvIntfGraphicsDrawingengine } + destructor TMvIntfGraphicsDrawingEngine.Destroy; begin FCanvas.Free; @@ -192,9 +202,9 @@ end; procedure TMvIntfGraphicsDrawingEngine.DrawLazIntfImage(X, Y: Integer; AImg: TLazIntfImage); begin - {$IF Laz_FullVersion < 1090000} + {$IF Lcl_FullVersion < 1090000} { Workaround for //http://mantis.freepascal.org/view.php?id=27144 } - CopyPixels(AImg, Buffer, X, Y); + CopyPixels(AImg, FBuffer, X, Y); {$ELSE} FBuffer.CopyPixels(AImg, X, Y); {$IFEND}