Click here to Skip to main content
15,886,873 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Dirty rectangle woes Pin
honey the codewitch19-Feb-23 6:19
mvahoney the codewitch19-Feb-23 6:19 
GeneralRe: Dirty rectangle woes Pin
gggustafson19-Feb-23 7:41
mvagggustafson19-Feb-23 7:41 
GeneralRe: Dirty rectangle woes Pin
honey the codewitch19-Feb-23 10:21
mvahoney the codewitch19-Feb-23 10:21 
GeneralRe: Dirty rectangle woes Pin
Daniel Pfeffer19-Feb-23 6:31
professionalDaniel Pfeffer19-Feb-23 6:31 
GeneralRe: Dirty rectangle woes Pin
honey the codewitch19-Feb-23 11:50
mvahoney the codewitch19-Feb-23 11:50 
GeneralRe: Dirty rectangle woes Pin
Daniel Pfeffer19-Feb-23 18:50
professionalDaniel Pfeffer19-Feb-23 18:50 
GeneralRe: Dirty rectangle woes Pin
honey the codewitch19-Feb-23 22:19
mvahoney the codewitch19-Feb-23 22:19 
GeneralRe: Dirty rectangle woes Pin
Daniel Pfeffer20-Feb-23 3:05
professionalDaniel Pfeffer20-Feb-23 3:05 
OK, combine with dirty rectangles:
  1. Calculate a bounding box for all the "dirty rectangles".
  2. Position the viewport so that a maximal (or at least a non-zero) area of "dirty rectangles" is visible. Note that you may ignore anything outside the bounding box - it doesn't need redrawing.
  3. Redraw the visible parts of any dirty rectangles (i.e. those inside the viewport).
  4. Mark any fully visible "dirty rectangles" as "clean".
  5. Clip any partially-visible "dirty rectangles" to the exterior of the viewport (i.e. what remains is the part that is not visible in the viewport). Note that this may involve splitting a clipped "dirty rectangle" into a few subregions, each rectangular, e.g. if a rectangle overlaps more than one side of the viewport.
  6. If any "dirty rectangles" remain, go to step 1.
This will require controls in clipped "dirty rectangles" to be drawn more than once, but there is no way around this.

An algorithm for positioning the viewport is left for the alert reader. Smile | :) Note that this algorithm requires access only to the "dirty rectangle" list, so it should be quite fast.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.

GeneralRe: Dirty rectangle woes Pin
honey the codewitch20-Feb-23 3:58
mvahoney the codewitch20-Feb-23 3:58 
QuestionRe: Dirty rectangle woes Pin
megaadam19-Feb-23 22:22
professionalmegaadam19-Feb-23 22:22 
AnswerRe: Dirty rectangle woes Pin
honey the codewitch19-Feb-23 22:34
mvahoney the codewitch19-Feb-23 22:34 
GeneralRe: Dirty rectangle woes Pin
megaadam19-Feb-23 22:59
professionalmegaadam19-Feb-23 22:59 
GeneralRe: Dirty rectangle woes Pin
honey the codewitch19-Feb-23 23:19
mvahoney the codewitch19-Feb-23 23:19 
GeneralRe: Dirty rectangle woes Pin
BillWoodruff20-Feb-23 2:23
professionalBillWoodruff20-Feb-23 2:23 
GeneralRe: Dirty rectangle woes Pin
honey the codewitch20-Feb-23 4:03
mvahoney the codewitch20-Feb-23 4:03 
GeneralWordle 610 Pin
StarNamer@work18-Feb-23 13:50
professionalStarNamer@work18-Feb-23 13:50 
GeneralRe: Wordle 610 Pin
Sandeep Mewara18-Feb-23 18:10
mveSandeep Mewara18-Feb-23 18:10 
GeneralRe: Wordle 610 Pin
OriginalGriff18-Feb-23 20:10
mveOriginalGriff18-Feb-23 20:10 
GeneralRe: Wordle 610 - three for me Pin
pkfox18-Feb-23 21:44
professionalpkfox18-Feb-23 21:44 
GeneralRe: Wordle 610 Pin
Amarnath S18-Feb-23 23:45
professionalAmarnath S18-Feb-23 23:45 
GeneralRe: Wordle 610 Pin
Cp-Coder19-Feb-23 7:48
Cp-Coder19-Feb-23 7:48 
GeneralRe: Wordle 610 4/6 Pin
jmaida19-Feb-23 13:02
jmaida19-Feb-23 13:02 
Generalworldle 393 Pin
jmaida18-Feb-23 13:22
jmaida18-Feb-23 13:22 
Praisemoving from travis-ci to github actions = win Pin
honey the codewitch18-Feb-23 13:08
mvahoney the codewitch18-Feb-23 13:08 
QuestionRe: moving from travis-ci to github actions = win Pin
Eddy Vluggen18-Feb-23 13:17
professionalEddy Vluggen18-Feb-23 13:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.