Node:Rectangles for Ellipses, Previous:Solving Ellipses, Up:Ellipse Reference



Rectangles

Rectangle out_rectangle (void) const function
Returns the Rectangle that surrounds the Ellipse.
          Ellipse e(origin, 3, 4, 45, 30, 17);
          e.shift(1, -1, 2);
          Rectangle r = e.out_rectangle();
          r.filldraw(black, gray);
          e.unfilldraw(black);
          


[Figure 172. Not displayed.]

Fig. 172.

Rectangle in_rectangle (void) const function
Returns the Rectangle enclosed within the Ellipse.
          Rectangle r = e.in_rectangle();
          e.filldraw(black, gray);
          r.unfilldraw(black);
          


[Figure 173. Not displayed.]

Fig. 173.

Rectangle draw_out_rectangle ([const Color& ddraw_color = *Colors::default_color, [string ddashed = "", [string ppen = "", [Picture& picture = current_picture]]]]) const function
Draws the Rectangle that surrounds the Ellipse. The arguments are like those of Path::draw(). The return value is the surrounding Rectangle. See Path Reference; Drawing and Filling.
          Ellipse e(origin, 2.5, 5, 10, 12, 15.5);
          e.shift(-1, 1, 1);
          e.draw_out_rectangle(black, "evenly", "pencircle scaled .3mm");
          


[Figure 174. Not displayed.]

Fig. 174.

Rectangle draw_in_rectangle ([const Color& ddraw_color = *Colors::default_color, [string ddashed = "", [string ppen = "", [Picture& picture = current_picture]]]]) const function
Draws the Rectangle enclosed within the Ellipse. The arguments are like those of Path::draw(). The return value is the enclosed Rectangle. See Path Reference; Drawing and Filling.
          Ellipse e(origin, 3.5, 6, 10, 12, 15.5);
          e.shift(-1, 1, 1);
          e.draw_in_rectangle(black, "evenly", "pencircle scaled .3mm");
          


[Figure 175. Not displayed.]

Fig. 175.