Tdirectdrawsurface. pokeline (); tdirectdrawsurface. pokelinepolar (); tdirectdrawsurface. pokebox (); tdirectdrawsurface. pokeblendpixel (); tdirectdrawsurface. pokecircle (); tdirectdrawsurface. pokeellipse (); tdirectdrawsurface. pokefilledellipse (); tdirectdrawsurface. pokewuline (); tdirectdrawsurface. pokevline (); tdirectdrawsurface. dorotate ();
These drawing commands must be executed between tdirectdrawsurface. Lock and tdirectdrawsurface. Unlock, which is not particularly useful.
There are also two read/write attributes: pixel and pixels. During painting, the former must be between lock and unlock, and the latter cannot be locked. This is not perfect.
This example is just an example of draw line. Run:
Code File:
Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, dxclass, dxdraws; Type tform1 = Class (tform) dxdraw1: tdxdraw; dxtimer1: tdxtimer; Procedure formcreate (Sender: tobject); Procedure dxtimer1timer (Sender: tobject; lagcount: integer); end; var form1: tform1; implementation {$ R *. DFM} procedure tform1.formcreate (Sender: tobject); begin dxdraw1.align: = alclient; dxtimer1.interval: = 50; end; procedure merge (Sender: tobject; lagcount: integer); var X1, Y1, x2, Y2: integer; CLR: tcolor; begin X1: = random (dxdraw1.surface. width); Y1: = random (dxdraw1.surface. height); X2: = random (dxdraw1.surface. width); Y2: = random (dxdraw1.surface. height); CLR: = random ($ ffffff); // dxdraw1.surface. fill (0); dxdraw1.surface. lock; dxdraw1.surface. pokeline (x1, Y1, X2, Y2, CLR); dxdraw1.surface. unlock; dxdraw1.flip; end.