-void zoomSurfaceSize(int width, int height, float zoom_x, float zoom_y,
- int *dst_width, int *dst_height)
-{
- const float value_limit = 0.001;
-
- /* sanity check zoom factors */
- if (zoom_x < value_limit)
- zoom_x = value_limit;
- if (zoom_y < value_limit)
- zoom_y = value_limit;
-
- /* calculate target size */
- *dst_width = (int) ((float) width * zoom_x);
- *dst_height = (int) ((float) height * zoom_y);
-
- if (*dst_width < 1)
- *dst_width = 1;
- if (*dst_height < 1)
- *dst_height = 1;
-}
-
-SDL_Surface *zoomSurface(SDL_Surface *src, float zoom_x, float zoom_y)