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 graphics in murgaLua
Author Message
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #1
RE: drawing graphics in murgaLua

mikshaw Wrote:
That's pretty cool!

OK, what I have now is cooler :-) :-)

mikshaw Wrote:
/usr/bin/murgaLua: ./draw.lua:26: interrupted!
stack traceback:
[C]: in function 'check'
./draw.lua:26: in main chunk
[C]: ?

That is normal as you where interrupting a busy loop ... What I did before was a REAL quick hack.

Here is another hack, but this is pretty cool as drawing now works propperly !!!

Code:
function draw_callback(eventValue)

  if (Fl:event() == 0)
  then
      -- 0 means no even I think, so we know we are requesting a draw.
      fltk.fl_color(96)

      w:make_current()

      fltk.fl_rectf(20,20,50,50)
      fltk.fl_draw("this is a test",20,18)
  else
      os.exit(0)
  end

end

w=fltk:Fl_Window(0,0, 200, 200, "draw demo")

w:callback(draw_callback)

w:color(55)

w:show()

Fl:wait(1)
w:do_callback()

Fl:run()

This post was last modified: 06-23-2007 07:01 AM by JohnMurga.

06-23-2007 07:00 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
drawing graphics in murgaLua - widged - 06-05-2007, 11:01 PM
RE: drawing graphics in murgaLua - mikshaw - 06-06-2007, 02:00 AM
RE: drawing graphics in murgaLua - mikshaw - 06-23-2007, 06:00 AM
RE: drawing graphics in murgaLua - JohnMurga - 06-23-2007 07:00 AM
RE: drawing graphics in murgaLua - mikshaw - 06-23-2007, 12:38 PM
RE: drawing graphics in murgaLua - mikshaw - 06-23-2007, 01:02 PM
RE: drawing graphics in murgaLua - iGame3D - 06-25-2007, 03:29 PM
RE: drawing graphics in murgaLua - iGame3D - 06-25-2007, 08:11 PM
RE: drawing graphics in murgaLua - iGame3D - 06-25-2007, 08:25 PM
RE: drawing graphics in murgaLua - mikshaw - 06-27-2007, 12:21 AM

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

Forum Jump: