I'm writing a function to draw UI handles (rotate, resize and so on) in my client area in a Windows Forms application. The function is called when an object is selected.
The caller sends me a Graphics object properly rotated, scaled and translated to fit into the larger scheme of things (the selected object has its own rotation/translation/scale and the UI handle has a relative translation and rotation w.r.t the selected object). Now, I want my UI handles to be the same size regardless of the scale of the parent (selected object).
How do I eliminate/reset the scale factor in the transformation matrix? How do I reset to a scale of 1 while retaining the precious translation and rotation values?