[Oberon] SystemV - Simple Graph

Tomas Kral thomas.kral at email.cz
Wed Mar 6 13:33:10 CET 2019


On Wed, 6 Mar 2019 09:50:09 +0100
Dieter <d.gloetzel at web.de> wrote:

> System 3 and Module BasicFigures

Hi Dieter,

Thank you, looked at `BF' above, seems gadgets underlying module, that I
wish to skip for PO2013, as I do simplified Desk instead.

I do this, not perfect, no brushes, etc, on my test system, Display1 :=
Graph.

TODO SetClip(); SetFont(); as I do not wish to pass these as extra parameters.
Unsure of Splines and Polys.

DEFINITION Graph;

	VAR
		grey0, grey1, grey2: INTEGER;

	PROCEDURE Rect(col, pat, x, y, w, h, t, mode: INTEGER); (*pat = 0 outline, >0 pattern*)
	PROCEDURE Circle(col, pat, x0, y0, r, mode: INTEGER); (*pat = 0 outline, 1 fill, >1 pattern*)
	PROCEDURE Arc(col, x0, y0, r, mode: INTEGER); (*4 quadrants, +- x0/y0*)
	PROCEDURE Oval(col, x, y, w, h, mode: INTEGER); (*horizontal*)
	PROCEDURE Line(col, x, y, x0, y0, mode: INTEGER);
	PROCEDURE Ellipse(col, pat, x0, y0, a, b, mode: INTEGER); (*pat = 0 outline, 1 fill, >1 pattern*)
	PROCEDURE Fill(tgc, rpc, x, y: INTEGER); (*flood*)
	PROCEDURE DrawText(s: ARRAY OF CHAR; col, X, Y, mode: INTEGER);
	PROCEDURE DrawInt(n: INTEGER; col, X, Y, mode: INTEGER); (*positive 9999 max*)
	PROCEDURE GetColor(col: INTEGER; VAR r, g, b: INTEGER);
	PROCEDURE SetColor(col, r, g, b: INTEGER);
END Graph.

-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list