找回密码
 加入
搜索
楼主: afan

[原创] 印章图生成 1.9

[复制链接]
发表于 2019-9-22 23:58:42 | 显示全部楼层
太强大了,版主威武
发表于 2019-9-29 14:29:09 | 显示全部楼层
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[0], -$aBounds[1])
        _GDIPlus_MatrixScale($hMatrix, $iW_Txt / $aBounds[2], $iH_Txt / $aBounds[3], 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

但还是不能解决更新控件不重绘
发表于 2019-9-29 14:32:36 | 显示全部楼层
本帖最后由 chzj589 于 2019-9-29 19:10 编辑
chzj589 发表于 2019-9-29 14:29
这样是双缓冲???

但还是不能解决更新控件不重绘

A版,帮看看如何更新不重绘

 楼主| 发表于 2019-9-29 18:23:28 来自手机 | 显示全部楼层
chzj589 发表于 2019-9-29 14:32
A版,帮看看如何更新不重绘

代码太长  没时间帮…  
发提问交流区吧
发表于 2019-9-30 10:01:27 | 显示全部楼层
6666666666看看····
发表于 2019-10-18 23:12:45 | 显示全部楼层
好东西啊感谢分享
发表于 2019-11-3 18:30:06 | 显示全部楼层
感谢版主无私奉献
发表于 2019-11-13 16:52:34 | 显示全部楼层
学习一下,多谢。
发表于 2020-3-25 20:10:35 | 显示全部楼层
支持,下下来看下
发表于 2020-6-4 11:20:49 | 显示全部楼层
学习了,学习了,学习了学习了,学习了,学习了
发表于 2020-6-5 08:46:30 | 显示全部楼层
A版:_GDIPlus_PathAddLine五星如何原轴旋转
https://www.autoitx.com/thread-72032-1-1.html
请赐教!
发表于 2020-6-5 10:03:38 | 显示全部楼层
谢谢 版主怎么能这么强!!!
发表于 2020-9-8 22:45:03 | 显示全部楼层
在WIN10里不能打开?
 楼主| 发表于 2020-9-8 22:46:07 | 显示全部楼层
zpmc123 发表于 2020-9-8 22:45
在WIN10里不能打开?

有这事?   
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-29 18:10 , Processed in 0.069958 second(s), 15 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表