[Oberon] SystemV - Simple Graph
Tomas Kral
thomas.kral at email.cz
Mon Mar 11 17:09:09 CET 2019
Hi,
I do this to clip `Rect' to `Frame', while it appears to do visual
things hopefully right, I am thinking if could coded better?
PROCEDURE Clip*(VAR x, y, w, h: INTEGER);
BEGIN
IF f # NIL THEN
IF x < f.X THEN w := w-f.X+x; x := f.X END ; IF y < f.Y THEN h := h-f.Y+y; y := f.Y END ;
IF x+w > f.X+f.W THEN w := f.X+f.W-x END ; IF y+h > f.Y+f.H THEN h := f.Y+f.H-y END
END
END Clip;
--
Tomas Kral <thomas.kral at email.cz>
More information about the Oberon
mailing list