2

I use a map component named TatukGis and I need to draw some other information on map, it uses TCanvas basically to draw the maps. I'm working with Pixels to create an alpha blend effect that I'd like, but it's very slow, it seems to refresh the canvas on each operation. Some one can give some hints how to use TCanvas in the correctly way to draw the things fast ?

Tks

Rodrigo Farias Rezino
  • 2,687
  • 3
  • 33
  • 60
  • Yes, the `Pixels` property is *very* slow. It's almost unusable. You have to access the pixels via the `Scaline` property. [The second sample in this answer](http://stackoverflow.com/questions/4916913/draw-opacity-ellipse-in-delphi-2010/4917296#4917296) might be useful. – Andreas Rejbrand Apr 25 '11 at 14:09

1 Answers1

4

First write to a bitmap (use ScanLine if you require pixel access), then draw the bitmap to the canvas (CopyRect).

Mike Versteeg
  • 1,615
  • 14
  • 28