diff options
Diffstat (limited to 'src/scale.h')
| -rw-r--r-- | src/scale.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/scale.h b/src/scale.h new file mode 100644 index 0000000..6294905 --- /dev/null +++ b/src/scale.h @@ -0,0 +1,20 @@ +#ifndef PW_SCALE_H +#define PW_SCALE_H + +#include <SDL3/SDL_render.h> + +/** + * Scaling mode to use for textures. + */ +enum pw_scale_mode { + PW_SCALE_MODE_PIXEL_PERFECT, + PW_SCALE_MODE_FILL, + PW_SCALE_MODE_STRETCH, +}; + +/** + * Scale's a texture to its renderer output. + */ +bool pw_scale(enum pw_scale_mode mode, SDL_Texture *texture, SDL_FRect *target); + +#endif |
