While GDI+ is exposed for anyone to use, it is only done so as a series of flat API. However, C++ and .NET developers are treated to a set of classes which they are able to write better object-oriented code with. This is possible because Microsoft has taken the time to create those classes in their development header files. Unfortunately, REALbasic developers are only able to access the flat APIs using declares. Advanced Graphics for Windows is a collection of classes and modules which utilize the GDI+ libraries installed on many newer versions of Windows. Instead of simply providing the flat function calls, AGW exposes the same programming experience a C++ or .NET developer is treated to: a series of object-oriented REALbasic classes.
Consisting of over 40 project items, this extensive functionality is the REALbasic equivalent to the GDI+ classes documented on MSDN. The functionality includes:
- Anti-aliased drawing operations
- Support for many different image encoders, include JPG, GIF, TIFF and PNG
- ClearType font-substituted string drawing
- Full metafile (vector graphics) support
- Multiple brush styles, including translucent and custom-made brushes
- Image manipulation support
- Hardware accelerated graphics operations
- Much, much more!
Why be stuck in the dark ages of graphics anymore when you can use the latest functionality available with ease? Just because Advanced Graphics for Windows is powerful doesn't mean it's not easy to use. Here is some sample code to draw blue, anti-aliased text that is 50% opaque.
dim gfx as new GdiPlusGraphics( g.Handle( Graphics.HandleTypeHDC ) ) Call gfx.DrawString( "Advanced Graphics for Windows Rocks!", -1, _ new GdiPlusFont( "Calibri", 16, FontStyle.Regular ), _ new PointF( 10, 10 ), _ new GdiPlusSolidBrush( new GdiPlusColor( 128, 0, 0, 255 ) ) )
You can download Advanced Graphics for Windows here. In order to take advantage of GDI+, this project requires a version of Windows which supports GDI+. By default, that is Windows XP and up. However, a redistributable is available for most versions of Windows. For more information on the system requirements, refer to MSDN. The current version of Advanced Graphics for Windows is 1.0.2 and was uploaded on Nov 21, 2006.
Important compatibility note: There is a known issue with Einhugur's TypeLib plugin due to a conflict with the Rect and Point classes in versions 1.0.0 and 1.0.1. If you have this plugin installed, you may get a failed assertion in Classes.cpp which is a bug with REALbasic. This bug has been fixed with version 1.0.2 of Advanced Graphics for Windows. If you are still using an old version, you should update to the newest one. If you are unable to update, you can work around the bug, but you will have to remove the TypeLib plugin.
With over 700 APIs, this project took a considerable amount of effort to bring to life. You can show your appreciation by making a donation to help maintain things.
