The XFORM matrix in PlgBlt is calculated incorrectly

Nikolay Sivov bunglehead at
Tue Dec 8 11:08:37 CST 2009

Alexander Almaleh wrote:
> I'm talking about this code, 
> from, 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 at

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.

More information about the wine-devel mailing list