Hi !
I’m trying to do smth a little tricky that is explain only in one
tutorial I found on the net (and it’s a C tuto) It’s to use a pixbuf, or
eventually a png file as a mask. All seems to work well, except the last
line.
If I use
mask = Cairo::ImageSurface.from_png(“my image_filepath.png”)
cr.mask_surface(mask, x, y).
The interpreter said there is no mask_surface method for Cairo::Context
object.
If I use
mask = Cairo::ImageSurface.from_png(“my image_filepath.png”)
cr.mask(mask)
It says that mask is not a Cairo pattern. And it’s the same when I tried
all I could have imagined to set the mask from a pixbuf.
So has anyone an idea of how I can solve this problem ?
I attach my code to the message if it could be of any help.