Graphic takes on look of image below.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Graphic takes on look of image below.
this one is killing me because I know there is a great demo stack of this out there but cant find it again.
I am placing a regular polygon graphic over an image and I want the polygon to take on the the look of the section of image below it. I cant remember if it was Ink, imagedata or background pattern that was the key do this.
I am placing a regular polygon graphic over an image and I want the polygon to take on the the look of the section of image below it. I cant remember if it was Ink, imagedata or background pattern that was the key do this.
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Graphic takes on look of image below.
Code: Select all
on mouseUp
if the backGroundPattern of grc "PG" is the id of img "GG" then
set the backGroundPattern of grc "PG" to the id of img "BB"
else
set the backGroundPattern of grc "PG" to the id of img "GG"
end if
end mouseUp
Last edited by richmond62 on Sat Dec 30, 2017 9:44 am, edited 1 time in total.
Re: Graphic takes on look of image below.
Maybe you mean "backgroundpattern"?
The image itself does not need to be visible for this.
Code: Select all
...
set the BackGroundPattern of grc "your graphic here..." to 1003
## Or what ID your image may have.
...
Re: Graphic takes on look of image below.
I really need to type faster!
Re: Graphic takes on look of image below.
Yes! backgroundpattern thanks, that is what I was trying to remember.
Re: Graphic takes on look of image below.
Sorry, you know how it is, I could tell you, but then I would have to kill you!
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Graphic takes on look of image below.
Lost control of my own enthusiasm:
https://www.dropbox.com/s/1nnpsxnqy0bmx ... e.zip?dl=0
Code: Select all
on mouseUp
if the backGroundPattern of grc "PG" is the id of img "GG" then
set the polySides of grc "PG" to 5
set the backGroundPattern of grc "PG" to the id of img "BB"
else
set the polySides of grc "PG" to 7
set the backGroundPattern of grc "PG" to the id of img "GG"
end if
end mouseUp