Alexander Almaleh wrote:
I'm talking about this code, from http://source.winehq.org/source/dlls/gdi32/bitblt.c, in function PlgBlt :
I have a formula that so far seems to give always the correct matrix:
xf.eM11 = (FLOAT) -(rect[1].y*plg[2].x+rect[0].y*(plg[1].x-plg[2].x)-rect[2].y*plg[1].x+plg[0].x*(rect[2].y-rect[1].y)) /(rect[0].y*(rect[2].x-rect[1].x)-rect[1].y*rect[2].x+rect[2].y*rect[1].x+(rect[1].y-rect[2].y)*rect[0].x);
Hi, Alexander. This was my patch.
Feel free to correct this sending patch for review to wine-patches@winehq.org
P.S. I don't see your point on inlining determinant expression.
I found out about the bug by converting the rect points using the XFORM matrix, and checking that their the same as the plg points.