Hi Andres,
Andres Toussaint wrote:
I have ready the SVGOMPathElement.getNormalizedPathSegList()
implementation to be submitted to the Batik project.
I have mailed a CLA. Have not received any notification as to how to
proceed.
I'll check if it is received.
This is the way i implemented it:
Created a new Class: AbstractSVGNormPathSegList, that extends
AbstractSVGPathSegList, in which, while parsing, the path is normalized.
This sounds good.
Also, I added a new inner class to SVGOMAnimatedPathData:
SVGOMNormalizedPathSegList, and modified the attrRemoved, attrModified
and attrAdded to have both lists synchronized.
The Normalization procedure is implemented as follows:
[...]
A ---> C+ Promoted to one or more Cubic Curves (one for each quadrant)
a ---> C+ Promoted to one or more Absolute Cubic Curves (one for each
quadrant)
The normalized path does not have any loss of quality or precision,
since no flattening is being applied. The resulting path describes the
same exact shape as the original, but using only the approved subset by
the SVG 1.1 spec.
This sounds _very_ good! But just to clarify the conversion
from elliptical arc to cubic does carry some small loss of precision
(not that anyone would notice as they are almost always rendered by
cubics).
I still do not understand fully the Animated versions of these
PathSegList's, so they remain still not implemented.
I can take a look, but since right now Batik doesn't do SMIL
animation I think most of the 'Animated' interfaces are implemented
essentially the same as the unanimated.
Please inform me what follows in order to be able to contrib. this code.
Regards,
The easiest thing for you to do is to attach the patch for your
change to your Bugzilla bug. The best way to create the patch is
by running 'svn diff' from the root of the batik development tree
and capturing the output (if you use Tortoise then 'create patch').
BTW did you implement any tests of these interfaces? ideally
it would be a javascript based test that might use the interface
to construct 'clone' geometry and ensure that it matches the
original geometry (like a narrow gold stroke over a wider 'grey'
stroke). This would make it easy to plug into the Batik testing
framework.
On Jul 19, 2005, at 7:59 AM, Thomas DeWeese wrote:
Hi,
Sorry silly math typo:
Thomas DeWeese wrote:
Quadradic = (1-t)^2*Pq1 + 2*t(1-t)*Pq2 + t^2Pq3
Cubic = (1-t)^3*Pc1 + 3*t(1-t)^2*Pc2 + 3*t^2*(1-t)Pc3 + t^3Pc4
Pc1 = Pq1
Pc2 =(Pq1 + 2*(Pq2-Pq1)/3)
Pc3 =(Pq3 + 2*(Pq2-Pq3)/2)
^ should be '3':
Pc3 =(Pq3 + 2*(Pq2-Pq3)/3)
Pc4 = Pq3
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]