getPixelInterpolate method
Get the pixel using the given interpolation
type for non-integer pixel
coordinates.
Implementation
Color getPixelInterpolate(num fx, num fy,
{Interpolation interpolation = Interpolation.linear}) {
switch (interpolation) {
case Interpolation.nearest:
return getPixelSafe(fx.toInt(), fy.toInt());
case Interpolation.linear:
case Interpolation.average:
return getPixelLinear(fx, fy);
case Interpolation.cubic:
return getPixelCubic(fx, fy);
}
}