Clarified that the clip rectangle is defined relative to the viewport, and added a clip test to testviewport.c

This commit is contained in:
Sam Lantinga
2020-03-08 21:02:40 -07:00
parent c8c05a9fc3
commit 611403dd0e
2 changed files with 80 additions and 18 deletions

View File

@@ -618,8 +618,8 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
* \brief Set the clip rectangle for the current target.
*
* \param renderer The renderer for which clip rectangle should be set.
* \param rect A pointer to the rectangle to set as the clip rectangle, or
* NULL to disable clipping.
* \param rect A pointer to the rectangle to set as the clip rectangle,
* relative to the viewport, or NULL to disable clipping.
*
* \return 0 on success, or -1 on error
*