Cursor during image movement?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Cursor during image movement?
Hermann did some lovely stuff like this, one example was a "keyhole" to peep through, and it was draggable to emulate peeping at different angles.
I am not sure where it might be found now, but a search through Hermann's submissions might be valuable.
I am not sure where it might be found now, but a search through Hermann's submissions might be valuable.
Re: Cursor during image movement?
I miss Hermann.
Craig
Craig
Re: Cursor during image movement?
Sparkout.
Hermann was in the top group of members in terms of number of posts, over 2200. I don't know how one would search his body of work.
Craig
Code: Select all
but a search through Hermann's submissions might be valuable.
Craig
Re: Cursor during image movement?
Some of Hermanns work can still be found here: https://hh.on-rev.com/html5/index-large.html
Re: Cursor during image movement?
One of the biggest "collections" of Hermann's stuff is in the Raspberry Pi forum, although much of that work is not limited to Raspi, just frequently demonstrating very efficient techniques that the Pi can cope with.
https://forums.livecode.com/viewtopic.php?f=76&t=19248
But it's easy enough to view a list of all Hermann's posts and then within that do a keyword search for "keyhole"
https://forums.livecode.com/viewtopic.p ... 80#p135480
https://forums.livecode.com/viewtopic.php?f=76&t=19248
But it's easy enough to view a list of all Hermann's posts and then within that do a keyword search for "keyhole"
https://forums.livecode.com/viewtopic.p ... 80#p135480
Re: Cursor during image movement?
Hi.
No keyhole. No sure what keyword would make sense.
Craig
No keyhole. No sure what keyword would make sense.
Craig
Re: Cursor during image movement?
The second link in the post above goes straight to the point in Hermann's thread I found using Keyhole as search term.
Re: Cursor during image movement?
This is a "hole" (though not yet well done):
It's for an experimental graphic tool for my own use.
-
- Livecode Opensource Backer
- Posts: 10094
- Joined: Fri Feb 19, 2010 10:17 am
Re: Cursor during image movement?
That is a well-explored path, having done that in 2001.
BUT, I thought you wanted a hole in a mask over other things all in a single stack.
The easiest way to do this is to have an image twice the width and twice the height if the stack made as a PNG with a transparent hole and imported into LiveCode.
BUT, I thought you wanted a hole in a mask over other things all in a single stack.
The easiest way to do this is to have an image twice the width and twice the height if the stack made as a PNG with a transparent hole and imported into LiveCode.
Re: Cursor during image movement?
Glad to hear, because I encounters some strange behaviors of "import snaphot" command. Not sure I've well understood this powerful command.richmond62 wrote: ↑Wed Nov 16, 2022 10:00 amThat is a well-explored path, having done that in 2001.
My problems are:
1 - the "toolbar" must always be visible at the top of the stack
2 - the stack is resizable (so its size changes!)
3 - the hole must also be resizable. I don't know to manage this point with a single big png image. At this time, I have a large png image for the hole itself and the dark margins are made with 4 flat rectangles graphics.
Maybe there is a way to create on the fly a single image with alpha and a mask for the hole in LC? I mean an efficient way, not dealing with the imagedata and maskdata that would take too much time.
EDIT: Google sent me to this old message:
https://www.mail-archive.com/search?l=u ... newest&f=1
but I don't understand anything

-
- Livecode Opensource Backer
- Posts: 10094
- Joined: Fri Feb 19, 2010 10:17 am
Re: Cursor during image movement?
Well, this is about as goofy as it gets:
- - -
Because, as you can see, the hole ends up the same shape as the stack.
Currently playing "Our English Teacher Was A Driller Killer" mounting monitors on a board for wall attachment . . . thanks, I needed a break.
As you did NOT answer my question, I have assumed that you want a 'hole' inside a stack.
Tell me I am wrong and I shall do something similar for a stack-with-a-hole.
- - -
Because, as you can see, the hole ends up the same shape as the stack.
Currently playing "Our English Teacher Was A Driller Killer" mounting monitors on a board for wall attachment . . . thanks, I needed a break.

As you did NOT answer my question, I have assumed that you want a 'hole' inside a stack.
Tell me I am wrong and I shall do something similar for a stack-with-a-hole.
- Attachments
-
- peep hole.livecode.zip
- Stack.
- (87.74 KiB) Downloaded 110 times
-
- Livecode Opensource Backer
- Posts: 10094
- Joined: Fri Feb 19, 2010 10:17 am
Re: Cursor during image movement?
One of the ways round a hole that changes shape is to have an enormous mask (say 6000 x 6000) and make sure the hole is always inwith the borders of the resized stack.
Re: Cursor during image movement?
Sorry Richmond, I was deep in my scripts and didn't see your question. Yes, it is a hole in the stack.
After several tries, I finally found a simpler solution than yours based on the old link I posted - simpler because it doesn't require a big image.
So far, everything is working perfectly
it requires :
- a graphic named "Margins"
type = rectangle
opaque = true
backgroundColor = let's say "black"
rect = the rect of the card
blendLevel = 0
- a graphic named "Hole" (it will be the mask)
type = rectangle
opaque = FALSE
rect = the rect of the hole (resizable in my case)
blendLevel = 0
ink = "blendDstIn"
- both rectangles are grouped (named "GpViewer")
blendLevel = 0
ink = "blendSrcOver"
Window shape creation:
The transparency of the margins can be modified - before "recreateWindowShape" with:
set the blendLevel of graphic "Margins" to 50
After several tries, I finally found a simpler solution than yours based on the old link I posted - simpler because it doesn't require a big image.
So far, everything is working perfectly

it requires :
- a graphic named "Margins"
type = rectangle
opaque = true
backgroundColor = let's say "black"
rect = the rect of the card
blendLevel = 0
- a graphic named "Hole" (it will be the mask)
type = rectangle
opaque = FALSE
rect = the rect of the hole (resizable in my case)
blendLevel = 0
ink = "blendDstIn"
- both rectangles are grouped (named "GpViewer")
blendLevel = 0
ink = "blendSrcOver"
Window shape creation:
Code: Select all
on recreateWindowShape
templateImageSet // properties of ANY new image
try
import snapshot from group "GpViewer" -- with effects
set the windowShape of this stack to (the id of last img)
delete last img
catch errMsg
answer error errMsg with "Cancel"
end try
end recreateWindowShape
on templateImageSet
set the paintCompression to "png" // format de sortie de l'image créée
set the resizeQuality of the templateImage to "best"
set the threeD of the templateImage to false
set the borderWidth of the templateImage to 0
set the alwaysBuffer of the templateImage to true
end templateImageSet
set the blendLevel of graphic "Margins" to 50