Using GDI+ Features with Views
What is GDI+
GDI+ is a way of drawing on Microsoft Windows platforms. It comes with interesting features such as transparency, anti-aliasing, and gradient patterns. For more information about GDI+, see the Microsoft internet site.
Using Dynamic Link Libraries
When using the dynamic Views libraries (dll_mda), using GDI+ is very simple: Microsoft provides a DLL (gdiplus.dll) that must be accessible by the Views application. This DLL is shipped in the same directory as the dynamic Views libraries (dll_mda). To download the latest gdiplus.dll redistributable, go to http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdkredist.htm.
Using Static Libraries
When using the static Views libraries (stat_mda, stat_mta), you need to install the Microsoft Platform SDK, because you must link your application with the gdiplus.lib library. To get this SDK, go to http://www.microsoft.com/msdownload/platformsdk/sdkupdate.
You must also include the <ilviews/windows/ilvgdiplus.h> file when compiling, and link your application with the ilvgdiplus.lib library. This library can be found in directory ILVHOME/lib/[platform]/[subplatform], where ILVHOME is the root directory in which Views was installed, subplatform is stat_mda or stat_mta,and platform is one of the supported Microsoft Windows platforms.
GDI+ and Views
When GDI+ is installed, Views provides its benefits through a dedicated API to the IlvPalette, IlvPort, and IlvDisplay classes. The following methods have been added to handle transparency, anti-aliasing, and gradients:
-
IlvPort::setAlpha
-
IlvPort::getAlpha
-
IlvPort::setAntialiasingMode
-
IlvPort::getAntialiasingMode
See also sections Alpha Value , Anti-Aliasing Mode , and IlvGradientPattern class .