找回密码
 加入
搜索
查看: 1562|回复: 2

[图形处理] 谁能帮我看下,中间的线怎么去掉。GDI+作图相关【已解决】

[复制链接]
发表于 2017-7-24 11:51:13 | 显示全部楼层 |阅读模式
本帖最后由 yamakawa 于 2017-7-24 15:49 编辑
#cs
网上弄的c代码,尝试转au3.。。技术不够。yamakawa
#ce

#include <GDIPlus.au3>
AutoItSetOption("GUIOnEventMode", 1)

_GDIPlus_Startup()
    Global Const $iBackColor = 0xFF000000 + 0x00FF00
    Global Const $hGUI = GUICreate("有缺陷的旋转太极图-谁能告诉我,特么的中间那条线怎么干掉",620,620)
        GUISetOnEvent(-3, "_Exit")
        Global Const $nCtrlId = GUICtrlCreatePic("", 50, 50, 520, 520)
    Global Const $hPicWnd = GUICtrlGetHandle($nCtrlId)
    Global Const $Brush_B = _GDIPlus_BrushCreateSolid(0XFFFFFFFF)
        Global Const $Brush_w = _GDIPlus_BrushCreateSolid(0xFF000000)
    GUISetState(@SW_SHOW)        
        
           Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hPicWnd) 
        Global $hBufImg = _GDIPlus_BitmapCreateFromScan0(500, 500)
    Global $hBufGraph = _GDIPlus_ImageGetGraphicsContext($hBufImg)
        _GDIPlus_GraphicsTranslateTransform($hBufGraph, 250,250)
        _GDIPlus_GraphicsSetSmoothingMode($hBufGraph, $GDIP_SMOOTHINGMODE_HIGHQUALITY) 

Global $iAngle = -3 
Do

  _GDIPlus_GraphicsRotateTransform($hBufGraph, $iAngle)
  _GDIPlus_GraphicsClear($hBufGraph, $iBackColor)
  
  ;画呀画,我画太极
        _GDIPlus_GraphicsFillPie ( $hBufGraph, -200, -200, 400, 400, 0, 180 , $Brush_B)
        _GDIPlus_GraphicsFillPie ( $hBufGraph, -200, -200, 400, 400, 180, 180 , $Brush_w)

        _GDIPlus_GraphicsFillPie ( $hBufGraph, -200, -100, 200, 200, 180, 180 , $Brush_B)
        _GDIPlus_GraphicsFillPie ( $hBufGraph, 0, -100, 200, 200, 0, 180 , $Brush_w)

    _GDIPlus_GraphicsFillEllipse ( $hBufGraph, 80, -20, 40, 40 , $Brush_B )
    _GDIPlus_GraphicsFillEllipse ( $hBufGraph, -120, -20, 40, 40 , $Brush_w )

        ;好吧,画好了

  _GDIPlus_GraphicsDrawImage($hGraphics, $hBufImg, 0, 0)

Until GUIGetMsg() = -3

Func _Exit() 
        _GDIPlus_BrushDispose($Brush_B)
        _GDIPlus_BrushDispose($Brush_w)
        _GDIPlus_GraphicsDispose($hBufGraph)
        _GDIPlus_GraphicsDispose($hGraphics)
        _GDIPlus_Shutdown()
        GUIDelete($hGUI)
        Exit
EndFunc   
白色区域中间那条黑线,,,,谁能帮我干掉他。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2017-7-24 12:59:40 | 显示全部楼层
坐标问题。34 35 行改为:
        _GDIPlus_GraphicsFillPie ( $hBufGraph, -200, -99, 200, 200, 180, 180 , $Brush_B)
        _GDIPlus_GraphicsFillPie ( $hBufGraph, 0, -101, 200, 200, 0, 180 , $Brush_w)

评分

参与人数 2金钱 +60 收起 理由
lpxx + 30
yamakawa + 30 谢谢帮忙

查看全部评分

 楼主| 发表于 2017-7-24 14:37:13 | 显示全部楼层
回复 2# afan


    搞定。。谢了。a版
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-20 00:35 , Processed in 0.079305 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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