gdiplus: Add tests for the HDC's we get from bitmap objects.

Vincent Povirk vincent at codeweavers.com
Mon Aug 16 15:47:17 CDT 2010


Native gdiplus's bitmap objects have some rather impressive (read: nearly impossible) capabilities. Apparently, I can create an RGBA bitmap (non-premultiplied), get a Graphics object for that bitmap, get an HDC for the graphics object, draw to it using gdi32 functions, and end up with an alpha channel that has been set correctly. This is particularly impressive because I'm pretty sure native gdi32 can't draw to something with that pixel format.

Their solution became obvious when I wrote a test that READS one of these HDC's. The HDC is write-only (reads don't tell me what was originally on the bitmap, they give me a specific color), and further testing showed that writes only work if I set a different color.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100816/3736615a/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-gdiplus-Add-tests-for-the-HDC-s-we-get-from-bitmap-obj.txt
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100816/3736615a/attachment-0001.txt>


More information about the wine-patches mailing list