[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-users
Subject:    Re: The Rendering problem
From:       "Caesar Ralf (Fenrir) Franz Hoppen" <darkfenrirsoul () gmail ! com>
Date:       2008-08-27 12:59:47
Message-ID: 1c7fac60808270559p2134857chd58652be1748a6b4 () mail ! gmail ! com
[Download RAW message or body]

Yes, I am doing this now, although the frame now is going to resize always
when the user loads a svg, but that can be fixed.

Thanks anyway, Caesar Ralf.

2008/8/27 <thomas.deweese@kodak.com>

>
> Hi Caesar,
>
> "Caesar Ralf (Fenrir) Franz Hoppen" <darkfenrirsoul@gmail.com> wrote on
> 08/26/2008 11:25:27 AM:
>
> > I got a solution, but it was kind of strange. I compiled everything
> > to a jar and executed it using java -Xms500 -Xmx800 myjar.jar and it
> > started to work as it should, rendering everything without problems.
>
>    So I believe the bug is still present, but since it's a race
> condition between building the document and swing putting the
> canvas into the frame you have simply shifted the likelihood of
> swing winning the race.  I strong suggest that you call pack on
> the frame once you are done building it.
>
>
> > 2008/8/26 <thomas.deweese@kodak.com>
> >
> > Hi Caesar,
> >
> > "Caesar Ralf (Fenrir) Franz Hoppen" <darkfenrirsoul@gmail.com> wrote
> > on 08/22/2008 08:37:39 AM:
> >
> >
> > > I have an application that dynammicaly loads SVGs to canvas, put
> > > them in JSVGScrollpane and then in a JTabbedPane. The problem is
> > > that it simply doesnt renders in some computers, what's really
> > > strange. Already checked the application, java and batik version an
> > > they are all the same in all computers. The documents are there, but
> > > they are simply not being rendered, while in my computer and my
> > > tutors computer, for example, it renders.
> >
> > > JSVGCanvas canvas = data.getCanvas();
> > > JSVGScrollPane svgView = new JSVGScrollPane(canvas);
> > >  //adds to the tabbed pane
> > > tabbedPane.add(data.getName(),svgView);
> > >
> > > The creation of the JSVGCanvas code, this code is inside a thread
> > > that creates the element, but they are added to the JSVGScrollPane
> > > in the EDT Thread :
> >
> > > JSVGCanvas canvas = new JSVGCanvas();
> > >           canvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);
> > >           canvas.setURI(data.getSvgURI());
> > >
> > >           canvas.setEnableImageZoomInteractor(false);
> > >           canvas.setEnableZoomInteractor(false);
>
> >   If you load the document before the canvas is in a window
> > it will size it's self to 1x1.  IIRC you can get it to resize
> > it's self by calling pack on the Frame that you put things
> > into.  You could also try not loading the document until you
> > have added the canvas to the frame that it will be in.
> >
> >
> >
> > --
> > What said Odin to the Gods and to the Champions who surrounded him?
> > "We will give our lives and let our world be destroyed, but we will
> > battle so that these evil powers will not live after us." Out of
> > Hel's ship sprang Fenrir the Wolf. His mouth gaped; his lower jaw
> > hung against the earth, and his upper jaw scraped the sky. Against
> > the Wolf Odin All-Father fought...
> >
> > ...By Fenrir the Wolf Odin was slain.
>



-- 
What said Odin to the Gods and to the Champions who surrounded him? "We will
give our lives and let our world be destroyed, but we will battle so that
these evil powers will not live after us." Out of Hel's ship sprang Fenrir
the Wolf. His mouth gaped; his lower jaw hung against the earth, and his
upper jaw scraped the sky. Against the Wolf Odin All-Father fought...

...By Fenrir the Wolf Odin was slain.

[Attachment #3 (text/html)]

<div dir="ltr">Yes, I am doing this now, although the frame now is going to resize \
always when the user loads a svg, but that can be fixed.<br><br>Thanks anyway, Caesar \
Ralf.<br><br><div class="gmail_quote">2008/8/27  <span dir="ltr">&lt;<a \
href="mailto:thomas.deweese@kodak.com">thomas.deweese@kodak.com</a>&gt;</span><br> \
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br><font size="2" \
face="sans-serif">Hi Caesar,<br> </font>
<br><font size="2"><tt>&quot;Caesar Ralf (Fenrir) Franz Hoppen&quot; &lt;<a \
href="mailto:darkfenrirsoul@gmail.com" \
target="_blank">darkfenrirsoul@gmail.com</a>&gt; wrote on 08/26/2008 11:25:27 AM:<div \
class="Ih2E3d"><br> <br>
&gt; I got a solution, but it was kind of strange. I compiled everything
<br>
&gt; to a jar and executed it using java -Xms500 -Xmx800 myjar.jar and
it<br>
&gt; started to work as it should, rendering everything without problems.
<br>
</div></tt></font>
<br><font size="2"><tt>&nbsp; &nbsp;So I believe the bug is still present,
but since it&#39;s a race</tt></font>
<br><font size="2"><tt>condition between building the document and swing
putting the</tt></font>
<br><font size="2"><tt>canvas into the frame you have simply shifted the
likelihood of</tt></font>
<br><font size="2"><tt>swing winning the race. &nbsp;I strong suggest that
you call pack on</tt></font>
<br><font size="2"><tt>the frame once you are done building it.</tt></font>
<br><div><div></div><div class="Wj3C7c">
<br>
<br><font size="2"><tt>&gt; 2008/8/26 &lt;<a href="mailto:thomas.deweese@kodak.com" \
target="_blank">thomas.deweese@kodak.com</a>&gt;</tt></font> <br><font \
size="2"><tt>&gt; <br> &gt; Hi Caesar, <br>
&gt; <br>
&gt; &quot;Caesar Ralf (Fenrir) Franz Hoppen&quot; &lt;<a \
href="mailto:darkfenrirsoul@gmail.com" \
target="_blank">darkfenrirsoul@gmail.com</a>&gt; wrote<br>
&gt; on 08/22/2008 08:37:39 AM:</tt></font>
<br><font size="2"><tt>&gt; <br>
&gt; <br>
&gt; &gt; I have an application that dynammicaly loads SVGs to canvas,
put <br>
&gt; &gt; them in JSVGScrollpane and then in a JTabbedPane. The problem
is <br>
&gt; &gt; that it simply doesnt renders in some computers, what&#39;s really
<br>
&gt; &gt; strange. Already checked the application, java and batik version
an <br>
&gt; &gt; they are all the same in all computers. The documents are there,
but<br>
&gt; &gt; they are simply not being rendered, while in my computer and
my <br>
&gt; &gt; tutors computer, for example, it renders. </tt></font>
<br><font size="2"><tt>&gt; <br>
&gt; &gt; JSVGCanvas canvas = data.getCanvas(); &nbsp; <br>
&gt; &gt; JSVGScrollPane svgView = new JSVGScrollPane(canvas); <br>
&gt; &gt; &nbsp;//adds to the tabbed pane <br>
&gt; &gt; tabbedPane.add(data.getName(),svgView); <br>
&gt; &gt; <br>
&gt; &gt; The creation of the JSVGCanvas code, this code is inside a thread
<br>
&gt; &gt; that creates the element, but they are added to the JSVGScrollPane<br>
&gt; &gt; in the EDT Thread :<br>
&gt; <br>
&gt; &gt; JSVGCanvas canvas = new JSVGCanvas(); </tt></font>
<br><font size="2"><tt>&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
canvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);<br> &gt; &gt; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; canvas.setURI(data.getSvgURI()); &nbsp; &nbsp;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
canvas.setEnableImageZoomInteractor(false);<br> &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; canvas.setEnableZoomInteractor(false);<br> </tt></font>
<br><font size="2"><tt>&gt; &nbsp; If you load the document before the canvas
is in a window <br>
&gt; it will size it&#39;s self to 1x1. &nbsp;IIRC you can get it to resize
<br>
&gt; it&#39;s self by calling pack on the Frame that you put things <br>
&gt; into. &nbsp;You could also try not loading the document until you
<br>
&gt; have added the canvas to the frame that it will be in. </tt></font>
<br><font size="2"><tt>&gt; <br>
&gt; <br>
&gt; <br>
&gt; -- <br>
&gt; What said Odin to the Gods and to the Champions who surrounded him?
<br>
&gt; &quot;We will give our lives and let our world be destroyed, but we
will <br>
&gt; battle so that these evil powers will not live after us.&quot; Out
of <br>
&gt; Hel&#39;s ship sprang Fenrir the Wolf. His mouth gaped; his lower jaw
<br>
&gt; hung against the earth, and his upper jaw scraped the sky. Against
<br>
&gt; the Wolf Odin All-Father fought...<br>
&gt; <br>
&gt; ...By Fenrir the Wolf Odin was \
slain.</tt></font></div></div></blockquote></div><br><br clear="all"><br>-- <br>What \
said Odin to the Gods and to the Champions who surrounded him? &quot;We will give our \
lives and let our world be destroyed, but we will battle so that these evil powers \
will not live after us.&quot; Out of Hel&#39;s ship sprang Fenrir the Wolf. His mouth \
gaped; his lower jaw hung against the earth, and his upper jaw scraped the sky. \
Against the Wolf Odin All-Father fought...<br> <br>...By Fenrir the Wolf Odin was \
slain.<br> </div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic