Quantcast
Viewing all articles
Browse latest Browse all 2341

Commented Unassigned: Begin/AfterDrawing and OnDrawBackBuffer provide write only context [25998]

First, thank you to all developers who have produced this package, it is very useful. My issue is the way the AfterDrawing and OnDrawBackBuffer are implemented. I was attempting to draw anti-aliased and per-pixel alpha images over the map, but could not get the transparency to work. Inspecting the source, I found that the back buffer is implemented with a gdi+ bitmap, and the hdc from the gdi+ graphics object is what gets passed to the Fire*() callbacks. This is fine for drawing any purely source pixel objects, but makes any raster operation which needs to combine the source with the destination pixels impossible because gdi+ only tracks changes to the bitmap, and then copies the net results to the actual bitmap only after ReleaseDC is called. See: [this article](https://support.microsoft.com/en-us/kb/311221) for a better explanation.
Perhaps there might be a way to expose the buffer bitmap itself?
Comments: I tested your code. Seems to be working. I've just committed [Map.OnDrawBackBuffer2 event](http://mapwingis.codeplex.com/SourceControl/changeset/47278405df50b748b0796ae2fac983c6f19fd5f2), so it will be available in 4.9.3.5 release. Please let me know if there are problems in my code.

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>