<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 移植VB維護(hù)程序到mobile下

          移植VB維護(hù)程序到mobile下

          作者: 時(shí)間:2016-10-08 來(lái)源:網(wǎng)絡(luò) 收藏

          Dim angleIncrement As Single

          angleIncrement = (sweepAngle - startAngle) / 10

          Dim angle As Single

          angle = startAngle

          Dim i As Integer

          For i = 0 To 10

          xAngle(i) = x + (Math.Cos(angle * (Math.PI / 180)) * (width / 2))

          yAngle(i) = y + (Math.Sin(angle * (Math.PI / 180)) * (height / 2))

          angle += angleIncrement

          Next i

          xAngle(11) = x + (Math.Cos(sweepAngle * (Math.PI / 180)) * (width / 2))

          yAngle(11) = y + (Math.Sin(sweepAngle * (Math.PI / 180)) * (height / 2))

          Dim anglePoints(12) As Point

          anglePoints(0) = New Point(x, y)

          For i = 0 To 11

          anglePoints(i + 1) = New Point(CInt(xAngle(i)), CInt(yAngle(i)))

          Next

          graphicsObject.DrawPolygon(pen, anglePoints)

          End Sub

          '=====================================================

          '填充弧形

          ' graphicsObject - Graphics 對(duì)象

          ' solidBrush - 畫(huà)刷

          ' x,y - 弧的圓心

          ' width - 寬度 (X直徑)

          ' height - 高度 (Y直徑)

          ' startAngle - 起始角度

          ' sweepAngle - 結(jié)束角度

          '

          Sub fillPie(ByVal graphicsObject As Graphics, ByVal solidBrush As SolidBrush, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal startAngle As Single, ByVal sweepAngle As Single)

          Dim xAngle(12) As Single

          Dim yAngle(12) As Single

          Dim angleIncrement As Single

          angleIncrement = (sweepAngle - startAngle) / 10

          Dim angle As Single

          angle = startAngle

          Dim i As Integer

          For i = 0 To 10

          xAngle(i) = x + (Math.Cos(angle * (Math.PI / 180)) * (width / 2))

          yAngle(i) = y + (Math.Sin(angle * (Math.PI / 180)) * (height / 2))

          angle += angleIncrement

          Next i

          xAngle(11) = x + (Math.Cos(sweepAngle * (Math.PI / 180)) * (width / 2))

          yAngle(11) = y + (Math.Sin(sweepAngle * (Math.PI / 180)) * (height / 2))

          Dim anglePoints(12) As Point

          anglePoints(0) = New Point(x, y)

          For i = 0 To 11

          anglePoints(i + 1) = New Point(CInt(xAngle(i)), CInt(yAngle(i)))

          Next

          graphicsObject.FillPolygon(solidBrush, anglePoints)

          End Sub


          上一頁(yè) 1 2 3 下一頁(yè)

          關(guān)鍵詞:

          評(píng)論


          相關(guān)推薦

          技術(shù)專(zhuān)區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();