BorderImgGetInterpolationMode

Syntax

Mode = BorderImgGetInterpolationMode(Border)

Description

Retrieves the interpolation mode used when scaling or stretching parts of an image border object. This command is only applicable to borders created with CreateBorderImg().

Parameters

Border
The handle of the image border object.

Return Value

Returns an integer representing the current interpolation mode:

#PG_InterpolationMode_Linear            : Default. Good balance of speed and quality. Bilinear filtering.
#PG_InterpolationMode_Nearest           : Fastest, pixelated result. Good for pixel art. Nearest neighbor filtering.
#PG_InterpolationMode_Cubic             : Smoother results than linear, slower. Bicubic filtering.
#PG_InterpolationMode_MultiSampleLinear : Uses multiple samples, potentially smoother edges.
#PG_InterpolationMode_Anisotropic       : High quality, good for textures viewed at angles.
#PG_InterpolationMode_HighQualityCubic  : Highest quality cubic filtering, slowest.

Returns #False if the border handle is invalid or not an image border.

Remarks

The interpolation mode affects the visual quality when the border image segments are scaled to fit the target area. #PG_InterpolationMode_Nearest is often suitable for pixel art, while #PG_InterpolationMode_Linear or higher provide smoother results for photographic or complex images.

See Also

CreateBorderImg, BorderImgSetInterpolationMode

Supported OS

Windows, Linux