Then you get a coordinate system that is stretched vertically and horizontally to the sides of the picturebox:
But if you manually enter the values from the transformation matrix then you only get a small coordinate system that is centered correctly but isnt scaled properly:
How come the transformation matrix's scale values are not higher then? (look at the other attached screen capture.
If you print the matrix elements you get when x-min/max and y-min/max are -3,3, -3,3 by:
multiplying the original coordinates by the transformation matrix (here just for the x-axis):
One can see that the pixel distance between the two coordinate sets are: 35,76. Then it is obvious why the coordinate system is so small.
My question is then: Why does the transformation matrix have scaling values that are so small and how does it stretch according to the first matrix constructor? This is very confusing. Its like the constructor adds something to stretch the rectangle to the border other than just the transformation matrix but I cant understand the theory and why.
If the scaling was greater in the transformation Matrix for example like this:
This would result in a larger coordinate system closer to the border of the picturebox:
I hope I have made myself clear and apologize if something is confusing.
Open in new windowWith the values this code returns (that differ from yours probably just because it's another Matrix) I can set it manually for the same size:
Open in new windowNote that your code to print the elements uses 'ele' twice and actually prints the elements of the "Matrix inverse".