In this example:
Code File:
Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs; Type tform1 = Class (tform) Procedure formpaint (Sender: tobject); end; vaR form1: tform1; implementation {$ R *. DFM} uses gdipobj, gdipapi; Procedure tform1.formpaint (Sender: tobject); var G: tgpgraphics; Path: tgpgraphicspath; Pb: signature; RT: tgprect; const PTS: array [0 .. 2] of tgppoint = (X: 90; Y: 10), (X: 10; Y: 160), (X: 160; Y: 160); colors: array [0 .. 2] of tgpcolor = (aclgreen, aclaqua, aclblue); pos: array [0 .. 2] of single = (0.0, 0.25, 1.0); {the color position must be greater than or equal to 0,
Form file:
Object form1: tform1 left = 0 Top = 0 caption = 'form1 'clientheight = 164 clientwidth = 491 color = clbtnface font. charset = default_charset font. color = clwindowtext font. height =-11 font. name = 'tahoma 'font. style = [] oldcreateorder = false position = pow.topcenter onpaint = formpaint pixelsperinch = 96 textheight = 13end