diff --git a/pixmappaint.d b/pixmappaint.d index 910784e..f5e9c15 100644 --- a/pixmappaint.d +++ b/pixmappaint.d @@ -2850,7 +2850,7 @@ enum ScalingFilter { Visual impression: “smooth”, “blurred” ) +/ - linear, + bilinear, /++ Unweighted linear interpolation @@ -2860,6 +2860,9 @@ enum ScalingFilter { ) +/ fauxLinear, + + /// + //linear = bilinear, } private enum ScalingDirection { @@ -2926,7 +2929,7 @@ private void scaleToImpl(ScalingFilter method)(const Pixmap source, Pixmap targe } // ==== Bilinear ==== - static if ((method == ScalingFilter.linear) || (method == ScalingFilter.fauxLinear)) { + static if ((method == ScalingFilter.bilinear) || (method == ScalingFilter.fauxLinear)) { auto dst = PixmapScannerRW(target); size_t y = 0; @@ -2975,7 +2978,7 @@ private void scaleToImpl(ScalingFilter method)(const Pixmap source, Pixmap targe } // ====== Proper bilinear ====== - static if (method == ScalingFilter.linear) { + static if (method == ScalingFilter.bilinear) { const ulong[2] fract = [ (() @trusted => posSrc.ptr[0].fractionalDigits)(), (() @trusted => posSrc.ptr[1].fractionalDigits)(), diff --git a/pixmappresenter.d b/pixmappresenter.d index 0e46d3d..c8bab90 100644 --- a/pixmappresenter.d +++ b/pixmappresenter.d @@ -391,7 +391,7 @@ struct PresenterConfig { Scaling scaling = Scaling.keepAspectRatio; /++ - Filter + Scaling filter +/ ScalingFilter filter = ScalingFilter.nearest; @@ -634,7 +634,7 @@ final class OpenGl3PixmapRenderer : PixmapRenderer { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); break; - case linear: + case bilinear: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); break; @@ -744,7 +744,7 @@ final class OpenGl1PixmapRenderer : PixmapRenderer { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); break; - case linear: + case bilinear: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); break;