Why is it that the following code draws the rectangle fully transparent?
graphics.beginFill(0xFFFFFFFF);
graphics.drawRect(0, 0, 100, 100);
graphics.endFill();
I’m aware that beginFill takes an argument without alpha, i.e. 0xRRGGBB, but having an alpha works for any color other than full white. It works fine for 0xFFFFFFFE for example.
For full white you have to AND with 0x00FFFFFF everywhere which is annoying.
Is there a logical reason for this behavior?
If the input value is expected to be 0x00RRGGBB, then passing in a value >= 0x01000000 is just not valid input. Probably this was hacked into the code to skip the fill if someone passes in the constant value for transparent.