Page 1 of 1
Graphic takes on look of image below.
Posted: Fri Dec 29, 2017 9:53 pm
by windowsLC
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.
Re: Graphic takes on look of image below.
Posted: Fri Dec 29, 2017 10:25 pm
by richmond62
Better version available lower down!
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
Re: Graphic takes on look of image below.
Posted: Fri Dec 29, 2017 10:30 pm
by Klaus
Maybe you mean "backgroundpattern"?
Code: Select all
...
set the BackGroundPattern of grc "your graphic here..." to 1003
## Or what ID your image may have.
...
The image itself does not need to be visible for this.
Re: Graphic takes on look of image below.
Posted: Fri Dec 29, 2017 10:30 pm
by Klaus
I really need to type faster!

Re: Graphic takes on look of image below.
Posted: Fri Dec 29, 2017 11:35 pm
by windowsLC
Yes! backgroundpattern thanks, that is what I was trying to remember.
Re: Graphic takes on look of image below.
Posted: Fri Dec 29, 2017 11:51 pm
by bogs
Klaus wrote: ↑Fri Dec 29, 2017 10:30 pm
I really need to type faster!
I thought typing speeds were capped by the theory of relativity

Re: Graphic takes on look of image below.
Posted: Sat Dec 30, 2017 12:19 am
by Klaus
Sorry, you know how it is, I could tell you, but then I would have to kill you!

Re: Graphic takes on look of image below.
Posted: Sat Dec 30, 2017 10:20 am
by richmond62
Lost control of my own enthusiasm:
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
https://www.dropbox.com/s/1nnpsxnqy0bmx ... e.zip?dl=0