Quantcast
Channel: MapWinGIS ActiveX Map and GIS Component
Viewing all articles
Browse latest Browse all 2341

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

$
0
0
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: Just be sure to read the comments. In particular you will want to pass the BitmapData ztructure, not just the buffer address.

Viewing all articles
Browse latest Browse all 2341

Trending Articles



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