xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Blankinship" <er...@media.mit.edu>
Subject Re: getting a group element for each component
Date Sat, 10 Aug 2002 08:24:48 GMT
i am able to get the <g> element for any JComponent using:
SwingSVGPrettyPrint.print(myJComponent, mysvgGenerator);

once i have the <g> element, i can then call
mysvgGenerator.translate( thisManyX, thisManyY );
to successfully reposition my <g> element where i want it.

i do this iteratively, to all of a parent component's children, each with
its own <g> element.  then i add these all to another, final document.

the problem:
the width and height of different JComponents are applied to other

what is happening:
digging into the generated .svg document, i found that there are repeated
clipPath elements.
for example:
under one <g>:
<g id="javax.swing.JTextArea1">
<defs id="defs4">
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath6">
<path d="M0 0 L0 116 L139 116 L139 0 Z" />

and under another <g> in the same final document:
<g id="javax.swing.JToggleButton2">
<defs id="defs3">
<clipPath clipPathUnits="userSpaceOnUse" id="clipPath6">
<path d="M0 0 L0 18 L296 18 L296 0 Z" />

anyone know of a solution?  is there a way to tell <g>'s generated from
other documents to not repeat already used clipPath id #s?


To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message