- 4.51.2.4.54. -
Table of Contents
4. Standard Units
4.51. ObjGfx40 - ObjectGraphics 4.0 Unit
4.51.2. ObjGfx40 Unit Object Types
4.51.2.4. ogSurface object
4.51.2.4.54. ogSetPixel()
4.51.2.4.54. ogSetPixel()
Targets: MS-DOS, Win32 console
ObjGfx40 Unit
Draws a pixel.
Declaration:
procedure ogSetPixel(x, y:int32; colour:uInt32); virtual;
Remarks:
Draws a pixel at x,y in colour.
See also:
Sample code:
{ogSetPixel.pas}
uses
ObjGfx40, CRT;
var
colour: uInt8;
begin
randomize;
if not screen^.ogCreate(640, 480, OG_PIXFMT_8BPP) then
begin
writeln('Error setting video mode');
halt
end;
colour := 1;
repeat
with screen^ do
ogSetPixel(random(ogGetMaxX), random(ogGetMaxY), colour);
inc(colour);
until keyPressed;
readkey;
end.
- 4.51.2.4.54. -