BlockUI

BlockUI

19M Downloads

Box color ignored due to missing alpha

uecasm opened this issue ยท 0 comments

commented

Tested in 1.18 only for the moment. Using 0.0.34-ALPHA, which is the current default for Structurize (though updating to .42 doesn't seem to help).

A box such as:

<box size="100 50" color="white" linewidth="1">...</box>

does not result in actually drawing anything. This is because Color.getByName returns an RGB value, not an RGBA value, so the alpha component is 0 and the box is transparent (or actually not drawn at all, since UiRenderMacros.drawLineRect opts out if alpha is 0).

Theoretically, then, using color="#ffffffff" should work -- except that causes a crash due to java.lang.NumberFormatException: For input string: "#ffffffff" under radix 16 because it's not actually stripping off the leading # like the code seems to think it is.

Using color="rgb(255,255,255)" does work, as does color="4294967295". (Is there documentation for any of this anywhere?)

And is the only way to have a non-transparent background color to use an image background? I couldn't find any background color properties...