本帖最后由 水木子 于 2019-1-4 15:56 编辑
_GDIPlus_ImageSaveToFile 肯定可以啊!
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
_GDIPlus_Startup()
Local Const $iWidth = 600, $iHeight = 600, $iBgColor = 0xFFEE88BB
$hGui = GUICreate('', $iWidth, $iHeight)
GUISetState()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
$hGraphics = _GDIPlus_BitmapCreateFromGraphics($iWidth, $iHeight, $hGraphic)
$hGfxCtxt = _GDIPlus_ImageGetGraphicsContext($hGraphics)
_GDIPlus_GraphicsSetSmoothingMode($hGfxCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY)
$hPen = _GDIPlus_PenCreate(0xFFABCDEF, 4)
$hBrush = _GDIPlus_BrushCreateSolid($iBgColor)
_GDIPlus_GraphicsFillRect($hGfxCtxt, 0, 0, $iWidth, $iHeight, $hBrush)
_GDIPlus_GraphicsDrawEllipse($hGfxCtxt, 10.5, 50.1, 580.25, 500.75, $hPen)
_GDIPlus_GraphicsDrawImage($hGraphic, $hGraphics, 0, 0)
_GDIPlus_ImageSaveToFile($hGraphics, @ScriptDir & '\1.bmp')
Do
Until GUIGetMsg() = -3
_GDIPlus_PenDispose($hPen)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_GraphicsDispose($hGfxCtxt)
_GDIPlus_BitmapDispose($hGraphics)
_GDIPlus_Shutdown()
|