SharpFont
SharpFont copied to clipboard
FTMatrix.Multiply(mrot, mrot2) static method does not work correctly.
see https://github.com/Robmaister/SharpFont/issues/86#issuecomment-231745179 for example code to demo this problem.
Okay, after the change, this is more sane:
Mono C# Shell, type "help;" for help
Enter statements below.
csharp> using SharpFont;
csharp> var a = new FTVector(new Fixed16Dot16(1), new Fixed16Dot16(0));
csharp> a.Rotate(new Fixed16Dot16(30));
csharp> a.X
0.86602783203125
csharp> a.Y
0.5
csharp> var b = new FTVector(new Fixed16Dot16(1), new Fixed16Dot16(0));
csharp> b.Rotate(new Fixed16Dot16(30 + 90));
csharp> FTMatrix mrot = new FTMatrix(a, b);
csharp> FTMatrix mrot2 = new FTMatrix(a, b);
csharp> FTMatrix mrot3 = new FTMatrix(a, b);
csharp> FTMatrix.Multiply(ref mrot, ref mrot2)
csharp> mrot2.XX
0.5
csharp> mrot2.XY
0.86602783203125
csharp> mrot2.YX
-0.86602783203125
csharp> mrot2.YY
0.5
csharp> mrot3.XX
0.86602783203125
csharp> mrot3.XY
0.5
csharp> mrot3.YX
-0.5
csharp> mrot3.YY
0.86602783203125
csharp> mrot.XX
0.86602783203125
csharp> mrot.XY
0.5
csharp> mrot.YX
-0.5
csharp> mrot.YY
0.86602783203125
csharp> FTMatrix.Multiply(ref mrot, ref mrot2)
csharp> mrot2.XX
0
csharp> mrot2.XY
1
csharp> mrot2.YX
-1
csharp> mrot2.YY
0
csharp> FTMatrix.Multiply(ref mrot, ref mrot2)
csharp> mrot2.XX
-0.5
csharp> mrot2.XY
0.86602783203125
csharp> mrot2.YX
-0.86602783203125
csharp> mrot2.YY
-0.5
csharp>
Since the PropertyGet/PropertySet stuff was fixed in a different way, can you open a new PR with just these two changes (this + #87) rebased onto the current master?
I would also prefer if the old signatures stayed but had an ObsoleteAttribute applied to maintain API compatibility (even though they're broken) until the next major version bump. I did the same thing with the PropertyGet overloads with redundant out modifier for a class property.