void extractBackgroundColor( Array2DReadView< uint8x4 > composite, Array2DReadView< uint8x4 > foreground, Array2DWriteView< uint8x4 > background ) { for( int y = 0; y < composite.height(); ++y ) { for( int x = 0; x < composite.width(); ++x ) { Vector4f cRGBA = toFloat( composite[ { x, y } ] ); Vector4f fRGBA = toFloat( foreground[ { x, y } ] ); Vector4f bRGBA = extractBackgroundColor( cRGBA, fRGBA ); background[ { x, y } ] = toUInt8( bRGBA ); } } }
uint8_t toUInt8(v8::Handle<v8::Value> value) { NonThrowableExceptionState exceptionState; return toUInt8(value, NormalConversion, exceptionState); }
static inline uint8_t toIntegral(v8::Handle<v8::Value> value, IntegerConversionConfiguration configuration, ExceptionState& exceptionState) { return toUInt8(value, configuration, exceptionState); }
static inline uint8_t toIntegral(v8::Isolate* isolate, v8::Local<v8::Value> value, IntegerConversionConfiguration configuration, ExceptionState& exceptionState) { return toUInt8(isolate, value, configuration, exceptionState); }