mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-20 22:35:41 +00:00
SDL_RenderTexture() and SDL_RenderTextureRotated() take floating point source coordinates
See the discussion at https://discourse.libsdl.org/t/sdl-rendercopyf-uses-ints/36732/8
This commit is contained in:
@@ -3131,7 +3131,7 @@ int SDLTest_DrawCharacter(SDL_Renderer *renderer, float x, float y, Uint32 c)
|
||||
const Uint32 charWidth = FONT_CHARACTER_SIZE;
|
||||
const Uint32 charHeight = FONT_CHARACTER_SIZE;
|
||||
const Uint32 charSize = FONT_CHARACTER_SIZE;
|
||||
SDL_Rect srect;
|
||||
SDL_FRect srect;
|
||||
SDL_FRect drect;
|
||||
int result;
|
||||
Uint32 ix, iy;
|
||||
@@ -3147,10 +3147,10 @@ int SDLTest_DrawCharacter(SDL_Renderer *renderer, float x, float y, Uint32 c)
|
||||
/*
|
||||
* Setup source rectangle
|
||||
*/
|
||||
srect.x = 0;
|
||||
srect.y = 0;
|
||||
srect.w = charWidth;
|
||||
srect.h = charHeight;
|
||||
srect.x = 0.0f;
|
||||
srect.y = 0.0f;
|
||||
srect.w = (float)charWidth;
|
||||
srect.h = (float)charHeight;
|
||||
|
||||
/*
|
||||
* Setup destination rectangle
|
||||
|
||||
Reference in New Issue
Block a user