screenge.def
来自「Welcome to PMOS. PMOS is a set of module」· DEF 代码 · 共 35 行
DEF
35 行
DEFINITION MODULE ScreenGeometry;
(********************************************************)
(* *)
(* Support module for screen graphics *)
(* *)
(* Programmer: P. Moylan *)
(* Last edited: 1 December 1991 *)
(* Status: OK *)
(* *)
(********************************************************)
TYPE
Point = RECORD
x, y: INTEGER;
END (*RECORD*);
Rectangle = RECORD
top, bottom, left, right: INTEGER;
END (*RECORD*);
(************************************************************************)
PROCEDURE Inside (x, y: INTEGER; R: Rectangle): BOOLEAN;
(* Returns TRUE iff point (x,y) is in (or on the border of) R. *)
PROCEDURE TrimLine (VAR (*INOUT*) end1, end2: Point; R: Rectangle): BOOLEAN;
(* Modifies end1 and end2, if necessary, to cut off the ends of *)
(* the line from end1 to end2 which do not fit in R. *)
(* Returns FALSE if none of the line passes through the rectangle. *)
END ScreenGeometry.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?