Re: Rendering performance while dragging
From: sh_java_int (shivchow2_at_yahoo.com)
Date: 08/27/04
- Next message: ak: "Re: Rendering performance while dragging"
- Previous message: Cid: "Re: Detecting JSplitPane Divider Movement?"
- In reply to: sh_java_int: "Rendering performance while dragging"
- Next in thread: ak: "Re: Rendering performance while dragging"
- Reply: ak: "Re: Rendering performance while dragging"
- Reply: Larry Barowski: "Re: Rendering performance while dragging"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Aug 2004 13:15:15 -0700
Thanks very much for your suggestions.
To complete the picture I just wanted to report on the effects of the
suggestions. There were two suggestions
1) While dragging, clip the Graphics object to the "damaged" area and
draw only the rectangles that intersect the damaged area.
Method 1 results in no perceptible improvement.
2) While dragging, draw everything except the dragged rectangle from a
stored Image object, and draw the dragged rectangle as usual.
Method 2 gives responsive dragging, with the caveat that there is a
longish hesitation period at the start of the drag. This is because
the background image is constructed at the start of the drag. Once the
background image has been constructed, dragging is fast and
responsive.
All in all, I think I'll go with method 2.
- Next message: ak: "Re: Rendering performance while dragging"
- Previous message: Cid: "Re: Detecting JSplitPane Divider Movement?"
- In reply to: sh_java_int: "Rendering performance while dragging"
- Next in thread: ak: "Re: Rendering performance while dragging"
- Reply: ak: "Re: Rendering performance while dragging"
- Reply: Larry Barowski: "Re: Rendering performance while dragging"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]