topical media & game development
color24 = red << 16 | green << 8 | blue;
color32 = alpha << 24 | red << 16 | green << 8 | blue;
red = color24 >> 16;
green = color24 >> 8 & 0xFF;
blue = color24 & 0xFF;
alpha = color32 >> 24;
red = color32 >> 16;
green = color32 >> 8 & 0xFF;
blue = color32 & 0xFF;
// draw through (xt,yt) with endpoints (x0,y0) and (x2,y2)
x1 = xt * 2 - (x0 + x2)/2;
y1 = xt * 2 - (y0 + y2)/2;
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.