Example: #include <GDIPlus.au3>
Global $hGUI = GUICreate("", 512, 512)
_GDIPlus_Startup()
$hTextureArrow = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\arrow.png")
$iW = _GDIPlus_ImageGetWidth($hTextureArrow)
$iH = _GDIPlus_ImageGetHeight($hTextureArrow)
$iW2 = $iW / 2
$iH2 = $iH / 2
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics(512, 512, $hGraphic)
$hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
$hBitmap_Background = _GDIPlus_ImageLoadFromFile("c:\Program Files (x86)\AutoIt3\Examples\GUI\logo4.gif")
$iW2_Bg = _GDIPlus_ImageGetWidth($hBitmap_Background) / 2
$iH2_Bg = _GDIPlus_ImageGetHeight($hBitmap_Background) / 2
$hBitmap_Arrow = _GDIPlus_BitmapCreateFromGraphics($iW, $iW, $hBackbuffer)
$hGCArrow = _GDIPlus_ImageGetGraphicsContext($hBitmap_Arrow)
$hMatrixArrow = _GDIPlus_MatrixCreate()
GUISetState()
While 1
Switch GUIGetMsg()
Case -3
_GDIPlus_MatrixDispose($hMatrixArrow)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_GraphicsDispose($hGCArrow)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_BitmapDispose($hBitmap_Arrow)
_GDIPlus_BitmapDispose($hTextureArrow)
_GDIPlus_ImageDispose($hBitmap_Background)
_GDIPlus_GraphicsDispose($hBackbuffer)
_GDIPlus_Shutdown()
Exit
EndSwitch
Rotate()
WEnd
Func Rotate()
_GDIPlus_GraphicsClear($hBackbuffer, 0xFF6495ED)
_GDIPlus_MatrixTranslate($hMatrixArrow, $iW2, $iW2) ; move it back to 0, 0 since (112 / 2) and (37 / 2) are it's middle origin point
_GDIPlus_MatrixRotate($hMatrixArrow, 1) ; rotate it around it's middle origin point
_GDIPlus_GraphicsSetTransform($hGCArrow, $hMatrixArrow)
_GDIPlus_MatrixTranslate($hMatrixArrow, -$iW2, -$iW2)
_GDIPlus_GraphicsClear($hGCArrow, 0x00000000)
_GDIPlus_GraphicsDrawImageRect($hGCArrow, $hTextureArrow, -$iW2, -$iH2, $iW, $iH) ; place the arrow at the center of it's GC
_GDIPlus_GraphicsDrawImage($hBackbuffer, $hBitmap_Background, (256 - $iW2_Bg), (256 - $iH2_Bg)) ; show the GC
_GDIPlus_GraphicsDrawImage($hBackbuffer, $hBitmap_Arrow, 256 - $iW2, 256 - $iW2) ; move it's GC by an offset so the image is at the correct XY using it's origin
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, 512, 512)
EndFunc
Br, UEZ