Previous: 4.51.2.4.35. ogHFlip() To the Table of Contents Next: 4.51.2.4.37. ogInit()
4.51.2.4.35. ogHFlip() Table of Contents 4.51.2.4.37. ogInit()

- 4.51.2.4.36. -
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.36. ogHLine()


4.51.2.4.36. ogHLine()

Targets: MS-DOS, Win32 console


ObjGfx40 Unit

Draws a horizontal line.

Declaration:
  procedure ogHLine(x1, x2, y:int32; colour:uInt32); virtual;
Remarks:

Draws a horizontal line using a fast line-fill algorithm.

See also: Sample code:
{ogHLine.pas}

uses
  ObjGfx40, CRT;

var 
  count:uInt32;

begin
  if not screen^.ogCreate(1024, 768, OG_PIXFMT_32BPP) then
    begin
      writeln('Error setting video mode');
      halt
    end;

  with screen^ do
    for count:=0 to ogGetMaxY do
      ogHLine(0,count,count,
              ogRGB(count,(count div 256)*count,(count div 256)*count));
  readKey;
end.



Previous: 4.51.2.4.35. ogHFlip() To the Table of Contents Next: 4.51.2.4.37. ogInit()
4.51.2.4.35. ogHFlip() Table of Contents 4.51.2.4.37. ogInit()

- 4.51.2.4.36. -