Hi Mistercaste, mistercaste <misterca...@gmail.com> wrote on 03/15/2010 07:17:01 AM:
> > public class OnZoom implements EventListener{ > > > > @override > > public void handleEvent(Event evt){ > > System.out.println("Zoom event catched!"); > > } > > } > > I also have the lines with same widths divided in groups in my DOM. Make sure that the lines with the same widths are getting the stroke width from their parent group: <g stroke-width="5"> <line ... /> <!-- this should not have stroke-width set--> [...] </g> Then if you change the stroke-width on the 'g' it will cascade to the children. > > Now the problem is that I don't know how to set the stroke-width value > > according to the actual zoom size. The You can calculate the zoom level of an AffineTransform by calculating it's determinant: http://java.sun.com/j2se/1.5.0/docs/api/java/awt/geom/AffineTransform.html#getDeterminant%28%29 As that increases you want to decrease the stroke-width.