mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
proposed fix: set curr_src.h is to bottom_height before drawing bottom edges / corners in SDL_RenderTexture9Grid, to avoid issue where inadvertently using top height if the npatch existed on a larger texture than the drawn edge would cause too many pixels to be included in the bottom part of the render.
This commit is contained in:
parent
235022fe2f
commit
c922762791
1 changed files with 2 additions and 0 deletions
|
|
@ -4426,6 +4426,7 @@ bool SDL_RenderTexture9Grid(SDL_Renderer *renderer, SDL_Texture *texture, const
|
|||
|
||||
// Lower-right corner
|
||||
curr_src.y = srcrect->y + srcrect->h - bottom_height;
|
||||
curr_src.h = bottom_height;
|
||||
curr_dst.y = dstrect->y + dstrect->h - dst_bottom_height;
|
||||
curr_dst.h = dst_bottom_height;
|
||||
if (!SDL_RenderTexture(renderer, texture, &curr_src, &curr_dst)) {
|
||||
|
|
@ -4474,6 +4475,7 @@ bool SDL_RenderTexture9Grid(SDL_Renderer *renderer, SDL_Texture *texture, const
|
|||
|
||||
// Bottom
|
||||
curr_src.y = srcrect->y + srcrect->h - bottom_height;
|
||||
curr_src.h = bottom_height;
|
||||
curr_dst.y = dstrect->y + dstrect->h - dst_bottom_height;
|
||||
curr_dst.h = dst_bottom_height;
|
||||
if (!SDL_RenderTexture(renderer, texture, &curr_src, &curr_dst)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue