I am drawing on the screen with Y direction as up the screen, rather than down, using the following code :-
Code:
Private mYFlip As New Matrix(1, 0, 0, -1, 0, 0)
With e.Graphics
.PageUnit = GraphicsUnit.Millimeter
.Transform = mYFlip
'drawing happens here
End With
I now need to translate the origin, scale the transformation, move the origin slightly - and then change the Y direction to be down the screen. It's the last part I am stuck on - I can read the current matrix, but how do I now create a new matrix, with Y down, based on the current matrix and associated origin and scale?
Code:
With e.Graphics
.PageUnit = GraphicsUnit.Millimeter
.Transform = mYFlip
.TranslateTransform(whatX, whatY)
.ScaleTransform(2.5, 2.5)
.TranslateTransform(-125, -150)
Dim mCurrentMatrix As Matrix = eg.Transform
'what to do now, to keep origin and scale the same, but make Y down the screen?
'drawing happens here
End With
Thank you in advance!