Added surface:mapRGB / surface:mapRGBA to map a color into the surface-appropriate color representation.
When passed as numbers, color channels are in the form ARGB, for ease of use and backwards compatibility. Also added masking on videoGetColorHex so out-of-range values didn't affect the other channels.
Without these changes, integer colors passed to renderer:setDrawColor (and others) were loosing their alpha channel, causing havoc when used with transparent textures.
Added
surface:mapRGB
/surface:mapRGBA
to map a color into the surface-appropriate color representation.When passed as numbers, color channels are in the form
ARGB
, for ease of use and backwards compatibility. Also added masking onvideoGetColorHex
so out-of-range values didn't affect the other channels.Without these changes, integer colors passed to
renderer:setDrawColor
(and others) were loosing their alpha channel, causing havoc when used with transparent textures.