Scale Mode Constants

Category: Constants

Back to System Functions


Scale mode constants control how an image is filtered when it is drawn larger or smaller than its original size.

Use these constants with SetDefaultScaleMode and SetImageScaleMode.

Available Constants

Constant Value Description
SCALE_LINEAR 0 Uses linear filtering. This smooths the image when it is scaled.
SCALE_NEAREST 1 Uses nearest-neighbor filtering. This keeps sharp pixel edges and is usually preferred for pixel art.

Example

SetDefaultScaleMode(SCALE_NEAREST) player = LoadImage("player.png") SetImageScaleMode(player, SCALE_NEAREST)