Hi Nigel
I tried as you suggested drawing a filled polygon on a transparent layer using this code:
Image.LayersAdd;
Image.Layers[1].Opacity:=0.5;
procedure TfmMain.ImageDrawBackBuffer(Sender: TObject);
var
pts : TPointArray;
i : integer;
begin
SetLength(pts,length(Warnings[0].Coordinates));
for i:=0 to length(Warnings[0].Coordinates)-1 do
begin
pts[i].X:=map.LongitudeToBmpX(Warnings[0].Coordinates[i].Lon);
pts[i].Y:=map.LatitudeToBmpY(Warnings[0].Coordinates[i].Lat);
end;
with Image.Layers[1].Bitmap.Canvas do
begin
Pen.Color:=clBlack;
Brush.Style:=bsSolid;
Brush.Color:=clYellow;
Polygon(pts);
end;
end;
That worked but as I drag the map with the mouse the polygon gets repeatedly redrawn:
Somewhere I need to clear the bitmap but how?
Bruce