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: It's beyond my knowledge. So it needs research on your part, perhaps by asking at some more specialized forum. If there is a robust way to do it we can consider adding it to the source. Regards, Sergei

Viewing all articles
Browse latest Browse all 2341

Trending Articles