I am doing a custom drawing using GDI +.
Usually, if I want to fit everything that I draw into a window, I calculate the corresponding ratio and scale everything, transforming this ratio:
e.Graphics.ScaleTransform(ratio, ratio);
The problem with ScaleTransform is that it scales everything, including strokes and brushes.
How do I scale all the pixel coordinates of what I'm drawing? Each line, rectangle or path is basically a sequence of points. So I can multiply all these points by the ratio manually, but is there a simple alternative to make this more smooth?
source
share