Let's start with the last problem of drawing an anti-aliased line on a general background. if Cb = (Rb, Gb, Bb) is the color of the background, Cl = (Rl, Gl, Bl) is the color of the line and A is the alpha value of the current pixel, then the final color will be A*Cl + (1 - A)*Cb. If the background is not opaque, the formula is a little more complicated. This formula assumes the colors are expressed in linear RGB (you thus have to convert from/to sRGB/other gamma corrected color spaces if your colors are expressed using this color space)..
So if you drawing wu-line and this algorithm is based od
spliting 100% color on two pixels based on the fraction part
of coordinate - it is the alpha that youre splitting? (I thought
it was collor but i was probably wrong) - how would
it like look like if you draw 255 white on 128 gray? say alpha is
50% - 50% so this is two pixels of 192 - if alpga is 80% 20%
this would be 80%*255+20%*128 up pixel and 20%25+80%*128
down
does it make opticaly right line?
as to linear rgb - my monitor is not linear i thing (On my old crt monitor a I even was doing hand made test by comparing
chess-like grids of white and black to corresponding gray
color - and it showed that those given in docs formula
with gamma is quite correct with my experiments outcome
Probably this lcd monitor i use now is like that too, so this
is non linear so when drawing wu-line on some bitmap
picture (wallpaper or something) what should i do - is
the wallpaper in linear values probably no and this is already gamma corrected so i should ungamma it blend my line linear
and then gamma the result,
no?