Page 1 of 1

development GUI-server v. 0.93

Posted: Mon Jun 25, 2007 10:43 pm
by Lutz
- first version of GUI-server with 2D Graphics

- draw shapes and text on canvas, handle mouse events

- do animations with 30 frames/second

- three new demos shapes-demo.lsp, mouse-demo.lsp, animation-demo.lsp


Lutz

ps: screenshot shapes http://newlisp.org/downloads/developmen ... s-demo.png

Posted: Tue Jun 26, 2007 5:00 am
by didi
This 2D-graphic is absolut super - this is thrilling !

Even on my old machine it is very fast .
It's very simple to use , the predefined color are not bad , too . :-)

Congratulations Lutz !

Posted: Tue Jun 26, 2007 9:03 am
by Sleeper
the same problem with newlisp-edit.lsp

message-dialog: cannot be applied to MAIN:TheEditor

all other demos runs fine, including new 2D-graphics stuff
(this looks great. congrats Lutz!)

Posted: Tue Jun 26, 2007 11:36 am
by Lutz
Now I know what is happening to newlisp-edit.lsp on your machine:

you need to create a C:\temp directory on your machine,

the message box error relates to this.

Lutz

ps: I will upload a fixed newlisp-edit.lsp which will pop up the message box correctly when c:\temp is missing on Windows

Posted: Tue Jun 26, 2007 12:25 pm
by HPW
Great stuff.
Shape performance seems good.

Animation is flickering on my WIN screen.
Also a error-message is shown
C:\Programme\newlisp>newlisp animation-demo.lsp
server listening on 47011
server accepted from 0.0.0.0
server connecting to 0.0.0.0:47012
server connected

string expected in function eval-string : event
called from user defined function gs:check-event

C:\Programme\newlisp>

Posted: Tue Jun 26, 2007 12:41 pm
by Lutz
This message appears when the animation app disconnects from the server. I need to tweak the new gs:check-event more to make this message disappear.

As for the flickering: this is performance related, not so much the CPU of your machine, as the graphics card. On my Mac Mini (only 1.42 Ghz)and a new Windows lap top I tried it is totally smooth, but on an older Windows machine (1.8 Ghz and cheap graphics card) I also saw flickering. Try to adjust the value in animation-demo.lsp, where it says:

Code: Select all

(set 'delay 33000) ; 30 frames/sec

; change this to 

(set 'delay 60000) ; 16 frames/sec

; or even 

(set 'delay 100000) ; 10 frames/sec
Lutz

ps: the splash screen stuff for both Mac OS X and Windows is in the code, but haven't come around to test it on either platform, but its coming ;-)

ps2: I am still interested to know if the transparency of frameless-demo.lsp shows up on Windows VISTA

Posted: Tue Jun 26, 2007 1:22 pm
by Sleeper
thanks Lutz!
i found this place in the beginning of newlisp-edit.lsp, i think there also must be

Code: Select all

(if (= ostype "Win32") "C:\\temp" "/tmp")
("Win32" instead of Win32)
i fixed that, created "c:\\temp" directory and now it works.

Posted: Tue Jun 26, 2007 5:06 pm
by didi
I'm happy with the 2d-functions , only some suggestions :

Maybe in the manual the third parameter of a circle is not mentioned , i think that is the diameter ?

Which is the best way to set a single point , to draw a line with the same coordinates, or is there a point function planned ?

Will it be possible to have a text-orientation, maybe an angle ?

Posted: Tue Jun 26, 2007 7:02 pm
by Lutz
Maybe in the manual the third parameter of a circle is not mentioned , i think that is the diameter ?
many corrections of the manual in 0.94 (later today)
Which is the best way to set a single point , to draw a line with the same coordinates, or is there a point function planned ?
a short line, or small rectangle, or small circle. GUI-server is device independent drawing, no pixels ;-)
Will it be possible to have a text-orientation, maybe an angle ?
yes, but not in upcoming 0.94, which brings gs:set-translate (move origin), gs:set-scale (zoom in an out). What you want is either gs:set-rotation as a global setting or gs:rotate-tag (like gs:move-tag but rotates). The gs:set-xxxx work global on all the canvas, while gs:move-tag, gs:rotate-tag and gs:delete-tag are targeted at a group (which coud be one).

When we have images there will also be gs:shear-tag

We are still a dozen versions away before having all the basics.

Lutz