Previous: Querying Rectangles, Up: Rectangle Reference


29.6 Ellipses

const function: Ellipse out_ellipse (void)

Returns the smallest Ellipse that surrounds the Rectangle.

          Point P(-1, -1, 3);
          Rectangle r(P, 3, 4, 60, 30, 15);
          Ellipse e = r.out_ellipse();
          e.filldraw(black, gray);
          r.unfilldraw(black);


[Figure 152. Not displayed.]

Fig. 152.

const function: Ellipse in_ellipse (void)

Returns the Ellipse enclosed by the Rectangle.

          Point P(-1, -1, 3);
          Rectangle r(P, 3, 4, 60, 30, 15);
          Ellipse e = r.in_ellipse();
          r.filldraw(black, gray);
          e.unfilldraw(black);


[Figure 153. Not displayed.]

Fig. 153.

const function: Ellipse draw_out_ellipse ([const Color& ddraw_color = *Colors::default_color, [string ddashed = "", [string ppen = "", [Picture& picture = current_picture]]]])

Draws the smallest Ellipse that surrounds the Rectangle. The arguments are like those of Path::draw() (see Path Reference; Drawing and Filling). The return value is the surrounding Ellipse.

const function: Ellipse draw_in_ellipse ([const Color& ddraw_color = *Colors::default_color, [string ddashed = "", [string ppen = "", [Picture& picture = current_picture]]]])

Draws the Ellipse enclosed by the Rectangle. The arguments are like those of Path::draw() (see Path Reference; Drawing and Filling). The return value is the enclosed Ellipse.