From 2e7d2b94ebf614b9711c76ce9bafe9e814b54ee4 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 5 Sep 2023 14:18:13 -0700
Subject: [PATCH] Clarify that SDL_BlitSurface() ignores the width and height
in dstrect
---
include/SDL3/SDL_surface.h | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/SDL3/SDL_surface.h b/include/SDL3/SDL_surface.h
index 774832475550..ecfddaa62be6 100644
--- a/include/SDL3/SDL_surface.h
+++ b/include/SDL3/SDL_surface.h
@@ -778,15 +778,13 @@ extern DECLSPEC int SDLCALL SDL_FillSurfaceRects
* \param srcrect the SDL_Rect structure representing the rectangle to be
* copied, or NULL to copy the entire surface
* \param dst the SDL_Surface structure that is the blit target
- * \param dstrect the SDL_Rect structure representing the target rectangle in
- * the destination surface, filled with the actual rectangle
- * used after clipping
+ * \param dstrect the SDL_Rect structure representing the x and y position in the destination surface. On input the width and height are ignored (taken from srcrect), and on output this is filled in with the actual rectangle used after clipping.
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*
- * \sa SDL_BlitSurface
+ * \sa SDL_BlitSurfaceScaled
*/
extern DECLSPEC int SDLCALL SDL_BlitSurface
(SDL_Surface *src, const SDL_Rect *srcrect,
@@ -815,7 +813,6 @@ extern DECLSPEC int SDLCALL SDL_BlitSurfaceUnchecked
(SDL_Surface *src, const SDL_Rect *srcrect,
SDL_Surface *dst, const SDL_Rect *dstrect);
-
/**
* Perform a fast, low quality, stretch blit between two surfaces of the same
* format.
@@ -872,6 +869,8 @@ extern DECLSPEC int SDLCALL SDL_SoftStretchLinear(SDL_Surface *src,
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
+ *
+ * \sa SDL_BlitSurface
*/
extern DECLSPEC int SDLCALL SDL_BlitSurfaceScaled
(SDL_Surface *src, const SDL_Rect *srcrect,