JCIRCLE(3L)

NAME
jcircle, jdisc, jarc - draw circle on display

SYNOPSIS
#include <dmd.h>

void jcircle (p, r, f)

void jdisc (p, r, f)

void jarc (p, p1, p2, f)

Point p, p1, p2;
int r;
Code f;

DESCRIPTION
The jcircle function draws the approximate circle of radius r centered at p with Code f in the display bitmap.

The jdisc function draws a disc of radius r centered at p with Code f in the display bitmap.

The jarc function draws the circular arc centered at p counterclockwise from p1 to the point on the circle closest to p2 with Code f in the display bitmap.

All coordinates and radii are in window coordinates. Because the window is scaled, these routines are actually implemented by calls to the ellipse routines.

EXAMPLE
The following routine draws a row of eight circles, a row of eight discs, and a row of eight arcs, scaled to the shape of the window.

    #include <dmd.h>
    draw()
    {
      Point p;
      int i, r;
      r = 50;
      p.y = 200;
      for (p.x=100; p.x < XMAX-50; p.x+=120)
           jcircle (p, r, F_XOR);
      p.y = 600;
      for (p.x=100; p.x < XMAX-50; p.x+=120)
           jdisc (p, r, F_XOR);
      p.y = 900;
      for (p.x=100; p.x < XMAX-50; p.x+=120)
           jarc (p, Pt(p.x-r, p.y), Pt(p.x+r,
                 p.y), F_XOR);
      request(KBD);
      wait(KBD);
    }

SEE ALSO
circle(3L), ellipse(3L), globals(3R), jellipse(3L), structures(3R), transform(3R/3L).