LazMapViewer: Fix transparency of marker images in the RGBGraphics drawing engine.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9320 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
d8caf811af
commit
2d0654b66a
@ -101,7 +101,7 @@ procedure Register;
|
||||
implementation
|
||||
|
||||
uses
|
||||
GraphType, LCLType, FPImage, Math;
|
||||
GraphType, LCLType, FPImage, fpwritepng, Math;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
@ -199,8 +199,12 @@ begin
|
||||
AResult^ := RGBToRGB32PixelInline(r1, g1, b1);
|
||||
end;
|
||||
|
||||
{ Alpha-blends the bitmap into the background image with the specified alpha
|
||||
for the bitmap.
|
||||
When AAlpha = -1 it is assumed that ABitmap itself contains an alpha-channel
|
||||
to be used for the blending process. }
|
||||
procedure AlphaBlendImages(ABackground, ABitmap: TRGB32Bitmap; X, Y: Integer;
|
||||
AAlpha: Byte = -1);
|
||||
AAlpha: Integer = -1);
|
||||
var
|
||||
BkgX, BkgY, XMax, YMax, I, J, ImgX, ImgY: Integer;
|
||||
P1, P2: PRGB32Pixel;
|
||||
@ -220,7 +224,7 @@ begin
|
||||
if AAlpha >= 0 then
|
||||
for I := 0 to XMax do
|
||||
begin
|
||||
AlphaBlendRGB32Pixel(AAlpha, P1, P2, P1);
|
||||
AlphaBlendRGB32Pixel(Byte(AAlpha), P1, P2, P1);
|
||||
Inc(P1);
|
||||
Inc(P2);
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user