GDI+
gdiplus.dll is a graphical library introduced in ~2001 by Microsoft to make two-dimensional drawing easier. It runs on top of gdi32, and besides the changes in the programming model it also adds new features such as gradient fills, anti-aliasing, more extensive image handling, etc.
Wine implements the flat C API, which is the interface exported by gdiplus.dll. Most programmers use an object-oriented interface such as the C++ interface or the System.Drawing namespace in .NET.
Microsoft's GDI+ uses mostly gdi32 blt operations to copy its rendering results onto the destination device context whereas Wine's GDI+ (written summer 2007 by Evan Stade) passes calls through to their gdi32 equivalents. The latter approach has better performance and shorter development time, but sacrifices control over finer details.
TODO
Graphics
- We need a software implementation of all drawing operations using alpha_blend_pixels. This will make it possible to draw properly to Bitmap images - correctly setting alpha values and drawing to user buffers.
- In a similar vein, all drawing operations should fall back to using alpha_blend_pixels for Graphics objects that don't have an HDC.
- We need a version of all drawing operations that works on metafiles that are being recorded. These should call a METAFILE_* function defined in metafile.c, which will format and write the appropriate EMF and/or EMF+ records.
- Smoothing mode (anti-aliasing). We should be able to do this using alpha_blend_pixels.
- Compositing mode (gamma correction). RGB values are not directly related to intensities, and we must account for that when blending colors. We should be able to do this when the blending is done within gdiplus (which will ideally be most of the time if we're blending at all), but neither gdi32 nor Xrender give us control over gamma correction. We'll have to just assume Xrender does something sane.
Strings
- String drawing. Most formatting options are currently ignored.
Images
- Metafile handling (WMF, EMF, EMF+) is not really implemented.
- GIF files cannot be saved.
- Many drawing operations do not work properly on Bitmap images that have an alpha channel or reference a user buffer.
General
- Startup/shutdown functions. These are currently stubs. I'm not even sure what their purpose is in Windows; Wine's implementation doesn't need them.
Object locking. (see ObjectBusy error code)
- Unimplemented objects and functions. These are numerous.
Related DLLs
Helpful Links
Jose Roca's GDI+ documentation is an invaluable resource and much easier to use than MSDN.
The Mono project's GDI+ uses Cairo as a backend. Looking at their code can sometimes be better documentation than anything else on the web, although the details (like parameter checking) don't always precisely conform to Windows.

MoinMoin
Python