lazmapviewer: Add new drawingengine based on BGRABitmap. Kindly provided by forum user jc99 (https://forum.lazarus.freepascal.org/index.php/topic,47164.msg337229.html#msg337229).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7169 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-10-24 13:03:45 +00:00
parent 7e20dce069
commit 28f7fccd9f
6 changed files with 477 additions and 10 deletions

View File

@@ -26,16 +26,19 @@
<FormatVersion Value="2"/>
<Modes Count="0"/>
</RunParams>
<RequiredPackages Count="3">
<RequiredPackages Count="4">
<Item1>
<PackageName Value="lazmapviewer_rgbgraphics"/>
<PackageName Value="lazmapviewer_bgra"/>
</Item1>
<Item2>
<PackageName Value="lazMapViewerPkg"/>
<PackageName Value="lazmapviewer_rgbgraphics"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
<PackageName Value="lazMapViewerPkg"/>
</Item3>
<Item4>
<PackageName Value="LCL"/>
</Item4>
</RequiredPackages>
<Units Count="4">
<Unit0>

View File

@@ -569,6 +569,7 @@ object MainForm: TMainForm
Items.Strings = (
'default'
'RGBGraphics'
'BGRABitmap'
)
OnChange = CbDrawingEngineChange
Style = csDropDownList
@@ -771,7 +772,7 @@ object MainForm: TMainForm
Left = 6
Height = 25
Top = 216
Width = 92
Width = 93
AutoSize = True
BorderSpacing.Top = 8
Caption = 'POI text font'
@@ -785,10 +786,10 @@ object MainForm: TMainForm
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = CbDrawingEngine
AnchorSideRight.Side = asrBottom
Left = 153
Left = 154
Height = 22
Top = 217
Width = 108
Width = 107
NoneColorColor = clWhite
Style = [cbStandardColors, cbExtendedColors, cbIncludeNone, cbCustomColor, cbPrettyNames, cbCustomColors]
Anchors = [akTop, akLeft, akRight]
@@ -802,7 +803,7 @@ object MainForm: TMainForm
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = BtnPOITextFont
AnchorSideTop.Side = asrCenter
Left = 106
Left = 107
Height = 15
Top = 221
Width = 39

View File

@@ -8,7 +8,7 @@ uses
Classes, SysUtils, Types, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, ComCtrls, Buttons, IntfGraphics, ColorBox,
mvGeoNames, mvMapViewer, mvTypes, mvGpsObj, mvDrawingEngine,
mvDE_RGBGraphics;
mvDE_RGBGraphics, mvDE_BGRA;
type
@@ -101,6 +101,7 @@ type
private
FRGBGraphicsDrawingEngine: TMvRGBGraphicsDrawingEngine;
FBGRADrawingEngine: TMvBGRADrawingEngine;
POIImage: TCustomBitmap;
procedure ClearFoundLocations;
procedure UpdateCoords(X, Y: Integer);
@@ -122,7 +123,7 @@ implementation
{$R *.lfm}
uses
LCLType, IniFiles, Math, FPCanvas, FPImage, FpImgCanv, GraphType,
LCLType, IniFiles, Math, FPCanvas, FPImage, GraphType,
mvEngine, mvGPX,
globals, gpslistform;
@@ -260,6 +261,11 @@ begin
FRGBGraphicsDrawingEngine := TMvRGBGraphicsDrawingEngine.Create(self);
MapView.DrawingEngine := FRGBGraphicsDrawingEngine;
end;
2: begin
if FBGRADrawingEngine = nil then
FBGRADrawingEngine := TMvBGRADrawingEngine.Create(self);
MapView.DrawingEngine := FBGRADrawingEngine;
end;
end;
end;