Z L
Posts: 2
Nickname: vitamin
Registered: Oct, 2006
|
|
Dashed Line suddenly became Solid Line!
|
Posted: Oct 26, 2006 11:40 PM
|
|
Hi,
Can anyone help me with a problem that I'm facing now?
I managed to draw a dashed line between two rotating objects. However, I noticed that at certain rotating angle, the dashed line become a solid line!
Below is my code:
Graphics2D g2d = (Graphics2D)g; Line2D line = new Line2D.Double(x1, y1, x2, y2); float[] dashPattern = {8,18}; g2d.setStroke(new BasicStroke(1.0F, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1.0F, dashPattern, 0)); g2d.draw(line);
Thank you.
|
|