Jump to content

Inverting Graphics / drawRect alpha


Recommended Posts



I have a Problem with a Graphics object.

I want to use it as Mask for a Sprite(the Sprite is just a straight Line).


The Dimensions of the Graphics Object are calculated by a few other Sprites, which may change. So the Mask also changes.


The Problem:

I can calculate the "visible" part, but not the invisible Part.

So I need something like the opposite of mask, like this here:  https://github.com/GoodBoyDigital/pixi.js/issues/252


A few things I have thought about:

-Drawing alpha on a fullsize graphics object ==> Not possible

-Inverting the Visible => Invisible and the Invisible => Visible Part ==> Not possible

-The Solution described at the issue ==> Dirty Hack


Anyone had the same Problem & solved it? :/



Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...