| 253 | } |
| 254 | |
| 255 | void Piu_blendColors(xsMachine* the) |
| 256 | { |
| 257 | PiuColorRecord c0; |
| 258 | PiuColorRecord c1; |
| 259 | PiuColorRecord c2; |
| 260 | xsNumberValue plus = xsToNumber(xsArg(0)); |
| 261 | xsNumberValue minus = 1 - plus; |
| 262 | PiuColorDictionary(the, &xsArg(1), &c1); |
| 263 | PiuColorDictionary(the, &xsArg(2), &c2); |
| 264 | c0.r = (uint8_t)c_round(((double)c1.r * minus) + ((double)c2.r * plus)); |
| 265 | c0.g = (uint8_t)c_round(((double)c1.g * minus) + ((double)c2.g * plus)); |
| 266 | c0.b = (uint8_t)c_round(((double)c1.b * minus) + ((double)c2.b * plus)); |
| 267 | c0.a = (uint8_t)c_round(((double)c1.a * minus) + ((double)c2.a * plus)); |
| 268 | xsResult = xsUnsigned(((uint32_t)c0.r << 24) | ((uint32_t)c0.g << 16) | ((uint32_t)c0.b << 8) | ((uint32_t)c0.a)); |
| 269 | } |
| 270 | |
| 271 | void Piu_hsl(xsMachine* the) |
| 272 | { |
nothing calls this directly
no test coverage detected