Although GDI + has a history of nearly 10 years (launched with Win2000), although DirectX is very popular, it is still indispensable for 2D plotting in versions earlier than Windows 7, microsoft has not stopped its upgrade. With Vista's GDI version 1.1 (6.0.xxxx.x), blur and other features are added.
However, win7 already has direct d2d1, and Delphi also has direct2d support for synchronization. This is something that can replace GDI +, but I heard that d2d1 can be well combined with GDI +.
Before I used GDI + in Delphi is used http://www.progdigy.com /? Page_id = 7. It is very early and only supports GDI + 1.0.
Now that we have a new gdiplus (the current version is 1.2 and 2009), I may have browsed the following:
1. Support for GDI + 1.1; I am using XP now, or 1.0 of GDI +, but not many things are added in 1.1.
2. The naming and structure should be as close as possible to net. This is equivalent to learning 2D plotting under net at the same time, and you can refer to the help of msdn more conveniently.
3. advocate the use of interfaces (rather than classes, or even prohibit direct use of classes) and structures, which can save a lotCode(You don't even need to write XXX. Free ).
4. The new syntax of Delphi, such as helper, operator overload, and generics, is used only for Versions later than Delphi 2009.
In short, it is more convenient and practical than ever before. Compared with net, implementing the same function can save at least 1/3 of the code!
Related urls:
Http://cc.embarcadero.com/Item/26950
Http://www.bilsen.com/gdiplus
Http://www.bilsen.com/gdiplus/GdiPlus1.2.zip
With gdiplus, I have to review GDI + again. In fact, the previous study is still incomplete.
Download the file gdiplus. PAS and gdiplushelpers. PAS under lib (tools-> options-> Library-Win32-> library path) can be used.
If you also need to test the following example, you need to know: I copied all the sample images under demos \ bin \ to C: \ gdiplusimg \.
In the first example, only two lines of code are required to display an image:
Uses gdiplus, gdiplushelpers; Procedure tform1.formpaint (Sender: tobject); var image: igpimage; begin image: = tgpimage. create ('C: \ gdiplusimg \ grapes.jpg '); canvas. togpgraphics. drawimage (image, 10, 10); end;