Hi Jake,
> "Jake B" < [EMAIL PROTECTED]> wrote on 08/22/2007 11:20:50 PM:
>
> > 3. I'd like to leverage the Factory classes in
org.apache.batik.dom.svg
> On 8/24/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
>
> What Factory classes in batik.dom.svg?
"Jake B" <[EMAIL PROTECTED]> wrote on 08/25/2007 12:31:32 AM:
> These were the factory classes I was talking about:
> SVGDOMImplementation.AElementFactory
> SVGDOMImplementation.AltGlyphDefElementFactory
[...]
> I'm quite certain now that I was truly misunderstanding the purpose
> of these classes.
Yes, those are how we implement 'createElementNS' (extensibly)
so you are much better off using createElementNS.
> I understand now that the proper thing to do is to
> use the interfaces in org.w3c.dom.svg.
Yes.
> Right now I'm trying to figure out how bounding boxes work.
[...]
> Unfortunately, rectangle.getBBox() consistently evaluates to null.
[...]
> My question is, what do I need to do to make the getBBox method
> work?
You need to boot the SVG DOM:
http://wiki.apache.org/xmlgraphics-batik/BootSvgAndCssDom
There is some other good stuff on the Wiki as well. So you
might want to just skim it so you know what's there.
> If I need to render the document, is it possible to minimally
> do so in order to simple retrieve the Element's bounding box, or is
> it necessary to fully render the document in, for example,
> JSVGCanvas in order to make getBBox work?
Booting the CSS/SVG DOM builds the our graphics tree which we
can use for rendering, but no rendering needs to take place.
> Also, as a sidenote, I was looking up the javadoc information on the
> interfaces in org.w3c.dom.svg, and I discovered that the Batik
> javadocs link to several classes in org.w3c.dom.svg, but these links
> appear to be dead.
I don't know. The W3C publishes the interfaces as IDL and they
don't seem to publish java docs. We might be able to convince
xml-commons at Apache to generate and publish JavaDocs for the
external package.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]