9xc 9xGL and Windows - Owen2k6/GoOS GitHub Wiki

9xGL: Windows & Drawing

Requires:

import 9xGL

Create a window

Window Main = GetWindow >> "Title", 320, 200
  • Creates a GoOS Window, sets size, clears to light grey, renders a system border, shows it, and stores it in Window variables.

Draw a line

DrawLine >> Main, 10, 10, 310, 10, Red
  • Arguments: windowVar, x1, y1, x2, y2, colourVarOrName
  • Coordinates may be integer variables; colour can be a Color variable or a recognised colour token.

Draw text

String msg = "Hello"
DrawString >> Main, msg, 12, 24, Yellow
  • Clears a light‑grey strip under the text, then draws using the small bitmap font (Font_1x).

Move window

SetWindowPos >> Main, 40, 40
⚠️ **GitHub.com Fallback** ⚠️