终于, Delphi XE2 携带 GDI+ 库了
使用了较早的 http://www.progdigy.com
uses Winapi.GDIPAPI, Winapi.GDIPOBJ{, Winapi.GDIPUTIL}; procedure TForm1.FormPaint(Sender: TObject); var graphics: TGPGraphics; pen: TGPPen; begin graphics := TGPGraphics.Create(Canvas.Handle); pen := TGPPen.Create(MakeColor(255,0,0)); graphics.DrawRectangle(pen, MakeRect(11, 22, 33, 44)); pen.Free; graphics.Free; end;
GdipObj 单元的类图: