I'm using ExtendedGeneralPath to adapt some existing path data (FWIW, 
PowerPoint autoshapes). I need to define a circular subpath, and the 
straightforward way of using arcTo with the same endpoints and 360
degrees does not work due. An optimization in Batik assumes that
equal endpoints means it is always ok to omit the segment, but I
believe you need to also check that largeArcFlag is false.

I've been able to hack around it by making sure that the endpoints
differ by a very small amount, but I'd prefer not to.

I've attached a patch against CVS.

Thanks,
Chris

*** ExtendedGeneralPath.java.~1.8.~ Fri Dec  3 20:00:35 2004
--- ExtendedGeneralPath.java Wed Dec  8 02:07:22 2004
***************
*** 123,129 ****
          // Get the current (x, y) coordinates of the path
          double x0 = cx;
          double y0 = cy;
!         if (x0 == x && y0 == y) {
              // If the endpoints (x, y) and (x0, y0) are identical, then this
              // is equivalent to omitting the elliptical arc segment entirely.
              return;
--- 123,129 ----
          // Get the current (x, y) coordinates of the path
          double x0 = cx;
          double y0 = cy;
!         if (x0 == x && y0 == y && !largeArcFlag) {
              // If the endpoints (x, y) and (x0, y0) are identical, then this
              // is equivalent to omitting the elliptical arc segment entirely.
              return;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to