JELLIPSE(3L)

NAME
jellipse, jeldisc, jelarc - draw ellipse on display

SYNOPSIS
#include <dmd.h>

void jellipse (p, a, b, f)

void jeldisc (p, a, b, f)

void jelarc (p, a, b, p1, p2, f)

Point p, p1, p2;
int a, b;
Code f;

DESCRIPTION
The jellipse function draws an approximate ellipse centered at p, with horizontal semi-axis a and vertical semi-axis b with Code f in the display bitmap.

The jeldisc function draws an elliptical disc centered at p, with horizontal semi-axis a and vertical semi-axis b with Code f in the display bitmap.

The jelarc function draws the corresponding elliptical arc, centered at p, counterclockwise from the ellipse point closest to p1 to the ellipse point closest to p2 with Code f in the display bitmap.

All coordinates and semi-axes are in window coordinates.

EXAMPLE
The following routine draws a row of eight ellipses, 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)
           jellipse (p, r, r-25, F_XOR);
      p.y = 600;
      for ( p.x=100; p.x < XMAX-50; p.x+=120)
           jeldisc (p, r-25, r, F_XOR);
      p.y = 900;
      for (p.x=100; p.x < XMAX-50; p.x+=120)
           jelarc (p, r, r, 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), jcircle(3L), structures(3R), transform(3R/3L).