andrei_c wrote: > Hi everyone! > First of all i must tell you i am a complete noob at GUI programing so don't > insult me if my question is really stupid. > Reading the latest FLTK 1.3.0 manual (the one with 808 pages) i saw the > "Drawing Things in FLTK" chapter wich says that you must use some drawing > functions to draw, like fl_point,fl_loop and you can only use them "in > certain places". > The reason for wich i want to learn how to make GUI programs is to make a 2D > raster editor like Krita,GIMP or Photoshop(of course maximum 10% of what they > are). > "Drawing Things in FLTK" was very discouraging and i seems to me like FLTK > isn't very apropiate for what i need.All i really want is to draw > pixels,lines and text on some kind of canvas whit the mouse or a pc > tablet.And of course maybe be able to make some simple 2d games such as > Tetris.But all this without OpenGL or GLUT or anithing that has to do with 3D. > So my stupid question is: is FLTK suitable for these things? > I am really unexperienced at GUI programming and I defenitely don't want to > waste a year of my life learning something just to find out that it isn't > really good for me.FLTK is a great library,i'm not saying otherwise but wat > I'm asking is if it is good for 2d editors or 2d games, I know it's good for > 3D, but i need the 2D stuff too. > Thank for reading such a moronic post and thank for your replies!
To start with the most important part: 2D games ;-) Yes, that's absolutely possible, and there are some examples in the test directory of the distribution. To see them in action, please install FLTK, run make, and you're ready to go. The most interesting 2D game programs are sudoku, checkers, and blocks. You can look at the examples pages in the docs to find out more. The "Drawing Things..." chapter tells you some principles of GUI programming. To create a raster editor, you may want to save what you edit later, i.e. you must have an internal representation of your data (lines, points, etc.). The only thing that FLTK requires is that you are able to draw "the whole thing" in your draw() method. If your data is real raster data, you can generate and manipulate a 2D raster of pixel data (e.g. R/G/B) and let FLTK draw it as an image (see Fl_Image::data()). If you need help with this, you can ask here... Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

