|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwt.util.DirtyList
A general-purpose data structure for holding a list of rectangular regions that need to be repainted, with intelligent coalescing. DirtyList will unify two regions A and B if the smallest rectangle enclosing both A and B occupies no more than epsilon + Area_A + Area_B. Failing this, if two corners of A fall within B, A will be shrunk to exclude the union of A and B.
Constructor Summary | |
DirtyList()
|
Method Summary | |
boolean |
dirty(int x,
int y,
int w,
int h)
Add a new rectangle to the dirty list; returns false if the region fell completely within an existing rectangle or set of rectangles (ie did not expand the dirty area) |
boolean |
empty()
Returns true if there are no regions that need repainting |
int[][] |
flush()
Atomically returns the list of dirty rectangles as an array of four-int arrays and clears the internal dirty-rectangle list. |
int |
num()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DirtyList()
Method Detail |
public int num()
public boolean dirty(int x, int y, int w, int h)
public boolean empty()
public int[][] flush()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |