#include-once

Global Const $GR_DBUFFER = 34078728
Global Const $GR_TRANS = -2

Func bezier($hGraphics, $x, $y, $x1, $y1, $x2, $y2)
	GUICtrlSetGraphic($hGraphics, 4, $x, $y, $x1, $y1, $x2, $y2)
EndFunc

Func pixel($hGraphics, $x, $y)
	GUICtrlSetGraphic($hGraphics, 18, $x, $y)
EndFunc

Func rect($hGraphics, $x, $y, $w, $h)
	GUICtrlSetGraphic($hGraphics, 10, $x, $y, $w, $h)
EndFunc

Func linestep($hGraphics, $x, $y, $c=0)
	GUICtrlSetGraphic($hGraphics, 2, $x, $y)
EndFunc

Func move($hGraphics, $x, $y)
	GUICtrlSetGraphic($hGraphics, 6, $x, $y)
EndFunc

Func pensize($hGraphics, $s=1)
	GUICtrlSetGraphic($hGraphics, 24, $s)
EndFunc

Func pie($hGraphics, $x, $y, $r, $sa, $swa)
	GUICtrlSetGraphic($hGraphics, 14, $x, $y, $r, $sa, $swa)
EndFunc

Func pen($hGraphics, $l, $f=-2)
	GUICtrlSetGraphic($hGraphics, 8, $l, $f)
EndFunc

Func draw($hGraphics)
	GUICtrlSetGraphic($hGraphics, 22)
EndFunc

Func ellipse($hGraphics, $l, $t, $w, $h)
	GUICtrlSetGraphic($hGraphics, 12, $l, $t, $w, $h)
EndFunc

Func buffer($var)
	Return $var
EndFunc

Func clearbuffer($buf)
	GUIctrlDelete($buf)
EndFunc

Func color($c=0x808080)
	GUISetBkColor($c)
EndFunc

Func size($w, $h, $l=0, $t=0)
	Return GUICtrlCreateGraphic($l, $t, $w, $h)
EndFunc

Func quit()
	Exit
EndFunc