CurrentTranslate attribute

2003-08-14 Thread Andres Toussaint
HI, i was wondering if there is an equivalent to the emacscript commands detailed following, within Batik Java: var trans = document.documentElement.currentTranslate; var scale = document.documentElement.currentScale; I cannot seem to find them. I am programming drag routines for SVG elements,

Re: mousedrag and mousedown not detected

2003-08-14 Thread Andres Toussaint
Works perfect now. Thanks. I compiled the source from Batik 1.5, changing only the 6 files mentioned in the patch, and made the Jar files with the Ant script. Now all objects (SVG and PNG) respond to the DOWN, UP, DRAG, MOVE, OVER and CLICK. Thank you for the fast response and support.

Re: mousedrag and mousedown not detected

2003-08-14 Thread Andres Toussaint
Sorry to put you to work. Please post to the mailing list when you have a solution or workaround for this situation, also if i can assist in any way, i will be glad to try. Andres. Thomas DeWeese wrote: Andres Toussaint wrote: Hi Thomas, i appreciate your response. I recreated a simplified

Re: CurrentTranslate attribute

2003-08-14 Thread Andres Toussaint
Thomas, thanks again, you have been very kind. I had not considered SVGLocatable and SVGMatrix since they lack proper description it was not clear what their function was. I have succesfully accomplished the drag with getCurrentScale(), and will try with the SVGMatrix, since it does seem like

rect element mouseclick triggers ClassCastExeption

2003-08-21 Thread Andres Toussaint
OTECTED] I have not added any patches or other modifications to the Batik code. Thanks in advance, Andres Toussaint

Re: rect element mouseclick triggers ClassCastExeption

2003-08-22 Thread Andres Toussaint
) The class cast exception is happening in com.onemileup code which is yours judging by your mail address. Andres Toussaint wrote: Hello all, Previously I had a trouble with the mouseaction events on a JSVGCanvas, that Thomas DeWeese was so kind to solve for us (covered in the thread mousedrag

Duplicate image references in SVG

2003-10-02 Thread Andres Toussaint
Hi All, When I add two instances of the same image to my document via the image> , and add a actionListener to the group, only the first instance of the image> reacts to the actionEvents. How can I have duplicate references to the same image inside my SVG, but that behave as individual instances

Re: Duplicate image references in SVG

2003-10-02 Thread Andres Toussaint
. On Thursday, October 2, 2003, at 10:36 AM, Thomas DeWeese wrote: Andres Toussaint wrote: Hi All, When I add two instances of the same image to my document via the image , and add a actionListener to the group, only the first instance of the image reacts to the actionEvents. Hmm, are you sure

Re: SVG to PowerPoint as slides

2003-11-12 Thread Andres Toussaint
There is an opensource proyect i have been using a bit, for handling WMF's, if it helps: http://javametafile.sourceforge.net/ Hope this helps, Andres. On Wednesday, November 12, 2003, at 06:47 AM, Thomas DeWeese wrote: Yoganarasimha G wrote: Yeah, i know it's very lossy... and no idea at

Re: Layering JSVGCanvases

2003-11-19 Thread Andres Toussaint
Hi Kaushalya: I have managed to do this using the graphics element of the parent that holds the JSVGCanvas item (in my case a Viewport object) I call the paint(), with the first item in the method beeing a paintChildren(), so the SVGCanvas gets painted, and then i draw the Graphics2D layer on top

Re: printing large image in tiles/slices

2004-01-19 Thread Andres Toussaint
pages. Thanks in advance, Andres Toussaint - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

SVG to Java2D

2004-02-17 Thread Andres Toussaint
Hello: I am interested to get some guideance in creating Java2D objects from my JSVGCanvas SVGDocument. The purpose of this is to bridge it into a Java2D to DXF (autoCad) converter that i am also working on. Ultimately I think I would need to have a SVGtoDXFTranscoder, but i think having a

Re: SVG to Java2D

2004-02-19 Thread Andres Toussaint
anyway. Peter Andres Toussaint wrote: Hello: I am interested to get some guideance in creating Java2D objects from my JSVGCanvas SVGDocument. The purpose of this is to bridge it into a Java2D to DXF (autoCad) converter that i am also working on. Ultimately I think I would need to have

GVT AffineTransform of embedded ImageNode

2004-03-23 Thread Andres Toussaint
ges are quite large (3500x1500 pts. average) and i do require to generate relatively accurate DXF output. I would appreciate your help, Andres Toussaint PS. The method TextNode.getLocation() does not return an appropriate value (it returns 0,0), i think this may be a bug.

Re: transcoder AOI help

2004-04-06 Thread Andres Toussaint
Hello: I had a similar problem with the application i am building, since i use large SVG´s and wanted to print them in tiles (for this i implemented a new class i called TiledPrintTranscoder that extends SVGAbstractTranscoder). For your particular problem i would suggest the following: Using

Re: transcoder AOI help

2004-04-06 Thread Andres Toussaint
clipped in DXF? Thanks, Dave Neuendorf Andres Toussaint wrote: Hello: I had a similar problem with the application i am building, since i use large SVG´s and wanted to print them in tiles (for this i implemented a new class i called TiledPrintTranscoder that extends SVGAbstractTranscoder). For your

Re: JSVGCanvas resizing document on initial load

2004-04-06 Thread Andres Toussaint
Hi Mike: That happened to me also, and it turned out that my original SVG file was the source of the error. You have to specify the viewport with the exact same dimensions as the width height attributes in your SVG declaration: svg width=1000 height =500 viewport=0 0 1000 500 . ... /svg

Re: Drag and drop

2004-05-13 Thread Andres Toussaint
Hi, Since i had invested quite some time with this issue and have finally done it, thanks to a wide variety of sources and help from other user´s replies to the forums, i am submitting my solution to two options of DnD situations. DnD options: 1. ) from a JComponent, (like a JTree) into a

Re: Drag and drop

2004-05-17 Thread Andres Toussaint
Hi Francesco: I have found some possible situations: First, on the svgCanvas.addSVGLoadEventDispatcherListener you are calling registerListeners(), and in this method you are still calling the onNewClickAction() method. root.addEventListener( SVGConstants.SVG_MOUSEDOWN_EVENT_TYPE ,

Re: PATH SVG - retireve coordinates !

2004-05-18 Thread Andres Toussaint
Hi, You need to read the GVT (Graphics vector tree). The GVT holds the Java Graphics2D info of your SVG, so you can retrieve the coordinates in pairs, as you desire. To do so, you need to walk the GVT tree and extracting the data of the desired types. Here is an excerpt on how to walk the GVT

Re: svg to multipage tiff

2004-05-26 Thread Andres Toussaint
Hi: The way i did it is, i created a class called: public class TiledPrintTranscoder extends SVGAbstractTranscoder implements Printable { ... } And on the printable implementation, i call the Print method, in which i did a series of AffineTransforms similar to those you would do to have a

Re: Problem with JSVGComponent.setSize i have had same problem....

2004-05-26 Thread Andres Toussaint
Hi, You should use definitely the JSVGScrollPane provided by Batik instead of a ordinary Swing ScrollPane, in order to acurately display in the scroll bars the extent of your document, specially since Batik does allow you to zoom in or out, you need to translate that zoom level

SVGImageElement bug - memory leak

2004-05-26 Thread Andres Toussaint
Hello all: I want to report what appears to be a bug in the SVGImageElementBridge implementation. I have tried it with Batik release 1.5 and 1.5.1. In a dynamic JSVGCanvas, on the UpdateManager thread, when i remove a SVGOMImageElement (that represents an embedded SVG image, i.e.

Re: PrintTranscoder.KEY_AOI problem posible bug

2004-06-16 Thread Andres Toussaint
Hi: I found out that the AOI key is not implemented in the PrintTranscoder properly. I made a solution, called TiledPrintTranscoder, which is descried in more detail in the thread (Batik users) named: x-tad-biggersvg to multipage tiff Andres. /x-tad-bigger On Jun 16, 2004, at 5:24 AM, Bartosz

Re: SVGImageElement bug - memory leak

2004-06-23 Thread Andres Toussaint
Hi: Greetings to all the Batik Community. I wanted to point out this Bug again, for it to be salvaged from oblivion. Regards, Andres Hello all: I want to report what appears to be a bug in the SVGImageElementBridge implementation. I have tried it with Batik release 1.5 and 1.5.1. In a dynamic

Re: SVG into Java Image

2004-06-23 Thread Andres Toussaint
Hi: My suggestion is to read the Java Graphics 2D information you need from the GVT tree. Once you load a SVGDocument into a JSCGComponent (you do not need a canvas to access the GVT), you can access the GVT by adding a GVTTreeBuilderListener to your SVGComponent, in the gvtBuildCompleted

Re: SVGImageElement bug - memory leak

2004-06-23 Thread Andres Toussaint
Hi Thomas: Here is a sample application i made to analyze this situation, i do hope it is useful. // Start of SVGLeakTest.java // // SVGLeakTest.java // Created By: Andres Toussaint // Date: June 23, 2004 // Version 1.0

Re: JSVGCanvas displayed gvt components, editing and then saving.

2004-07-07 Thread Andres Toussaint
Hi: What type of changes are you doing in the GVT component? Why not do the changes to the objects in the DOM and catch the UpdateManager to be sure the modifications are ready before saving. I have to assume that you are doing Java2D modifications, beacuse if not, then i do not see the reason

mouseClick behavior with translate attribute

2004-09-23 Thread Andres Toussaint
how do you recover the actual visual coordinates of a rotated item in the canvas? When you click on the item, it gives you the coordinates as if the object was not translated, i imagine to keep the hotspot active, regardless of the transformation. I need to get the actual translated (rotated)

access DOM of image

2004-09-29 Thread Andres Toussaint
How can i access the SVG Dom of a placed SVG as an image element? Example: svg contentScriptType=text/ecmascript width=3314 xmlns:xlink=http://www.w3.org/1999/xlink zoomAndPan=magnify contentStyleType=text/css viewBox=0 0 3314 1574 height=1574 preserveAspectRatio=xMidYMid meet

Re: SVG to DXF

2004-10-28 Thread Andres Toussaint
of a SVG and feeding it into the DXF converter. But basically it is a G2D to DXF, so it can be used for other applications, not only for SVG to DXF. If anybody is interested, i can detail how I am recuperating the GVT Tree from my SVG, and how to parse it into DXF. Andres Toussaint One Mile Up, Inc

Re: dom of embed svg image

2004-11-08 Thread Andres Toussaint
Hi Thomas: This is exactly what i did. I subclassed SVGImageElementBridge to get the SVG Document instead of a GVT Tree, if the image element is SVG content. Since I assumed that the SVGImageElementBridge objects are volatile (could not figure out how to retrieve them once the GVT is built), i

SMIL and Batik

2004-12-22 Thread Andres Toussaint
Do we have any news on a future implementation of SMIL in Batik? It would be a great feature if implemented. Andres. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: SVG to DXF

2005-01-04 Thread Andres Toussaint
Hi: We have developed, together with CadSoft tools (http://www.cadsofttools.com/) a G2D to DXF exporter that works fine with SVG to DXF (via SVG to G2D to DXF). When your SVG is rendered in a SVGComponent, a GVTTree is built. That is, the SVG is converted into G2D objects, to be drawn into the

Insert SVG fragment

2005-01-11 Thread Andres Toussaint
I have a SVGDocument to which i want to append a SVG element. The SVG element is retrieved from a DB as SVG fragment in plain text (from a MySQL TEXT field), something like this: g id=toolbar style=fill-rule:nonzero;clip-rule:nonzero;fill:#FFE95F;stroke:#00;

Re: Batik and JSP

2005-01-24 Thread Andres Toussaint
I am doing something similar. I have a WebObjects application in my server, that uses Batik to build a properly built and encoded SVG file from information stored in a DB (including JavaScripts) and it is then served to the client, that in my case are both a Java Client App running a Batik

Re: Opening an SVG image to a certain scale

2005-01-24 Thread Andres Toussaint
Is each of your SVG tiles a separate JSVGCanvas? Or are you loading your SVG Tiles as image> elements? What is your output? A Java Swing window, a raster image, a web page? On Jan 24, 2005, at 2:55 PM, Caron, Michael R wrote: Hi all, I'd like to open an SVG file to certain dimensions.

Re: Opening an SVG image to a certain scale

2005-01-25 Thread Andres Toussaint
vas     svgThumbnail.setPreferredSize(new Dimension(ICON_HEIGHT, ICON_WIDTH));     borderedPanel.add(svgThumbnail);         // add the SVG     add(borderedPanel, BorderLayout.CENTER);         // add the status line     add(status, BorderLayout.SOUTH);       } //...   Mike From: And

Re: Obtaining glyph bounding box

2005-02-01 Thread Andres Toussaint
In order to get an instance of the GVT Tree, you need to assign a listener to a JSVGComponent, that will notify you when the GVT Tree is built. At this stage, you can walk the tree until you find the Component you are looking for. As an example, look at the following code: svg = new

Re: dynamic change of display rendering

2005-02-03 Thread Andres Toussaint
Hi, If you know with certainty the order of the definitions, you may use the following suggestion: Instead of putting the diplay in def> elements, put them in svg> elements. By doing this, you have a unique placeholder for each in the GVT (a CanvasGraphicsNode is created for each embedded SVG

Register Listeners before adding Document to Canvas

2005-02-07 Thread Andres Toussaint
I want to know if there is any problem in adding my EventListeners to specific Nodes before setting the document in the canvas. I am building a SVGDocument programatically and then adding it to a JSVGCanvas with svgCanvas.setDocument(). And i would like to initialize my listeners during the

Re: Add IMAGE from BufferedImage into a loaded SVG Document

2005-02-14 Thread Andres Toussaint
Thomas, thanks, this is a great simple approach. I will give it a try. Just for the record, the approach solution indicated in the initial question does work also, but of course it is not as simple. Andres. On Feb 14, 2005, at 10:59 AM, Thomas DeWeese wrote: Andres Toussaint wrote: My Main

Re: drawing SVG on a Canvas

2005-02-15 Thread Andres Toussaint
Hi Tim, Yes. you can parse XML and fetch either the BufferedImage, or the array of Graphics2D objects that represent the SVG. Basically, you need to create a JSVGComponent (you do not need a JSVGCanvas since you are displaying in a AWT) and add the build and render listeners, so you are notified

Re: How to apply more than 1 tranform to a SVGDocument

2005-02-16 Thread Andres Toussaint
Hi, My own personal way of doing this would be to leave the drawing-rendering to Batik, and retrieve the BufferedImage it produces. To do so, you need a JSVGComponent (no need to add it into any container) to which you add a GVTRenderingListener and a UpdateListener. (see thread from feb.2005

Re: Example of using an overlay

2005-02-22 Thread Andres Toussaint
Hi: Please define what do you mean by overlay. Is it a Swing paint() layer on top of your SVG JSVGCanvas? Or is it another element of SVG on top of the first element? For the dimensions of your SVG, the representation you see on screen is a conversion of the units you indicate in your SVG Doc

Re: Example of using an overlay

2005-02-22 Thread Andres Toussaint
Riis wrote: Andres Toussaint wrote: Hi: Please define what do you mean by overlay. Is it a Swing paint() layer on top of your SVG JSVGCanvas? Or is it another element of SVG on top of the first element? I mean a Swing paint() layer

batik-users Archive is not up to date

2005-02-25 Thread Andres Toussaint
I have just noticed that the batik-users mail list Archive has stopped archiving as of Feb. 02, 2005, and also there is a VelocityServlet: Error processing the template when trying to access either the Jan 2005 of the View By Thread options. I thought it pertinent to alert the community of this

Re: Newbie: How to render an SVG into an image

2005-02-25 Thread Andres Toussaint
The best option is to render the image in a JSVGComponent, and once it is available, encode it as a PNG. The basic idea is to intercept the x-tad-biggergvtRenderingCompleted/x-tad-bigger event to recover the BufferedImage, and then encode this image to something your Cocoa App can handle, like a

Re: SVG Draw Tools?

2005-02-25 Thread Andres Toussaint
something out. Andres Toussaint Bob Carpenter wrote: I need to include some basic draw tools in our app - very much like Adobe's SVG Draw demo. In fact, theirs would work perfect for our needs, but I doubt they'd license it to us. I need draw tools for two types of clients: Web (like Adobe's

Re: Trying to draw my overlay

2005-02-28 Thread Andres Toussaint
Lasse: Could you detail what it is you want to do with the overlays. I can think of two uses for them: 1. Related to the SVG content. to draw Scale-unaware selection objects (such as a bounding box, a resize or reshape indicator, etc.) or elements that are not part of the drawing, such as

Re: Trying to draw my overlay

2005-02-28 Thread Andres Toussaint
position, etc. Right? How are the new positions will be calculated? By moving the indicators, or by modifing the Zoom-pan of the map? This is important to define the best approach. Andres. On Feb 28, 2005, at 10:38 AM, Lasse Riis wrote: Andres Toussaint wrote: Lasse: Could you detail what it is you

Re: Batik and FreeHep

2005-03-02 Thread Andres Toussaint
My problem is that freehep only use a standard Graphics2D-enabled component (i.e. JComponent) to be able to export. Batik, however, only outputs images to it's custom JSVGCanvas, which is not directly compatible with freehep. You can Load your SVG into a JSVGComponent, and once the GVTTree is

Re: Batik and FreeHep

2005-03-03 Thread Andres Toussaint
I am not sure you are providing your rootGraphicsNode with the proper Graphics object. public void paint(Graphics g) { this.g = (Graphics2D) g; } I don't think you need to override the paint() method in your class, public void gvtBuildCompleted(GVTTreeBuilderEvent e) { gvtTreeWalker =

Re: Nested SVG

2005-03-10 Thread Andres Toussaint
Chandra: Also, at what stage are you merging the files? Before loading them into a org.w3c.dom.Document? Or you already have your SVGDocument objects and want to insert one into the other? If your problem is the second, this post may help you:

Re: Import group nodes from other files

2005-03-10 Thread Andres Toussaint
x-tad-smallerUse Document2.importNode(GroupNodeFromSVG1, true), to clone the first document 'under' the new document. Then just append the result where you want it in the parent document. In regards to stylesheets, it is your responsibility to make sure that both documents share a compatible