This isn't just for LC, this is about to be used in midlet programming too.
Intruduction.
A variable type 'pixel' presents, which consists of:
.red (byte,0-255)
.green (byte,0-255)
.blue (byte,0-255)
.alpha (byte,0-255)
Device screen is represented by array of 'pixel's, to allow free image manipulations.
So.
Drawing a RGB pixel is simpliest thing, R2 = R1, G2 = G1, B2 = B1.
Drawing a ARGB pixel onto a RGB needs better math,
R2 = R0 + R1 * A1 / 255
G2 = G0 + G1 * A1 / 255
B2 = B0 + B1 * A1 / 255
But still obviously easy.
But how to draw a ARGB pixel onto another ARGB pixel?
The effect that I am searching for, produces the following output (ARGB):
(255,0,0,128) + (0,0,255,128) = (85,0,170,192)
What color & alpha manipulations need to be done to achieve that?