is there a method for scale a set of points drawed in a m x n Canvas and then, redraw a equivalent set of points in a p x q canvas, where p < m and q < n? I know that the method of scaling a coordinate should is a option, but is there any other method for do this?
Thanks in advance
Isn’t this as simple as determining the scale factor(s) and multiplying each point accordingly? Assuming that the two canvases share the height/width ratio, the scale factor is
p/m, and you can multiply each point’s coordinates to map them to the new canvas.If the ratios aren’t the same, you can either use the smaller factor of
p/morq/nto maintain the proportions of the original points to each other, or usep/mto scale the x-axis andq/nto scale the y-axis.E.g. (assuming
mapis supported or you’ve created the equivalent):