I know how to define a shape and attach it to a window as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <Simple_window.h>
void cir() { Circle c(Point(100,100),50); }
int main()
{
Simple_window win(Point(100,100),600,400, "test");
Rectangle r(Point(100,100),Point(300,200));
win.attach(r);
win.wait_for_botton();
}
But how to define a shape (say a circle by that cir() function which is) outside of the main() function? And how to attach it to be visible on window win?
Thank you.
This is a method of drawing circles (using fl_arc or fl_circle()) but if possible please suggest a way of using Circle (like the request of the question). :-)