Hi Chris,

   Thanks for the patch, but...

Chris Nokleberg wrote:

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.

The problem is that there are an infinite number of circles of a fixed radius through one point. If you make your change then you get some arbitrary solution, which might be the one you want but that is really 'luck'. If there is some wording in the specification that indicates what the orientation should be please point it out.

   My understand has been that if you want to emit a circle in
the SVG Path syntax you must do it as two pieces (usually across the
diameter, and then back).

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]



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



Reply via email to