On Saturday 21 April 2007 00:56, michael sephton wrote:
> Seems like the mistake is simply that you should put Window::draw() before
you draw the points? like this:
>
> #include <fltk/run.h>
> #include <fltk/Window.h>
> #include <fltk/SharedImage.h>
> #include <fltk/Button.h>
> #include <fltk/draw.h>
>
> class MainWindow : public Window {
> public:
> MainWindow(int x,int y,int w,int h,const char *n):Window(x,y,w,h,n){}
> void draw(void);
> };//MainWindow
>
> void MainWindow::draw(void) {
> Window::draw();
> setcolor(3);
> int someHeight=30;
> int someWidth=50;
> for (int i = 0; i < someHeight; i += 2)
> for (int j = 0; j < someWidth; j += 2)
> drawpoint(j, i);
> }
>
> int main(void){
> MainWindow w(0,0,400,400,"Window");
> w.show();
> return run();
> }
I just wanted to reply to your message that I've tried that also but forgot to
mention, when I saw that coordinates in my program were wrong (I used same X
coordinate for both "i" and "j")!!
Plase forgive me for my rashness.
Thanks Michael.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk