------------------------------------------------------------------------------
MC logo
Shape Driver II
[^] Code Examples
------------------------------------------------------------------------------
<<Shape Driver I shapetest3.cc Shape Driver III>>
/* Test of some of the shape classes. */

#include <iostream>
#include "canvas.h"
#include "shape.h"
main()
{
        Canvas c(30,30);
        Line l(2, 4, 15, 30);
        Rectangle r(10,10,8,12);
        Ellipse e(3, 10, 12, 12);

        //l.draw(c);
        //r.draw(c);
        e.draw(c);

        Ellipse f(1, 5, 25, 10);
        f.draw(c);
        Ellipse g(10, 5, 10, 25);
        g.draw(c);

        Circle cir(12, 12, 10);
        cir.draw(c);
        Square sq(12, 12, 10);
        sq.draw(c);

        c.print(cout);
}
<<Shape Driver I Shape Driver III>>