Browse Source

Clarify that SDL_BlitSurface() ignores the width and height in dstrect

Sam Lantinga 1 year ago
parent
commit
2e7d2b94eb
1 changed files with 4 additions and 5 deletions
  1. 4 5
      include/SDL3/SDL_surface.h

+ 4 - 5
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
  * \param srcrect the SDL_Rect structure representing the rectangle to be
  *                copied, or NULL to copy the entire surface
  *                copied, or NULL to copy the entire surface
  * \param dst the SDL_Surface structure that is the blit target
  * \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
  * \returns 0 on success or a negative error code on failure; call
  *          SDL_GetError() for more information.
  *          SDL_GetError() for more information.
  *
  *
  * \since This function is available since SDL 3.0.0.
  * \since This function is available since SDL 3.0.0.
  *
  *
- * \sa SDL_BlitSurface
+ * \sa SDL_BlitSurfaceScaled
  */
  */
 extern DECLSPEC int SDLCALL SDL_BlitSurface
 extern DECLSPEC int SDLCALL SDL_BlitSurface
     (SDL_Surface *src, const SDL_Rect *srcrect,
     (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 *src, const SDL_Rect *srcrect,
      SDL_Surface *dst, const SDL_Rect *dstrect);
      SDL_Surface *dst, const SDL_Rect *dstrect);
 
 
-
 /**
 /**
  * Perform a fast, low quality, stretch blit between two surfaces of the same
  * Perform a fast, low quality, stretch blit between two surfaces of the same
  * format.
  * format.
@@ -872,6 +869,8 @@ extern DECLSPEC int SDLCALL SDL_SoftStretchLinear(SDL_Surface *src,
  *          SDL_GetError() for more information.
  *          SDL_GetError() for more information.
  *
  *
  * \since This function is available since SDL 3.0.0.
  * \since This function is available since SDL 3.0.0.
+ *
+ * \sa SDL_BlitSurface
  */
  */
 extern DECLSPEC int SDLCALL SDL_BlitSurfaceScaled
 extern DECLSPEC int SDLCALL SDL_BlitSurfaceScaled
     (SDL_Surface *src, const SDL_Rect *srcrect,
     (SDL_Surface *src, const SDL_Rect *srcrect,