Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added SDL_RenderSetScale() and SDL_RenderGetScale()
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 2, 2012
1 parent 98a52d4 commit aadbfbc
Show file tree
Hide file tree
Showing 10 changed files with 577 additions and 327 deletions.
26 changes: 26 additions & 0 deletions include/SDL_render.h
Expand Up @@ -436,6 +436,32 @@ extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
SDL_Rect * rect);

/**
* \brief Set the drawing scale for rendering on the current target.
*
* \param scaleX The horizontal scaling factor
* \param scaleY The vertical scaling factor
*
* The drawing coordinates are scaled by the x/y scaling factors
* before they are used by the renderer. This allows resolution
* independent drawing with a single coordinate system.
*
* \note If this results in scaling or subpixel drawing by the
* rendering backend, it will be handled using the appropriate
* quality hints. For best results use integer scaling factors.
*/
extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
float scaleX, float scaleY);

/**
* \brief Get the drawing scale for the current target.
*
* \param scaleX A pointer filled in with the horizontal scaling factor
* \param scaleY A pointer filled in with the vertical scaling factor
*/
extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
float *scaleX, float *scaleY);

/**
* \brief Set the color used for drawing operations (Rect, Line and Clear).
*
Expand Down

0 comments on commit aadbfbc

Please sign in to comment.