Vincent Povirk : gdiplus: Correct the coordinate transform for non-rectangular parallelograms.
Alexandre Julliard
julliard at winehq.org
Fri Apr 16 10:56:01 CDT 2010
Module: wine
Branch: master
Commit: bb9c1878c3aeb2b0ee17b57be23c07b661ade45c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bb9c1878c3aeb2b0ee17b57be23c07b661ade45c
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Thu Apr 15 15:13:34 2010 -0500
gdiplus: Correct the coordinate transform for non-rectangular parallelograms.
Apparently matrices in gdiplus don't work the way I think they do.
---
dlls/gdiplus/graphics.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 5a75fd0..b0cba47 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -2030,11 +2030,11 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
}
m11 = (ptf[1].X - ptf[0].X) / srcwidth;
- m12 = (ptf[2].X - ptf[0].X) / srcheight;
- mdx = ptf[0].X - m11 * srcx - m12 * srcy;
- m21 = (ptf[1].Y - ptf[0].Y) / srcwidth;
+ m21 = (ptf[2].X - ptf[0].X) / srcheight;
+ mdx = ptf[0].X - m11 * srcx - m21 * srcy;
+ m12 = (ptf[1].Y - ptf[0].Y) / srcwidth;
m22 = (ptf[2].Y - ptf[0].Y) / srcheight;
- mdy = ptf[0].Y - m21 * srcx - m22 * srcy;
+ mdy = ptf[0].Y - m12 * srcx - m22 * srcy;
stat = GdipCreateMatrix2(m11, m12, m21, m22, mdx, mdy, &dst_to_src);
if (stat != Ok) return stat;
More information about the wine-cvs
mailing list