Created
February 11, 2013 12:34
-
-
Save MarianoGnu/4754193 to your computer and use it in GitHub Desktop.
patch to fix picture rotation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git "a/C:\\Users\\Mariano\\AppData\\Local\\Temp\\TortoiseGit\\effC60E.tmp\\effects-ad1ab88-left.cpp" "b/C:\\Users\\Mariano\\Documents\\GitHub\\easyrpg-player\\src\\effects.cpp" | |
index 5af3aae..703cc3b 100644 | |
--- "a/C:\\Users\\Mariano\\AppData\\Local\\Temp\\TortoiseGit\\effC60E.tmp\\effects-ad1ab88-left.cpp" | |
+++ "b/C:\\Users\\Mariano\\Documents\\GitHub\\easyrpg-player\\src\\effects.cpp" | |
@@ -146,7 +146,7 @@ void Bitmap::EffectsBlit(int x, int y, Bitmap const& src, Rect const& src_rect_, | |
} | |
if (rotate) { | |
- Matrix fwd = Matrix::Setup(angle, zoom_x, zoom_y, src_rect.x, src_rect.y, x, y); | |
+ Matrix fwd = Matrix::Setup(-angle, zoom_x, zoom_y, src_rect.x + src.GetWidth() / 2, src_rect.y + src.GetHeight() / 2, x + src.GetWidth() / 2, y + src.GetHeight() / 2); | |
EffectsBlit(fwd, src, src_rect, top_opacity, bottom_opacity, opacity_split); | |
} | |
else if (scale) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment