I have a form where I'm loading a bitmap (a map actually) and drawing over it with simple MoveTo and LineTo commands.
I also have a TPanel at the top to contain some radio buttons to select which map to use.
I'm plotting lines from essentially one lat and long to another.
This is working fine except when to LineTo takes it out of the range of the particular map and up toward panel at the top, some bits of line are being drawn over either the panel or radios.
Now I don't care less if the lineto point lies off the map, as the direction still shows.
I didn't want to do extra sums to truncate the line if it's going over the panel etc, so is there a way to make the panel and components on it show over the drawn lines, or clean them away after plotting?
I tried repainting the panel after drawing, but that did weird things!
For info, I'm loading the bitmat with this method:
Steve (Delphi 2007 & XP)
I also have a TPanel at the top to contain some radio buttons to select which map to use.
I'm plotting lines from essentially one lat and long to another.
This is working fine except when to LineTo takes it out of the range of the particular map and up toward panel at the top, some bits of line are being drawn over either the panel or radios.
Now I don't care less if the lineto point lies off the map, as the direction still shows.
I didn't want to do extra sums to truncate the line if it's going over the panel etc, so is there a way to make the panel and components on it show over the drawn lines, or clean them away after plotting?
I tried repainting the panel after drawing, but that did weird things!
For info, I'm loading the bitmat with this method:
Code:
BMPbackground := TBitmap.Create;
BMPbackground.LoadFromFile(Mapname);
Canvas.Draw( 0, 32, BMPbackground ); // 32 pixels down for the top panel
Steve (Delphi 2007 & XP)