#include <Misc.au3>
#include <Garfik.au3>

Opt('MustDeclareVars', 1)

Global $aMove[2], $hGarfik, $hTemp, $hMask, $hObject

$hGarfik = _Garfik_Startup(@DesktopWidth, @DesktopHeight, 25)

$hTemp = _GDIPlus_BitmapCreateFromFile(@ScriptDir & '\Back.png')
_Garfik_SetBackground($hGarfik, $hTemp)
_GDIPlus_BitmapDispose($hTemp)

$hTemp = _GDIPlus_BitmapCreateFromFile(@ScriptDir & '\Trans.png')
$hMask = _Garfik_MaskCreate($hTemp)
$hObject = _Garfik_ObjectCreateFromMask($hGarfik, $hMask, 0, 0, 60, 60)
_Garfik_MaskDelete($hMask)
_GDIPlus_BitmapDispose($hTemp)

$aMove[0] = 0
$aMove[1] = 0

While GUIGetMsg() <> -3
	_Garfik_Clear($hGarfik)
	If _IsPressed('25') Then
		$aMove[0] -= 10
	ElseIf _IsPressed('26') Then
		$aMove[1] -= 10
	ElseIf _IsPressed('27') Then
		$aMove[0] += 10
	ElseIf _IsPressed('28') Then
		$aMove[1] += 10
	EndIf
	_Garfik_DrawObject($hGarfik, $hObject, $aMove[0], $aMove[1])
	_Garfik_Update($hGarfik)
WEnd

_Garfik_ObjectDelete($hObject)
_Garfik_Shutdown($hGarfik)