xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Armstrong" <armstr...@intalio.com>
Subject RE: pixels vs. pt in JSVGComponent
Date Wed, 11 Jul 2001 22:16:29 GMT
> To handle units you have the UnitProcessor class in the bridge package.
> This class provides methods used everywhere in the bridge (see
> SVGSVGElementBridge...) such as float svgLengthToUserSpace(...).
>
> If you just want to size of the document, you can ask to the
> bridge context
> to give that size in pixels with bridgeContext.getDocumentSize() method.

Yes, this does.  However, since I need to determine the size of the document
when I construct my subclass of JSVGComponent, when I call the
JSVGComponent's getSVGDocumentSize() method, it calls the getDocumentSize()
method of its bridgeContext, but this method returns null since (as its
JavaDoc says) the document has not been built yet.

So now I'm stuck figuring out how to wait() until the document has been
built, unless there's some method I can call which will do this for me and
block until the document has been built.

So what do I do?  Do I make a class which implements
SVGDocumentLoaderListener, add it to the LinkedList of listeners, and have
my real work done in its documentLoadingCompleted(SVGDocumentLoaderEvent e)
method, or is there a better way?  (Actually, I'm not even sure if what I
just said would work--it's just the first thought that I had about how to
try to do it...)

Thanks again,
Peter


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


Mime
View raw message