Previous: 4.51.2.4.14. ogCubicBezierCurve() To the Table of Contents Next: 4.51.2.4.16. ogDone()
4.51.2.4.14. ogCubicBezierCurve() Table of Contents 4.51.2.4.16. ogDone()

- 4.51.2.4.15. -
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.15. ogCurve()


4.51.2.4.15. ogCurve()

Targets: MS-DOS, Win32 console


ObjGfx40 Unit

Draws a curve

Declaration:
  procedure ogCurve(x1, y1, x2, y2, x3, y3:int32; segments:uInt32; colour:uInt32);
Remarks:

Draws a curve from (x1,y1) through (x2,y2) to (x3,y3). Segments is the number of line segments to divide the arc into. The higher the number the smoother the line, but the longer it takes to render.

See also: Sample code:
{ogCurve.pas}

uses
 ObjGfx40, CRT;

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

  screen^.ogCurve(10, 10, 100, 30, 35, 160, 20, screen^.ogRGB(255,255,255));

  readKey
end.



Previous: 4.51.2.4.14. ogCubicBezierCurve() To the Table of Contents Next: 4.51.2.4.16. ogDone()
4.51.2.4.14. ogCubicBezierCurve() Table of Contents 4.51.2.4.16. ogDone()

- 4.51.2.4.15. -