太强大了,版主威武:face (23):
afan 发表于 2019-9-22 21:48
那就肯定不是这里的问题了。
你的问题还是绘图更新到控件的问题,因为你可能更新一次需要设置到控件3次 ...
这样是双缓冲???
#include <GDIPlus.au3>
_Example()
Func _Example()
$hGui = GUICreate('')
GUISetBkColor(0xfbfcfd)
GUISetState()
Local $iW_Txt = 220, $iH_Txt = 55
_GDIPlus_Startup()
Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
_GDIPlus_GraphicsSetSmoothingMode($hGraphic, $GDIP_SMOOTHINGMODE_HIGHQUALITY)
Local $hBrush = _GDIPlus_BrushCreateSolid(0xFFFF0000);DD2200)
_GDIPlus_GraphicsTranslateTransform($hGraphic, $iW_Txt/2.5, $iW_Txt/1.5)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics(400, 400, $hGraphic)
; 绘制存储器区域(缓冲区)
$hBackBu_Graphic = _GDIPlus_ImageGetGraphicsContext($hBitmap)
Local $hPath = _GDIPlus_PathCreate()
Local $hFamily = _GDIPlus_FontFamilyCreate("Arial");'宋体')
Local $tLayout = _GDIPlus_RectFCreate()
_GDIPlus_PathAddString($hPath,' 中国AU3论坛VIP认证章', $tLayout, $hFamily);'中中中中中'
Local $aBounds = _GDIPlus_PathGetWorldBounds($hPath)
Local $hMatrix = _GDIPlus_MatrixCreate()
_GDIPlus_MatrixTranslate($hMatrix, -$aBounds, -$aBounds)
_GDIPlus_MatrixScale($hMatrix, $iW_Txt / $aBounds, $iH_Txt / $aBounds, True)
_GDIPlus_PathTransform($hPath, $hMatrix)
; 在缓冲器绘制操作
_GDIPlus_GraphicsClear($hBackBu_Graphic, 0xFFFFFFFF)
_GDIPlus_GraphicsFillPath($hBackBu_Graphic, $hPath, $hBrush)
; 绘制屏幕
_GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0)
Do
Until GUIGetMsg() = -3
_GDIPlus_MatrixDispose($hMatrix)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_PathDispose($hPath)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_GraphicsDispose($hBackBu_Graphic)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
EndFunc ;==>_Example
但还是不能解决更新控件不重绘
本帖最后由 chzj589 于 2019-9-29 19:10 编辑
chzj589 发表于 2019-9-29 14:29
这样是双缓冲???
但还是不能解决更新控件不重绘
A版,帮看看如何更新不重绘
chzj589 发表于 2019-9-29 14:32
A版,帮看看如何更新不重绘
代码太长没时间帮…
发提问交流区吧
6666666666看看····
好东西啊感谢分享
感谢版主无私奉献
感谢分享:face (1):
学习一下,多谢。
支持,下下来看下
学习了,学习了,学习了学习了,学习了,学习了
A版:_GDIPlus_PathAddLine五星如何原轴旋转
https://www.autoitx.com/thread-72032-1-1.html
请赐教!
谢谢 版主怎么能这么强!!!
在WIN10里不能打开?
zpmc123 发表于 2020-9-8 22:45
在WIN10里不能打开?
有这事? {:face (396):}