News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Drawing shapes
Author Message
Don Dailey
Junior Member
**


Posts: 5
Group: Registered
Joined: Jul 2007
Status: Offline
Reputation: 0
Post: #1
Drawing shapes

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

07-24-2007 01:53 PM
Find all posts by this user Quote this message in a reply
Don Dailey
Junior Member
**


Posts: 5
Group: Registered
Joined: Jul 2007
Status: Offline
Reputation: 0
Post: #2
RE: Drawing shapes

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.

07-24-2007 02:17 PM
Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #3
RE: Drawing shapes
08-02-2007 09:34 AM
Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #4
RE: Drawing shapes

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?

08-03-2007 02:38 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: