Previous: 4.51.2.4.53. ogSetPal() To the Table of Contents Next: 4.51.2.4.55. ogSetPixelRGBA()
4.51.2.4.53. ogSetPal() Table of Contents 4.51.2.4.55. ogSetPixelRGBA()

- 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.



Previous: 4.51.2.4.53. ogSetPal() To the Table of Contents Next: 4.51.2.4.55. ogSetPixelRGBA()
4.51.2.4.53. ogSetPal() Table of Contents 4.51.2.4.55. ogSetPixelRGBA()

- 4.51.2.4.54. -