summaryrefslogtreecommitdiff
path: root/include/SDL_render.h
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2012-10-01 20:59:33 -0700
committerSam Lantinga <slouken@libsdl.org>2012-10-01 20:59:33 -0700
commit8e121270fac2f0c4aa1d774f88f99f227d63022b (patch)
tree8c1ec67b9e934bf270d42bf3a7fa4e1e22a897b0 /include/SDL_render.h
parent4b7b524cade237e04e46c3989c199410ca8c5189 (diff)
Added SDL_RenderSetScale() and SDL_RenderGetScale()
Diffstat (limited to 'include/SDL_render.h')
-rw-r--r--include/SDL_render.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/SDL_render.h b/include/SDL_render.h
index cac1f22c67..7ec45010d2 100644
--- a/include/SDL_render.h
+++ b/include/SDL_render.h
@@ -437,6 +437,32 @@ 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).
*
* \param r The red value used to draw on the rendering target.