After many, many hours slaving away at the computer when I could be productively playing Battlefield 2 or sleeping, I'm proud to announce that my set of GDI+ classes are now feature complete. Now all that's left is testing, polish, getting a website ready, documentation, figuring out a sales model and that sort of stuff. Yee haw!
Before I get into the specifics about what's going on with the project, how about some updated screen shots?
This first shot is one you've seen plenty of times before. Only this time, it's different. You'll notice that the transparent shapes are drawn using dashed lines (dash-dot-dot style) and with a custom line cap (in this case, the arrow line cap). You're also seeing gradient filled shapes added via a single call to FillRectangles (which fills a series of rectangles at once).
The second shot is also somewhat familiar. What you're looking at is an EMF file loaded from disk. However, the new things are pretty interesting as well. The bright green rectangle in the upper left is the result of locking the bits of the bitmap and directly manipulating them in memory. The blue blob in the upper-center is a filled path. Finally, the mini-image is an auto-generated thumbnail using the GetThumbnail API.
The third shot is a new one; it's text with various character ranges highlighted using the MeasureCharacterRange and FillRegion APIs.
Without further ado, programmer test harness screen shots!
So now that I've teased you with pictures, it's time to describe what the project actually contains. It's a set of 38 classes, 2 modules and 2 interfaces which supply over 600 different APIs into the GDI+ library. This lirbary is available on Windows 98/Me, Windows XP, Windows 2000, Windows NT 4.0 SP6, Windows Vista (all of which are supported by REALbasic), though it may require a small redistributable on systems older than Windows XP.
This is a huge amount of new code, and is fairly untested. I've done a good job of testing out the major features, but I haven't hit all the different variants of the various APIs (for instance, there are 16 different versions of the Graphics.DrawImage APIs -- I've tested four of them). So I'm looking for a few intrepid graphics programmers with time on their hands to help me beta test the product. In addition to testing and reporting bugs, I also need them to help come up with some decent examples (with comments) of how to use some of the major functionality. In return for your help, you will receive a free copy of the final product. I've not done any research on the final pricing of the product, so I couldn't tell you what sort of a value you're looking at. So if you're *really* interested in testing it out (not just looking for a preview or a free copy) and have the time to make a few dozen example projects and report any issues you run into, please contact me and let me know. You can either leave a note here (be sure to leave an email address I can reach you back at), or email me directly at aaron@aaronballman.com I'm going to pick "special helpers" based on gut feeling and anticipated assistance, and I'm only going to pick two or three. So when you contact me, let me know what sort of example applications you're interested in writing (this way I don't get all three people working only on image drawing and manipulation, and no one tests out matrix transformations and hatch brushes for example).
So I promised some specifics earlier. As you know, this is a port of the GDI+ functionality, which is a newer version of the old-style Win32 graphics functionality. For those of you who are more familiar with the Mac, GDI+ is to GDI as CoreGraphics is to QuickDraw. I've tried to keep the API as compatible with the C++ version of the classes as possible (though there are some minor deviations which were necessary). Just like the HDC is the main object used with GDI programming, the GdiPlusGraphics object is the main object used with GDI+. This class has all the familiar DrawFoo and FillBar functionality that you would expect a graphics class to contain. Almost every other class is a supplement to functionality provided in the GdiPlusGraphics class. For instance, there are classes for pens (GdiPlusPen) and brushes (GdiPlusBrush and a few subclasses) which allow you to control the way lines and fills are drawn. There's a GdiPlusImage class which represents an image, as well as subclasses to represent a bitmap (GdiPlusBitmap) and metafile (GdiPlusMetafile). For those of you who aren't familiar with what a metafile is, it's essentially like a Group2D in REALbasic. You have this base object, and you add sub-objects to it (which is called "recording"). You can draw a rasterized version of a metafile to the screen (which is called "playing" the file).
GDI+ also has excellent support for drawing text to the screen. You can use the GdiPlusFont class (or one of the helpers) to determine the font to render the text. GDI+ automatically does font linking to ensure that your text is displayed properly to the user, even if the currently selected font doesn't have a glyph which represents a code point. What's more, the GdiPlusStringFormat gives you even more control over how the text is displayed. For instance, you can set alignment, tab stops, digit substitution, etc.
I know I am leaving out tons of descriptive information (such as clipping, regions, paths, matrix transformation operations, etc), but as you can imagine, with 38 classes, there's a lot of "stuff" you can do with this. One very nice thing is that code snippets you find on the web (such as at MSDN) are easily ported into REALbasic using these classes. Generally speaking, it's a very minor amount of code modification (though, it is not a straight copy-and-paste job due to language differences) to take a working example and get it to work in REALbasic.
Sound exciting to you? Then leave me some feedback about what you think!



Hi Aaron,
I can bring some help. I developed a GDI+ wrapper for RB 5.5 two years ago but I lost the RB project after a failed back up. Since then I've never had time to develop it again.
I am working on a new project on Windows which requires GDI+. I had planned to develop a new wrapper again, but if you agree I can help you for examples and even to write some help files. Furthermore I know a bit GDI+ because I used it with .Net.
I can't help with testing, but have you thought about selling it on RBLibrary as a GDI+ article (with source)? $50?