i need to draw a Rectangle only over the areas, which were not drawn yet.
For example when i call drawText to write something, and then draw the Rect over it, it should be behind the text.
I cant simply first draw the Rect, then write the Text in that case.
I read about XFermode, but i do not know, how to use it...
You can setup your paint object to use
PorterDuffXfermodewith blend modeMode.MULTIPLY.In my opinion it is better for performance to draw the rectangle first and then draw the text, but if this is not possible then use
PorterDuffXfermode.