Hi Bob, I'm still not sure if I understand correctly. All this only pays off if we come to the point where "g instanceof Graphics2D" gets true, right? If this is the case with your Batik approach, and we don't want to put too much effort in GEF, then go ahead with Batik. I too don't believe that anyone will volunteer to work on this in the near future.
Tom wrote: > OK, so the proposal is to replace > org.tigris.gef.persistence.SvgWriter2D with Batik and delete > org.argouml.uml.ui.SaveSVGAction2? +1 from me. Thomas -------- Original-Nachricht -------- > Datum: Mon, 16 May 2011 17:55:25 -0400 > Von: Tom Morris <tfmor...@gmail.com> > An: dev@argouml.tigris.org > Betreff: Re: [argouml-dev] Using batik for SVG > On Mon, May 16, 2011 at 5:30 PM, Bob Tarling <bob.tarl...@gmail.com> > wrote: > > To hopefully answer the comments of both Tom and Thomas - > > > > I'm only raising this because there seemed to be some criticism of my > > plans to do this previously. > > > > This is nothing to do with replacing the PGML stored in the zargo with > SVG. > > > > It is actually only replacing one class in GEF but that replacement > > adds several jar batik jar files to our download. > > > > That class being replaced is the one called in ArgoUML when doing > > File->ExportGraphics and chooisng a file type of SVG. > > > > All other Java2D classes in the system use Graphics2D but GEF goes > > back to such an old age that it only uses the Graphics class for its > > SVGWriter. > > > > As a result all methods in GEF of that use a Graphics class have to > > assume that this might not be a Graphics2D class and contain > > conditions like this in FigLine > > > > public int drawDashedLine(Graphics g, int lineWidth, int x1, int > y1, > > int x2, int y2, int phase, float[] dashes, int > dashPeriod) { > > if (g instanceof Graphics2D) { > > return drawDashedLineG2D((Graphics2D) g, lineWidth, > phase, x1, y1, > > x2, y2, dashes, dashPeriod); > > } > > // There follows from here lots of code to handle the (g > > instance of Graphics) that is only applicable to SVGWriter > > //..... > > //..... > > .... > > .. > > } > > > > I think all modern Java code can assume Graphics2D is the Graphics > > class being used and it is only the ancient SVGWriter that prevents > > this in GEF. > > > > Once we have that class replaced in GEF with the Batik equivalent then > > the conditional code above can also be removed from many GEF classes. > > This also fixes a few defects in GEF (e.g. > > http://gef.tigris.org/issues/show_bug.cgi?id=339). > > > > I had previously proposed using batik but it had been suggested that > > updating the SVGWriter class would be a fairly simple task. So I held > > back hoping that work would happen. > > OK, so the proposal is to replace > org.tigris.gef.persistence.SvgWriter2D with Batik and delete > org.argouml.uml.ui.SaveSVGAction2? > > I literally haven't looked at the prototype that I put together in > years, so you are probably more familiar with the tradeoffs than I am, > but I thought all the basics were implemented. It's far from a full > implemented of Graphics2D, but since GEF uses so little of it, I > thought most of what GEF uses was implemented. Could be faulty memory > though... > > I think it's your decision to make either way though. > > Tom > > ------------------------------------------------------ > http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2738342 > > To unsubscribe from this discussion, e-mail: > [dev-unsubscr...@argouml.tigris.org]. > To be allowed to post to the list contact the mailing list moderator, > email: [li...@tigris.org] -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2738486 To unsubscribe from this discussion, e-mail: [dev-unsubscr...@argouml.tigris.org]. To be allowed to post to the list contact the mailing list moderator, email: [li...@tigris.org]