25 Jan
2019
25 Jan
'19
3:08 p.m.
On Wed, 23 Jan 2019 20:37:42 +0100 Tomas Kral <thomas.kral@email.cz> wrote:
I could try evaluate rectangle intersections in a list, and redraw only overlapping frames
I do intersection check below, almost flicker free graphics, except when some frames overlap. (p.frame # o.frame) is a guard against itself. PROCEDURE Overlap*(o: Object): BOOLEAN; VAR p: Object; overlap: BOOLEAN; BEGIN p := first; overlap := FALSE; WHILE ~ overlap & (p # NIL) DO IF (p.frame # o.frame) & (o.x < p.x+p.w) & (o.x+o.w > p.x) & (o.y-o.h < p.y) & (o.y > p.y-p.h) THEN overlap := TRUE END ; p := p.next END ; RETURN overlap END Overlap; -- Tomas Kral <thomas.kral@email.cz>