I'm trying to figure out what is going on here:
having a System.Drawing.Drawing2D.Graphics
objects called g
.
g.Transform has these values:
[0] = 1
[1] = 0
[2] = 0
[3] = -1
[4] = 0
[5] = 1122.66663
when doing
int minAngle = 0;
g.Transform.Rotate(360 - minAngle);
I get the same elements for the g.Transform
property:
[0] = 1
[1] = 0
[2] = 0
[3] = -1
[4] = 0
[5] = 1122.66663
However when I do:
int minAngle = 0;
g.RotateTransform(360 - minAngle);
I get these elements for the g.Transform
property:
[0] = 0.99999994
[1] = 3.019916E-07
[2] = 3.019916E-07
[3] = -0.99999994
[4] = 0
[5] = 1122.66663
Why is there such a big rounding difference between both methods, which seem to do the same: modifying the world transform?
Besides the floating point rounding 'issue', is there any difference when using rotateTransfrom vs. transform.rotate ?
(.NET Framework 4.8)