kytschBASIC

Put down that phone!
Please view me on real computer.

LINE
X1, Y1, X2, Y2, ID (optional)

The ability to draw a line on a bitmap and display it on screen as an image.

Example

SCREEN

	RGB 0, 0, 0

	BITMAP 0, 0, 640, 480

		RGB 255, 0, 0

		REM Noticing I'm using a variable here as they are supported by the args.

		DEF x% = 200

		LINE x%, 220, 300, 320

		LINE 300, 120, 200, 220

		LINE 300, 120, 400, 220

		LINE 400, 220, 300, 320



		RGB 255, 0, 0, 40

		LINE 260, 220, 330, 290

		LINE 260, 220, 330, 150



		RGB 255, 0, 0, 60

		LINE 290, 220, 345, 275

		LINE 290, 220, 345, 165



		RGB 255, 0, 0, 80

		LINE 320, 220, 360, 260

		LINE 320, 220, 360, 180



		RGB 255, 0, 0, 90

		LINE 350, 220, 375, 245

		LINE 350, 220, 375, 195



		RGB 255, 0, 0, 95

		LINE 380, 220, 390, 230

		LINE 380, 220, 390, 210

	END BITMAP

END SCREEN

Output

Parameters

Parameter Optional Type Description
X1 No integer or variable X1 or the start X position
Y1 No integer or variable Y1 or the start Y position
X2 No integer or variable X2 or the end X position
Y2 No integer or variable Y2 or the end Y position

See also