pixelRgbaWeight function
Implementation
bool pixelRgbaWeight(Pointer<SdlRenderer> renderer, double x, double y, int r,
int g, int b, int a, int weight) {
/*
* Modify Alpha by weight
*/
int ax = a;
ax = ((ax * weight) >> 8);
if (ax > 255) {
a = 255;
} else {
a = ax & 0x000000ff;
}
return pixelRgba(renderer, x, y, r, g, b, a);
}