Murga-Projects Forums

Full Version: Drawing shapes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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

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.

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?
Reference URL's