@@ -6337,6 +6345,11 @@ GpStatus WINGDIPAPI GdipMeasureDriverString(GpGraphics *graphics, GDIPCONST UINT pt[2].X = 0.0; pt[2].Y = 1.0; GdipTransformPoints(graphics, CoordinateSpaceDevice, CoordinateSpaceWorld, pt, 3);
- if (matrix)
- {
GpMatrix xform = *matrix;
GdipTransformMatrixPoints(&xform, pt, 3);
- } rel_width = sqrt((pt[1].Y-pt[0].Y)*(pt[1].Y-pt[0].Y)+ (pt[1].X-pt[0].X)*(pt[1].X-pt[0].X)); rel_height = sqrt((pt[2].Y-pt[0].Y)*(pt[2].Y-pt[0].Y)+
Without tests, I can only guess, but I think it's more likely that this matrix transform should be applied before the world->device transform.
Apart from questions of whether this is correct behavior, the patch looks good to me.
Vincent Povirk madewokherd@gmail.com wrote:
Without tests, I can only guess, but I think it's more likely that this matrix transform should be applied before the world->device transform.
Apart from questions of whether this is correct behavior, the patch looks good to me.
I have written a graphical test application to test this behaviour, and it shows the same results under Windows7 and Wine with this patch. There are the tests I've added for GdipMeasureDriverString+matrix, but they don't pass for not various not related reasons.
Without tests, I can only guess, but I think it's more likely that this matrix transform should be applied before the world->device transform.
Apart from questions of whether this is correct behavior, the patch looks good to me.
I have written a graphical test application to test this behaviour, and it shows the same results under Windows7 and Wine with this patch. There are the tests I've added for GdipMeasureDriverString+matrix, but they don't pass for not various not related reasons.
It doesn't look to me like any of the tests are checking the order. An obvious way to do that would be to sheer or rotate with one and scale X/Y differently with the other.
Vincent Povirk madewokherd@gmail.com wrote:
Without tests, I can only guess, but I think it's more likely that this matrix transform should be applied before the world->device transform.
Apart from questions of whether this is correct behavior, the patch looks good to me.
I have written a graphical test application to test this behaviour, and it shows the same results under Windows7 and Wine with this patch. There are the tests I've added for GdipMeasureDriverString+matrix, but they don't pass for not various not related reasons.
It doesn't look to me like any of the tests are checking the order. An obvious way to do that would be to sheer or rotate with one and scale X/Y differently with the other.
Yes, that's a good suggestion, but the tests currently won't pass anyway, so adding a test would not prove anything. As I said, the only way to test the result at this point is a visual test (which I have here).
Yes, that's a good suggestion, but the tests currently won't pass anyway, so adding a test would not prove anything. As I said, the only way to test the result at this point is a visual test (which I have here).
It would at least verify and document the correct behavior on windows.