RosettaCodeData/Task/Bitmap-Bresenhams-line-algo.../XPL0/bitmap-bresenhams-line-algo...

8 lines
366 B
Plaintext

include c:\cxpl\codes; \intrinsic 'code' declarations
[SetVid($112); \set 640x480 graphics in 24-bit color
Move(10, 20); \set start of line segment
Line(600, 400, $123456);\draw line segment, red=$12, green=$34, blue=$56
if ChIn(1) then []; \wait for keystroke while viewing graphic screen
SetVid(3); \restore normal text mode
]