scaledBy

open override fun scaledBy(scaleX: Float, scaleY: Float): ScaledPartialTexture

Returns an Image using the same pixel data as this image, but it lies about its actual size.

e.g. A 64x64 pixel image will still be 64x64, but will report that it is 32x32, and will render as 32x32 (i.e. the scaling is done which rendering, not as part of this method call).

This is particularly useful for icons and other small graphics, which would become pixelated if we actually scaled them. On a high-DPI display the full resolution of the image will be used, and only on regular (low DPI) displays will the image become pixelated.