Re: speeding up dynamic inserts

2004-11-19 Thread Urs Reupke
Did you find any substantial performance differences between these implementations? No - in fact, I had no choice, as the team I joined up with was already using dom4j, and having two separate DOM-packages wasn't worth the effort. I found dom4j was easier to use - then again, I could have been ab

Re: speeding up dynamic inserts

2004-11-19 Thread Urs Reupke
Jorg Heymans wrote: Actually how about JDOM? Can it be used with Batik? It can, as can dom4j. However, in both cases you have to either add the resulting w3c-DOM document to your SVGCanvas by setDocument(org.w3c.dom.Document) or (Thomas has suggested this to me for speed reasons, which you seem ve

Re: how to get position and size of a SVG group

2004-10-26 Thread Urs Reupke
Hi, I got a group ( ) by ID from a document and want to know the position and size of the group. With 'position' I mean the upper left corner of an imaginary rectangle arround all elements of the group. 'Size' should be the edge length of the rectangle... I've thought about this myself, recently,

Re: "Broken Image" in Image-Element

2004-10-26 Thread Urs Reupke
Hello Thomas, In a strange fashion, the problem is 'solved': As tried using the facilities provided by batik for loading the document instead of using dom4j, and thus switched the parameter given for loading back to a URL - which I *thought* I had already tried before. The Result, however, didn't

Re: "Broken Image" in Image-Element

2004-10-25 Thread Urs Reupke
Hi Tonny, If by anycase you use jnlp/webstart thing, java ClassLoader have peculiar that you need to be aware of. The ClassLoader only can only get resources if in the same jar file, if it is in different jar. You need to create some empty anchor Java class to reference to the classloader to differ

Re: "Broken Image" in Image-Element

2004-10-25 Thread Urs Reupke
Hi Thomas, Instead of showing the default "image not found"-icon, the SVG-Canvas displays an image just the size I indicated in the referencing tag: Displays an image of what? Uh...shouldn't write mails that late :) It displays an "broken image" image. What makes me wonder is that the images se

"Broken Image" in Image-Element

2004-10-25 Thread Urs Reupke
Hi again, just when I thought I was done, bad stuff happened: After some major refactoring, the image-elements in my graphics aren't shown properly anymore, but the problem is different from the last time we met: Instead of showing the default "image not found"-icon, the SVG-Canvas displays an ima

Re: Setting Text Colors

2004-10-25 Thread Urs Reupke
Hi Thomas, Do the tspan element's have the fill attribute set? As far as I know, they haven't - the parent text element has no fill set (at first), and I don't set fill on them programatically. Also does this explain why the text 'disappeared'? Not to me, but I thought you could make more sense of

Re: Setting Text Colors

2004-10-24 Thread Urs Reupke
Something else just crosses my mind: Is there anything special I should consider with the text if it is divided into TSpanElements? After reading the Specification I thought, that fill-attributes are inherited to all children, but this wouldn't be the first exception from the rule made for a TextEl

Re: Setting Text Colors

2004-10-24 Thread Urs Reupke
Hi again, Thomas, My guess would be that the code that is setting the fill on the polygon is going overboard and setting the fill on the text as well. One other suggestion, set stroke to a third color (black or something) for the text. This will let you know if the problem is that the fill i

Re: Setting Text Colors

2004-10-24 Thread Urs Reupke
Hi Thomas, This code looks right to me. is there any chance that you are doing something silly like setting the text to the same color as the background? Chances were :), but I thought of this, too, and explicitly set the colors to be of pure red (255,0,0) for the background and pure green (0,2

Setting Text Colors

2004-10-23 Thread Urs Reupke
Hello, after good progress due to your last tips (thanks again), I have encountered another problem: Trying to set a text color, which I thought to be one of the easiest of tasks. I wrote this code: public void setTextColor(SVGGElement element, Color color) { NodeList list = element.getChildNod

Re: SetDocument vs. LoadSVGDocument

2004-10-07 Thread Urs Reupke
7;t think that I have to reconstruct the entire document by hand, so I have to be missing something - is there a way to import the complete document-structure of one document to another? Thanks again -Urs Urs Reupke wrote: up to now I used LoadSVGDocument(URL) to load files to display, and it was go

SetDocument vs. LoadSVGDocument

2004-10-07 Thread Urs Reupke
Hello, up to now I used LoadSVGDocument(URL) to load files to display, and it was good - but when today, for various reasons, I tried to convert the program to use SetDocument, things failed miserably: Using JDOM 1.0, I wrote a method to read the SVG-File as a JDOM Document, afterwards convert i

Re: Enable Antialiasing/"High Quality"

2004-09-19 Thread Urs Reupke
Hello Thomas, I am a little surprised to hear this. In general I think the two render similar quality. The one place where Adobe is significantly better is text (especially at small point sizes). Can you be more specific about what you thing needs improvement? Text is the main issue, but o

Enable Antialiasing/"High Quality"

2004-09-19 Thread Urs Reupke
Hello, I noticed that there's quite a difference between SVGs rendered by Batik and by Adobes SVGViewer when it comes to output quality. Is there some property to enable Antialiasing or as Adobe calls it "Higher Quality" rendering? I found the class SVGRenderingHints, but I'm clueless on how to us

Re: Rectangle links to other SVG-Document/Webpage

2004-09-12 Thread Urs Reupke
Hey Gunter, now i would like to add a link to another html or svg document to the rectangle. if the user clicks on the rectangle, the other document should appear. You can easily achive the desired effect by adding an EventListener to your rectangle. Simply add something like ... //your code Node r

Re: SVGContext is null

2004-09-09 Thread Urs Reupke
Thank you Thomas, No, but if you are loading a 'static' SVG document (no script tags or event attributes) then you need to tell Batik that you still want access to the SVGDOM (which is provided by the context objects). This can be done in the canvas with setDocumentState(ALWAYS_DYNAMIC), or if y

SVGContext is null

2004-09-08 Thread Urs Reupke
Hi, yesterday I hit upon a problem when trying to get the computed text length by calling SVGOMTextElement.getComputedTextLength() - a NullPointerException occured, which, as close scrutiny revealed, had it's origin in the missing SVGContext of the element. Now, I am somewhat at a loss - I thought