OK, so I've not used SetImageMask much and it's not working as I'd expect it. I have used it to paste a texture onto images, but I want to take a square image and cut shapes out of it.
In the below example "bar.png" is a simple white square PNG.
"circle.png" is a simple white circle PNG.
I'd like to use the circle's rgb values to create an alpha transparency in the square. I can't get it to work.
Can someone help?
bgImage = LoadImage("bar.png")
fgImage = LoadImage("circle.png")
SetImageMask(bgImage , fgImage , 4 , 1 , 0 , 0)
SetImageMask(bgImage , fgImage , 4 , 2 , 0 , 0)
SetImageMask(bgImage , fgImage , 4 , 3 , 0 , 0)
CreateSprite(bgImage)
SetSpriteSize(bgImage , 30 , -1)
SetSpritePosition(bgImage , 35 , 35)
do
Sync()
loop
Images and code attached for easy access.
Thanks!!