Just discovered the format of RenderTarget:clear() is hex value for RGBs and normalized value for alpha - example of red transparent texture: cloudTexture:clear(0xA00000,.2) Is it intentionally or i miss something?
TextField:setTextColor accepts also hex but setAlpha normalized alpha the only exclusion is setColorTransform, but that transforms separate channels, and not setting the color
well its not much of a problem i just find more convenient using formats for RGBA like (0,0,0,1) or (0x000000FF) rather than mixed forms but i noticed that :clear method doesn't work well. With alpha values set to 0 we shouldn't be able to see the rectangle. Or i am doing something wrong?
@ar2rsawseen to help with some more info , RenderTarget occurs with no visual errors when render alpha channeled bitmaps , just the "clear" method left the texture in very very strange state.
All functions that accepts color+alpha (Shape:setLineStyle, Shape:setFillStyle, Mesh:setColor and RenderTarget:clear) accept as hex color+normalized alpha. Although not very convenient, at least it's consistent.
@atilim, @plamen It's true thats something wrong with alpha. I set any color with 0 alpha and I see that color. White color is totally opaque and black color is about 5% opaque. Am I doing something wrong or it's a bug?
Comments
TextField:setTextColor accepts also hex
but setAlpha normalized alpha
the only exclusion is setColorTransform, but that transforms separate channels, and not setting the color
All functions that accepts color+alpha (Shape:setLineStyle, Shape:setFillStyle, Mesh:setColor and RenderTarget:clear) accept as hex color+normalized alpha. Although not very convenient, at least it's consistent.
Am I doing something wrong or it's a bug?