Artifact free scrolling

R

Roedy Green

I have vastly improved the scrolling in the JDisplay app I use for
showing colourised listings. I hope to post the new version sometime
this weekend. It is undergoing a total rewrite.


The key is noticing that when you scroll, you paint method gets called
asking you to render only very narrow stripe about 4 pixels high of
what is newly coming on the screen. It bitblts the rest to scroll.

The key then for artifact-free fast scrolling is to render as little
as possible outside the requested clipregion.

I created a simple accelerator that noted where various things were
rendered and ever after it could rapidly find the stuff needed to
render a given band with a binary search to get the approximate place.

It makes quite a difference. The scrolling is now smooth as any
without any artifacts.

I used a cruder scheme before to linearly search for stuff to render
in the clip region. It worked ok for small documents but did not work
well for big ones.


--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top