#include <GUIConstants.au3>
#include <GDE.au3>

$hGUI = GUICreate("Buntes Zeug", 400, 400)
$Time = TimerInit()
$hGraphics = _GDE_Create($hGUI)
_GDE_Line($hGraphics, 10, 10, 200, 200, 0x00ff0000, 5)
_GDE_Line($hGraphics, 5, 360, 395, 390, 0x00ff0000, 2)
_GDE_Rect($hGraphics, 255, 255, 60, 73, 0, 2, 0)
_GDE_Ellipse($hGraphics, 2, 200, 150, 20, 0x00ff0f, 1, 0x00ff0000)
_GDE_Pie($hGraphics, 300, 130, 50, 10, 307, 0, 2, 0x00ff)
_GDE_Pie($hGraphics, 310, 133, 50, -44, 54, 0, 2, 0x00ff0000)
_GDE_Point($hGraphics, 40, 350, 0, 2, 0)
_GDE_Pixel($hGraphics, 300, 300, 0)
_GDE_Bezier($hGraphics, 5, 270, 150, 364, 25, 100, 200, 250, 0, 4) 
_GDE_Triangle($hGraphics, 5, 105, 200, 390, 395, 5, 0, 2)
_GDE_CustomRect($hGraphics, 128, 108, 300, 100, 100, 300, 300, 300, 0, 5)
$Diff = TimerDiff($Time)
GUICtrlCreateLabel("Drawn in "&$Diff&" ms.", 0, 387)
GUISetState()
Do 
Until GUIGetMsg() = $GUI_EVENT_CLOSE
_GDE_Dispose($hGraphics)

Func _GDE_CustomRect($hGraphics, $x1, $y1, $x2, $y2, $x3, $y3, $x4, $y4, $Color, $Size = 1)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_PENSIZE, $Size)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_COLOR, $Color)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_MOVE, $x1, $y1)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_LINE, $x2, $y2)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_MOVE, $x2, $y2)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_LINE, $x3, $y3)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_MOVE, $x3, $y3)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_LINE, $x4, $y4)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_MOVE, $x4, $y4)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_LINE, $x1, $y1)
	GUICtrlSetGraphic($hGraphics, $GUI_GR_CLOSE)
EndFunc