Putting image into a circle shape

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Putting image into a circle shape

Post by richmond62 » Sat Nov 24, 2018 4:24 pm

Did you notice the questionmark at the end of my first sentence? 8)
Yes, but I chose to ignore it: because, in that way, we could continue our lover's tiff a bit longer. :D

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Putting image into a circle shape

Post by Klaus » Sat Nov 24, 2018 4:32 pm

OK, I fully understand that! :D

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Putting image into a circle shape

Post by Klaus » Sat Nov 24, 2018 4:38 pm

Oops, sorry, of course I meant:
I fully understand that, DARLING! :D

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Putting image into a circle shape

Post by bogs » Sat Nov 24, 2018 10:23 pm

Klaus wrote:
Sat Nov 24, 2018 4:38 pm
Oops, sorry, of course I meant:
Yes, Dear ! :D
There, fixed that for you :P
Image

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Putting image into a circle shape

Post by Klaus » Sat Nov 24, 2018 10:36 pm

How dare you? :shock:

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Putting image into a circle shape

Post by richmond62 » Sun Nov 25, 2018 11:46 am

Ménage à trois . . .

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Putting image into a circle shape

Post by [-hh] » Sun Nov 25, 2018 4:35 pm

Here a very simple solution, no grouping, no pattern needed.

1. create an opaque circle graphic
2. create your image (layered *over* the circle graphic)
3. set ink of the circle graphic to "blendDstOut"
4. set ink of the image to "blendDstAtop"

script both the graphic and the img with
"on mouseDown; grab me; end mouseDown"

Now you can drag the image by grabbing it within the image's bounds.
OR
You can drag the graphic by grabbing it after scripting: "disable img <nameOfYourImage>" (from msg or button).

Find a full-stack-demo here:
http://forums.livecode.com/viewtopic.ph ... 80#p135480
shiftLock happens

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Putting image into a circle shape

Post by Klaus » Sun Nov 25, 2018 5:26 pm

Ah, cool, thank you Hermann!

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Putting image into a circle shape

Post by SparkOut » Sun Nov 25, 2018 6:27 pm

Ah, now that's what I was looking for when I mentioned "one of Hermann's nifty stacks".

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Putting image into a circle shape

Post by bogs » Sun Nov 25, 2018 7:15 pm

That is pretty cool.
Image

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”