UPDATED murgaLua build
|
Author |
Message |
mikshaw
Senior Member
   
Posts: 522
Group: Registered
Joined: Apr 2007
Status:
Offline
Reputation: 5
|
RE: UPDATED murgaLua build
Bitmaps may be binary, but as far as I know pixmaps are not. X pixmaps, at least, are plain text.
|
|
01-26-2008 02:44 AM |
|
 |
JohnMurga
Administrator
      
Posts: 381
Group: Administrators
Joined: Apr 2007
Status:
Offline
Reputation: 2
|
RE: UPDATED murgaLua build
I did a few experiments today and found another missing feature in the fltk binding:
The constructors Fl_Pixmap and Fl_Bitmap normally take an array as an argument.
It would make sense to change the bindings so that the fltk.Fl_(Pixmap|Bitmap) constructors use a binary string.
Pixmap should be an array, but Bitmap and RGB are binary strings.
Take a look at imageDecodingTest.lua ...
This implementation is consistent with the way FLTK does things.
Cheers
JohnM
|
|
01-26-2008 02:45 AM |
|
 |
Juergen
Member
  
Posts: 81
Group: Registered
Joined: May 2007
Status:
Offline
Reputation: 0
|
RE: UPDATED murgaLua build
Pixmap should be an array, but Bitmap and RGB are binary strings.
Take a look at imageDecodingTest.lua ...
This implementation is consistent with the way FLTK does things.
Cheers
JohnM
You are right. I tried it with an array and it works.
Another question:
Is it possible to draw on an offline (not visible) surface and then copy the result?
Juergen
|
|
01-26-2008 05:25 AM |
|
 |
JohnMurga
Administrator
      
Posts: 381
Group: Administrators
Joined: Apr 2007
Status:
Offline
Reputation: 2
|
RE: UPDATED murgaLua build
You are right. I tried it with an array and it works.
Another question:
Is it possible to draw on an offline (not visible) surface and then copy the result?
Yup, but it's a HACK ... You can draw to a hidden window and copy the result.
However, the recently documented off-screen functions look pretty nice, and I'll be implementing them soon.
(http://www.murga-projects.com/murgaLua/f...#offscreen)
Cheers
JohnM
|
|
01-26-2008 06:04 AM |
|
 |
Juergen
Member
  
Posts: 81
Group: Registered
Joined: May 2007
Status:
Offline
Reputation: 0
|
RE: UPDATED murgaLua build
You are right. I tried it with an array and it works.
Another question:
Is it possible to draw on an offline (not visible) surface and then copy the result?
Yup, but it's a HACK ... You can draw to a hidden window and copy the result.
However, the recently documented off-screen functions look pretty nice, and I'll be implementing them soon.
(http://www.murga-projects.com/murgaLua/f...#offscreen)
Cheers
JohnM
Drawing to a hidden window was the first thing I tested. Unfortunately I only get a segmentation fault when I try to make_current() on the hidden window.
On a side note: You have to call the Fl_Menu_Bar() constructor as fltk.Fl_Menu_Bar(), but you can call the Fl_Pixmap() constructor direct. This is a little bit inconsequential.
Juergen
|
|
01-29-2008 01:08 AM |
|
 |
jpjacobs
Member
  
Posts: 113
Group: Registered
Joined: Jul 2007
Status:
Offline
Reputation: 0
|
RE: UPDATED murgaLua build
when testing the new 0.6, the clockdemo thing throws me this error:
/usr/local/bin/murgaLua: [string "murgaLua"]:172: attempt to call field 'sleepMilliseconds' (a nil value)
stack traceback:
[string "murgaLua"]:172: in function 'sleep'
clock_demo.lua:15: in function 'clock_callback'
clock_demo.lua:47: in main chunk
[C]: ?
So i guess this is a bug?
greetz,
JP
|
|
01-29-2008 01:51 AM |
|
 |
JohnMurga
Administrator
      
Posts: 381
Group: Administrators
Joined: Apr 2007
Status:
Offline
Reputation: 2
|
RE: UPDATED murgaLua build
when testing the new 0.6, the clockdemo thing throws me this error:
/usr/local/bin/murgaLua: [string "murgaLua"]:172: attempt to call field 'sleepMilliseconds' (a nil value)
stack traceback:
[string "murgaLua"]:172: in function 'sleep'
clock_demo.lua:15: in function 'clock_callback'
clock_demo.lua:47: in main chunk
[C]: ?
So i guess this is a bug?
greetz,
JP
That is the regression I mentioned in another post ...
socket.sleep works, or wait for the bugfixed version in a few days.
Or even better, use the murgalua timer, that is the preferred method.
Sorry !! :-(
Cheers
JohnM
|
|
01-29-2008 08:24 AM |
|
 |
JohnMurga
Administrator
      
Posts: 381
Group: Administrators
Joined: Apr 2007
Status:
Offline
Reputation: 2
|
RE: UPDATED murgaLua build
Drawing to a hidden window was the first thing I tested. Unfortunately I only get a segmentation fault when I try to make_current() on the hidden window.
All that stuff is very flaky in FLTK itself ... But I got read_image working, and have an off_screen demo working too.
On a side note: You have to call the Fl_Menu_Bar() constructor as fltk.Fl_Menu_Bar(), but you can call the Fl_Pixmap() constructor direct. This is a little bit inconsequential.
Didn't realize that ... Better to be consistent.
On the list.
Thanks again.
Cheers
JohnM
|
|
01-29-2008 08:50 AM |
|
 |
mikshaw
Senior Member
   
Posts: 522
Group: Registered
Joined: Apr 2007
Status:
Offline
Reputation: 5
|
RE: UPDATED murgaLua build
The same behavior is evident with Fl_Tooltip, but it seems to be logical there. Fl_Tooltip is a single entity that affects all tooltips. Perhaps the same can be said about Fl_Pixmap. Contrary to the way Fl_Tooltip works, though, you can access Fl_Pixmap through a pointer to specific pixmap data.
|
|
01-29-2008 11:30 AM |
|
 |
iGame3D
Moderator
  
Posts: 231
Group: Moderators
Joined: Apr 2007
Status:
Offline
Reputation: 0
|
murgaLua_ExePath 0.6.0 Windows = nil
murgaLua_ExePath 0.6.0 Windows = nil
I was trying to get a program compiled on windows but the
program can't get past that nil global.
about.lua fails when concatenating "murgaLua_ExePath".
There's some weirdness with the way lfs will accept
windows path delimiters sometimes and not in others.
lfs.chdir() requires "/"
lfs.dir() accepts "\" and "/"
------- Edit later...
Yay I made my compile work.
But wow PNG look awful on Windows.
Windows version is on the left, this is emulated on Mac,
but it looks the same on the real thing.
This post was last modified: 02-10-2008 06:52 PM by iGame3D.
|
|
02-10-2008 11:09 AM |
|
 |
|