My new application will feature a rich interface which should be resizable on-the-fly uses transparent icons/images etc. For this application I'm trying to decide on using the new Direct2D API against the good old GDI. One of the downsides is of course it does not run on XP, although I've found a bit nastier issues to decide upon:
I noticed that outputting text in a Direct2D environment seems a bit blurry (although marketed as a feature). Just look at the text in Firefox 4 with hardware acceleration enabled (or IE9). It seems to be due to the fact that in Direct2D text does not adhere to the (pixel) grid like GDI does. Is there a way to force Direct2D to make it adhere to the pixel grid and thus fixing this issue?
Is there really such an improvement in speed? I tried to understand this article and what I make from it is that in Windows 7 and XP (not Vista?) the GDI is already hardware accelerated where it can. E.g. in my application I use a lot of memory DC's which are just
BitBlt
ed into place and drawing transparent images/anti-aliased lines etc are being drawn usingAlphaBlend
. And that last one is definitely hardware accelerated since I measured speed while testing my routines.
So where would you put your money? Is Direct2D worth the hassle or would you just stick to the good old GDI? Or would you suggest something else?
Note: I'm programming in C++ btw, no use of MFC.