Scaling Lines
Hi,
I've written a java program which paints a number
of lines, and the scene can be scaled or rotated.
When the scene is scaled up, the lines increase
in size not only in length but in width. What
is the best way of ensuring the lines stay the
same width regardless of scale? Are there any
transformation geometry routines that could do
this?At the moment, my paint routine does it
this way:
protectedvoid paintComponent(Graphics g){
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
BasicStroke solid =new BasicStroke((float)(3.0 * (1/myScale)));
g2.scale(myScale, myScale);
....
.... (paint lines here)
Also, my program paints a few dashed lines.
But I'm finding that as I increase or decrease the
scale, the blank space between each dash varies to
the point where the dashes space out too much, or
the lines look completely solid.Do I solve this
problem in a similar way as above?
Thanks.

