Tag Archives: scale to fit

Scale a drawing so it fits a target area in C#

Many drawing programs need to scale a drawing to fit a target area, either with or without stretching. The following MapDrawing method transforms a Graphics object so it maps a drawing rectangle to a rectangle on the Graphics object. // … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , , | 9 Comments