[Gag] example JigSaw, 1% done !

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

[Gag] example JigSaw, 1% done !

Post by newdep »

Here is an example jigsaw in GS, very raw and basic!
(download both in the same directory and extract jigsaw.tgz)

(PS: the piece a1.png is missing !)

http://www.nodep.nl/downloads/newlisp/jigsaw.lsp (code)
http://www.nodep.nl/downloads/newlisp/jigsaw.tgz (Images!)

I have some remarks on this perhpas they can be cleared? ;-)


As it seems now a draw-image can only be moved by mouse-dragged when its
ontop of a canvas. An image itself does not return any tags?

When using a canvas below the Image you can see in the jigsaw.lsp example
that you see the border lines of the canvas... My question! Can Canvas get "transparent" 4
bytes color codes? instead of 3? Or is there another way to make those canvas boders dissapear?
(OR if images would return "tags" then the extra canvas is not needed and
the image itself is transparent)


How do I retrieve the gs:draw-image image size?

Tags stacking... This Jigsaw has only 9 pieces.. but using a jigsaw with 100 pieces
I need to do a whole lot of redrawing (deleting and laoding from disk)
to get the current piece ontop of the rest, thats actualy waste of cpu ;-) I there a more clever way?


Hope to fix this jigsaw to a nicer one finaly ;-)

Regards, Norman.
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

On the Mac I only see one big black area, and nothing else, why are all tiles black?
Can Canvas get "transparent" 4 bytes color codes?
yes on Mac OS X, not on WinXP, Linux don't know, Vista don't know
Or is there another way to make those canvas boders dissapear?
There is gs:window (see frameless-demo.lsp) which puts a window without any decorations. On the Mac the demo also shows the window transparent.
OR if images would return "tags" then the extra canvas is not needed and the image itself is transparent)
Not sure I understand? The tag is transmitted through the mouse actions when clicking on them. You could then keep track of the tags their new positions pushing date on to some list.

Some sort of gs:tag-query will be implemented in the future, but keeping track of it yourself will result in a lot faster code than doing the future gs:tag-query request which involves communications between GS-Server and your application.

The current absence of tag-queries shouldn't prevent you from doing anything, but of course you would have to write some code ;-)
How do I retrieve the gs:draw-image image size?
we will have a gs:get-image-data in the next version, Cormullion had the same question and ended up using some utility together with (exec ....) to accomplish getting image data.
Tags stacking. I there a more clever way?
for the next version we could have gs:tag-order, which takes a list of ordered tags and shuffles/redraws the new order

Lutz

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

... now the jigsaw puzzle works nicely!

I was starting the app from newlisl-edit.lsp and it looked for the .png pics in the wrong place.

Lutz

Locked