Hi Maik,

[EMAIL PROTECTED] wrote:

can you give me a hint how I redraw only the affected area in Java? I was looking for 
something like "invalidateRect" but I didn't found it.

  You can call repaint(x,y,w,h) for your component.
  The area to repaint would be a union of the old
  selected rectangle and the new one.

  You can also limit the number of repaints by only
  issuing repaints if the dimensions of the area changed by
  certain number of pixels so that you don't have to
  respond to a flood of mouse moved events.

Currently I circumvent my problem by re-rendering the whole image. This works 
better but is far from the performance with d3d=false and XOR rendering.

  There shouldn't be that much of a difference really, if all you
  do is paint an image. If your re-painting operation is very
  expensive, you might want to cache it in an image (at least for
  the duration of the zoom selection) and do further updates by copying
  from that image. Many applications do this trick - they'd
  do an initial zoom by scaling an image first, and then repainting
  at higher resolution (with higher scale factor) later.

  Thanks,
    Dmitri

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to