Plane PorterDuff::values( const PlaneBase<double>& s, const PlaneBase<double>& d, const PlaneBase<double>& b ) const{ Plane output( s.getSize() ); for( unsigned iy=0; iy<zero.get_height(); iy++ ){ for( unsigned ix=0; ix<zero.get_width(); ix++ ){ output[iy][ix] = color::fromDouble( a_src [iy][ix] * s[iy][ix] + a_dest[iy][ix] * d[iy][ix] + a_both[iy][ix] * b[iy][ix] ); } } return output; }
PlaneBase<T> resizePlaneToFit( const PlaneBase<T>& input, Size<> size, Point<> pos ){ PlaneBase<T> output( size ); output.fill( 0 ); output.copy( input, {0u,0u}, input.getSize(), pos ); return output; }
SumPlane( Size<> size ) : sum( size ), amount( size ){ sum.fill( 0 ); amount.fill( 0 ); }