xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "philip zuniga" <philip.zun...@gmail.com>
Subject Re: Canvas not updating properly
Date Fri, 02 Jun 2006 16:01:20 GMT
Sir,  I am trying to understand everything that you say so forgive for
asking a basic question.

1) What is the difference between setting the rendering transform and
setting the painting transform.

On 6/1/06, thomas.deweese@kodak.com <thomas.deweese@kodak.com> wrote:
> Hi Philip,
> "philip zuniga" <philip.zuniga@gmail.com> wrote on 06/01/2006 12:24:22 AM:
> > I am currently working on an SWT application that is embedded with a
> > canvas. I based my work on some source codes that were posted in this
> mailing
> > lists. In the application, the canvas is translated every time I move
> the
> > scroll. The translation is done via the rendering transform of the
> canvas
> > (just like the same way as JSVG Scrollpane works).
>    Actually the JSVGScrollpane updates the painting transform while you
> are scrolling and only updates the rendering transform when you finish
> the scroll operation.
> > The process seems to be logical. But when I run it and move the scroll,
> > there are some times (especially when I move the scroll quickly) when
> > the canvas does not update properly, and instead it just stays to its
> > current position. But, if I move the window of the application in a
> > place where the canvas is hidden and show it up again, then the canvas
> > would be updated. Or, if i place the window of another application over
> > the canvas,and remove it, then the canvas gets updated.
> >
> > do you know where the problem is?
>   It sounds like you are loosing one or more of the 'internally'
> generated
> repaint events from the Canvas.  When you update the rendering transform
> the rendering of the Canvas is actually done in a separate thread to
> avoid 'locking up' the main UI thread.  When the rendering is completed
> it notifies the canvas which grabs the updated image to display (which
> seems to be working fine since if you manually generate an 'update'
> event it redraws correctly).  It then triggers a repaint of the canvas
> this part seems to be the problem part.
>   This is made a bit more complex by the fact that triggering many
> redraws quickly usually causes the earlier redraws to be canceled.
> I'm fairly sure that this is working in an AWT/Swing only world.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

View raw message