How to make some Shape
or Bitmap
to became unmovable mask, which cut all graphics above mask.
(they laying in different containers with different coordinate spaces)
Some explanation:
I have some vector Shape
in one class, some Bitmap
images in another. I want to make shape acting like "mask", cutting images which above Shape
.
I has two ideas, but they does not work:
1)I tryed BlendMode
, but they works another way - if i want to erase some image, this image must be parent of masking image, which is not acceptable in my case: images could move, but mask should be unmovable. Also i can't move mask to a child container of image, because they in different coordinate spaces.
I made explanation diagram: https://i.stack.imgur.com/Spbx4.png
2)Use .mask
property with masking layer. But mask and bitmap in different coordinate spaces, so this don't work too.