In this example:
Code File:
Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, Dib, stdctrls; Type tform1 = Class (tform) dxpaintbox1: bytes; button1: tbutton; button2: tbutton; Procedure button1click (Sender: tobject); Procedure submit (Sender: tobject); end; vaR form1: tform1; implementation {$ R *. DFM} var Dib: tdib; Procedure tform1.button1click (Sender: tobject); const imgpath1 = 'C: \ temp \ dx.jpg '; begin DiB. loadfromfile (imgpath1); dxpaintbox1.dib. assign (DIB); dxpaintbox1.width: = DiB. width; dxpaintbox1.height: = DiB. height; dxpaintbox1.repaint; end; Procedure tform1.button2click (Sender: tobject); begin dxpaintbox1.dib. smoothrotatewrap (Dib, DiB. width Div 2, DiB. height Div 2, 15.5); dxpaintbox1.dib. assign (DIB); dxpaintbox1.repaint; end; Procedure tform1.formcreate (Sender: tobject); begin Dib: = tdib. create; end; Procedure tform1.formdestroy (Sender: tobject); begin DiB. free; end.