diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-03-24 19:20:49 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-03-26 07:30:39 +0000 |
commit | 4091bd9568e5aff4a1f24416d26da567a2c076ad (patch) | |
tree | 32285c49c19821d5d287fab29cf264a647735ded /src/sdlgraphics.h | |
parent | 4604ee1caf00fe1a8c095119c1046e7f625e1f0b (diff) | |
download | mana-4091bd9568e5aff4a1f24416d26da567a2c076ad.tar.gz mana-4091bd9568e5aff4a1f24416d26da567a2c076ad.tar.bz2 mana-4091bd9568e5aff4a1f24416d26da567a2c076ad.tar.xz mana-4091bd9568e5aff4a1f24416d26da567a2c076ad.zip |
Added functions to draw images at sub-pixel positions
This can be used for smoother mouse cursor movement when rendering our
own mouse cursor (already changed in this commit) and is also necessary
for implementing support for HiDPI font rendering.
Also dropped some almost duplicated OpenGL code.
Diffstat (limited to 'src/sdlgraphics.h')
-rw-r--r-- | src/sdlgraphics.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sdlgraphics.h b/src/sdlgraphics.h index ab6407f0..3ed31ca3 100644 --- a/src/sdlgraphics.h +++ b/src/sdlgraphics.h @@ -48,6 +48,15 @@ public: int desiredWidth, int desiredHeight, bool useColor) override; +#if SDL_VERSION_ATLEAST(2, 0, 10) + bool drawRescaledImageF(Image *image, + int srcX, int srcY, + float dstX, float dstY, + int width, int height, + float desiredWidth, float desiredHeight, + bool useColor) override; +#endif + void drawRescaledImagePattern(Image *image, int x, int y, int w, int h, |