[EMAIL PROTECTED] wrote:
Hi List,

is there a proposed way / perhaps a documented API to render multiple SVG Documents in one Swing Component? (for example: One SVG, Scaled to 100x100 Pixels in the upper
left corner of a Panel and a second one scaled to 10x10 Pixel in the
lower right corner.

How about the SVG 'image element'? This would allow you to reference two SVG Document's and provide the size and location for their display.

It is not possible to use two separate Components.
In the best case I am looking for somethink like:

void renderSVG(Graphics2D g2d,URL svgSource,x1,y1,xSize,ySize);

You could also use the transcoders to convert SVG documents to Raster images.

Right now no interaktion/scripting is needed.

Has someone an idea how this could be realized / where to find further
dokumentation?

I found many examples for filling a whole Swing component with an SVG,
but until now nothing to specify an exact size/position inside a
component to render the SVG.

The size and position of the Component is generally determined by the parent of the component (well often by the layout of the parent of the component). So this is really a question of how to layout components - which is a swing question. That all said I think having one SVG document that references the other documents is definitely the way to go.

I am new to batik, the Framework seems very complex, how difficult
would it be to implement such a function?

Background:
I am evaluating the possible usage of SVG for symbol rendering
in a UML/Diagramm modeling application, Batik seems to be
very interesting.

Yes for UML it would make lots of sense to use either the 'image' element (references entire SVG document) or 'use' element (references a subtree of an SVG document) - I would suggest the 'use' element. You could then reference the standard symbology from a 'template' file and use the x/y/width/height attributes on the use element to place the symbols. You might also have an associated text element.

   This would all use the DOM interfaces which are very standard.
Assuming you allowed the user to move and modify the UML this
would require 'dynamic' support but that isn't a problem.



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



Reply via email to