Murga-Projects Forums
Drawing shapes - Printable Version

+- Murga-Projects Forums (http://www.murga-projects.com/forum)
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: Drawing shapes (/showthread.php?tid=133)


Drawing shapes - Don Dailey - 07-24-2007 01:53 PM

Now I cannot figure out how to draw lines, circles and other shapes such as simple boxes and polygons.

I'm looking in the lua fltk Widget reference and do not see anything that looks like basic drawing primitives.

I'm a little frustrated by the lack of lua specific documentation in general for fltk and this is probably made worse since I'm just learning Lua. Otherwise I might work it out from the FLTK web page.

Can I assume that drawing primitives don't exist for Lua or are they just not documented?

- Don


RE: Drawing shapes - Don Dailey - 07-24-2007 02:17 PM

Don Dailey Wrote:
Now I cannot figure out how to draw lines, circles and other shapes such as simple boxes and polygons.

I'm looking in the lua fltk Widget reference and do not see anything that looks like basic drawing primitives.

I'm a little frustrated by the lack of lua specific documentation in general for fltk and this is probably made worse since I'm just learning Lua. Otherwise I might work it out from the FLTK web page.

Can I assume that drawing primitives don't exist for Lua or are they just not documented?

- Don


I thought I had looked everywhere, but I see some sample code right here that uses drawing primitives. So no need to respond to my post. Sorry.


RE: Drawing shapes - mikshaw - 08-02-2007 09:34 AM

For the sake of others who might find this thread:
http://www.murga-projects.com/forum/showthread.php?tid=38
http://www.murga-projects.com/forum/showthread.php?tid=59
http://www.murga-projects.com/forum/showthread.php?tid=66


RE: Drawing shapes - mikshaw - 08-03-2007 02:38 AM

Anyone know why drawing functions apparently need to be contained within another function?
I've tried some of the drawing commands at the top level of a window block and get either an error or nothing, but the same commands contained within a function will draw fine to that same window.

It seems strange.

Another strange thing is the fact that drawn objects disappear when the window needs to be redrawn (temporarily place a different window on top or switch to a different desktop, for example). I guess that means you can't use the draw functions to directly create permanent, static graphics?