Lines Matching defs:source

179 blend_colors(uint8* bottom, uint8* source, uint8 alphaOverride)
181 uint8 alpha = (source[3] * alphaOverride) / 255;
184 bottom[0] = source[0];
185 bottom[1] = source[1];
186 bottom[2] = source[2];
190 source[0], source[1], source[2], alpha,
198 blend_colors(uint8* bottom, uint8* source)
200 if (source[3] > 0) {
201 if (bottom[3] == 0 || source[3] == 255) {
202 bottom[0] = source[0];
203 bottom[1] = source[1];
204 bottom[2] = source[2];
205 bottom[3] = source[3];
208 source[0], source[1], source[2], source[3],
427 blend_colors(uint8* bottom, uint8* source, uint8 alphaOverride)
429 uint8 alpha = (source[3] * alphaOverride) / 255;
432 bottom[0] = source[0];
433 bottom[1] = source[1];
434 bottom[2] = source[2];
439 bottom[0] = (uint8)((bottom[0] * destAlpha + source[0] * alpha) / 255);
440 bottom[1] = (uint8)((bottom[1] * destAlpha + source[1] * alpha) / 255);
441 bottom[2] = (uint8)((bottom[2] * destAlpha + source[2] * alpha) / 255);
447 bottom[0] = (bottom[0] * alphaDest + source[0] * alphaSrc) / alphaTemp;
448 bottom[1] = (bottom[1] * alphaDest + source[1] * alphaSrc) / alphaTemp;
449 bottom[2] = (bottom[2] * alphaDest + source[2] * alphaSrc) / alphaTemp;
458 blend_colors(uint8* bottom, uint8* source)
460 if (source[3] > 0) {
461 if (bottom[3] == 0 || source[3] == 255) {
462 bottom[0] = source[0];
463 bottom[1] = source[1];
464 bottom[2] = source[2];
465 bottom[3] = source[3];
468 uint32 destAlpha = 255 - source[3];
469 bottom[0] = (uint8)((bottom[0] * destAlpha + source[0] * source[3]) / 255);
470 bottom[1] = (uint8)((bottom[1] * destAlpha + source[1] * source[3]) / 255);
471 bottom[2] = (uint8)((bottom[2] * destAlpha + source[2] * source[3]) / 255);
473 uint8 alphaRest = 255 - source[3];
476 uint32 alphaSrc = 255 * source[3];
477 bottom[0] = (bottom[0] * alphaDest + source[0] * alphaSrc) / alphaTemp;
478 bottom[1] = (bottom[1] * alphaDest + source[1] * alphaSrc) / alphaTemp;
479 bottom[2] = (bottom[2] * alphaDest + source[2] * alphaSrc) / alphaTemp;