-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
i could solve the problem. i have no clue why, but sometimes (in the
cases where the svg was nmot redendered) my panel on which the
jsvgcanvas sits had width and height 0. the panel i embedded in a swt
composite. i assume there is a problem when initializing it. due to the
fact, that it had size 0, the renderer is not started. i fixed it by
making sure the size is not 0, if necessary i adapt it manually.
cheers,
marc
Marc Doerflinger wrote:
> hello folks!
>
> i have a problem rending my svgimages in batik. in 1 of maybe 20 cases
> (sometimes its a lot more, sometimes less), the image is not rendered. i
> put log output into the gvttreebuilder- and gvtimagerendererlisteners to
> see when those phases of the image rendering are reached. the
> treebuilding is done every time, the rendering sometimes does not happen
> (not even start). at least i assume it does not happen, since neither of
> the listener methods is called and no image is painted on the screen.
> this is the code i use to load the image
>
>
>
> _gvtTreeBuilderAdapter = new GVTTreeBuilderAdapter() {
> public void gvtBuildStarted(GVTTreeBuilderEvent e) {
> _logger.debug("Tree build started");
> }
> public void gvtBuildCompleted(GVTTreeBuilderEvent e) {
> _logger.debug("Tree build complete");
> }
> };
> _svgCanvas.addGVTTreeBuilderListener(_gvtTreeBuilderAdapter);
>
> _gvtTreeRendererAdapter = new GVTTreeRendererAdapter() {
> public void gvtRenderingPrepare(GVTTreeRendererEvent e) {
> _logger.debug("Image rendering started");
> }
> public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
> _logger.debug("Image rendering complete");
> // some more code in here which is not relevant to
> // the problem i think
> }
> };
> _svgCanvas.addGVTTreeRendererListener(_gvtTreeRendererAdapter);
>
>
> _svgCanvas.setDocument(_document);
> _svgCanvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);
>
>
>
>
> since i put a log statemenet above and below it i know its executed
> every time.
> the problem does not appear with the same images. it happens on
> different images, that sometimes draw and sometimes dont. therefore i
> dont thnik the image is buggy.
> does anyone have an idea why the rendering is not executed?
>
> thanks,
> marc
- ---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGg65O6mRZxtk0FrcRAouoAKCB4/0lUkS7X4Q0Dv/Zk59uub6TXgCdFeIQ
vtwqvT/mApCk8P74cyPiHiE=
=WWIh
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]