Artifact free scrolling

Discussion in 'Java' started by Roedy Green, Jul 13, 2005.

  1. Roedy Green

    Roedy Green Guest

    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
     
    Roedy Green, Jul 13, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Felix Dejavu
    Replies:
    0
    Views:
    321
    Felix Dejavu
    Nov 21, 2003
  2. Jerry Henderson
    Replies:
    0
    Views:
    812
    Jerry Henderson
    Sep 1, 2004
  3. george
    Replies:
    0
    Views:
    1,155
    george
    Aug 29, 2008
  4. Matthew
    Replies:
    0
    Views:
    113
    Matthew
    Dec 27, 2003
  5. Simeon Chaos
    Replies:
    5
    Views:
    153
    James Harris
    Jan 11, 2014
Loading...

Share This Page