Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #RequireAdmin
- #include <GUIConstants.au3>
- #include <WindowsConstants.au3>
- #include <WinAPI.au3>
- #include <GDIPlus.au3>
- #include <GUICtrlOnHover.au3>
- #include <AutoitObject.au3>
- #include <Color.au3>
- #include <Array.au3>
- HotKeySet("{ESC}","E")
- Func E()
- Exit
- EndFunc
- Run("notepad.exe")
- WinWait("Untitled - Notepad")
- _GDIPlus_Startup()
- $hwnd = WinGetHandle("Untitled - Notepad")
- ;~ $hwnd = WinGetHandle("")
- Local $hBitmap = _GDIPlus_BitmapCreateFromScan0(600, 600)
- $g_hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
- _GDIPlus_BitmapDispose($hBitmap)
- $g_hDC = _WinAPI_GetDC($hwnd)
- $g_hDC_Backbuffer = _WinAPI_CreateCompatibleDC($g_hDC)
- $g_oDC_Obj = _WinAPI_SelectObject($g_hDC_Backbuffer, $g_hHBITMAP)
- $g_hGfxCtxt = _GDIPlus_GraphicsCreateFromHDC($g_hDC_Backbuffer)
- _GDIPlus_GraphicsSetSmoothingMode($g_hGfxCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY)
- _GDIPlus_GraphicsSetPixelOffsetMode($g_hGfxCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)
- $g_hPen = _GDIPlus_PenCreate(0xff00ff00, 8)
- Local Const $fDeg = ACos(-1) / 180, $iRadius = 300, $iWidth = 600 / 2, $iHeight = 600 / 2
- Local $fAngle = 0
- While 1
- ;~ _WinAPI_RedrawWindow($hwnd, 0, 0, $RDW_INVALIDATE + $RDW_FRAME + $RDW_ALLCHILDREN) ; =====> reset cua so, khong can doi voi cua so game
- ; ============== draw
- _GDIPlus_GraphicsClear($g_hGfxCtxt, 0xff010101)
- _GDIPlus_GraphicsDrawLine($g_hGfxCtxt, 10, 10, 100, 100)
- _GDIPlus_GraphicsDrawEllipse($g_hGfxCtxt, $iWidth - $iRadius / 2 + $iRadius / 18, $iHeight - $iRadius / 2 + $iRadius / 18, $iRadius - $iRadius / 9, $iRadius - $iRadius / 9, $g_hPen) ;draw ellipse
- _GDIPlus_GraphicsDrawLine($g_hGfxCtxt, $iWidth + Cos($fAngle * $fDeg) * $iRadius, $iHeight + Sin($fAngle * $fDeg) * $iRadius, _ ;draw line
- $iWidth + Cos($fAngle * $fDeg + 180) * $iRadius, $iHeight + Sin($fAngle * $fDeg + 180) * $iRadius, $g_hPen)
- $fAngle += 0.1
- ;============================
- _winapi_TransparentBlt($g_hDC, 0, 0, 600, 600, $g_hDC_Backbuffer, 0, 0, 600, 600, 0x010101)
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement