I’ve got some line segments on a 200x200 canvas in Java 2D, kinda like so:
g2d.drawLine(10,10,100,10);
g2d.drawLine(100,10,100,100);
g2d.drawLine(100,100,50,100);
g2d.drawLine(50,100,50,125);
g2d.drawLine(50,125,75,125);
g2d.drawLine(75,125,75,150);
…and so on…
What I’d like to do is to increase the canvas to 400x400 and scale up the drawing proportionately (double it).
Is there a formula to do this? It needs to work so that whatever is drawn will be scaled (not just the example above).
My first thought was to scale the BufferedImage object itself but that seems like a bad idea. Was thinking it would be better to just apply some forumla to the coordinates, right? ???
Gracias,
Drew