Dim instance As ClientHwnd Dim br As System.Drawing.Brush '塗りつぶしの特性を決定するSystem.Drawing.Brush Dim path As System.Drawing.Drawing2D.GraphicsPath '描画するGraphicsPathオブジェクト instance.FillPathClient(br, path)
'ClientHwndクラス FillPathClientメソッド
Imports System.Windows.Forms
Imports System.Drawing
Public Class AddIn
Public Sub AddIn_Start()
Dim chw As ClientHwnd = New ClientHwnd()
'GraphicsPathオブジェクトの作成
Dim path As New Drawing2D.GraphicsPath
'新しい図形を開始する
path.StartFigure()
'直線を2本追加する
path.AddLine(0, 0, 50, 50)
path.AddLine(100, 0, 150, 50)
'図形を閉じる
path.CloseFigure()
'新しい図形を開始する
path.StartFigure()
'直線を2本追加する
path.AddLine(0, 60, 50, 110)
path.AddLine(100, 60, 150, 110)
'四角を2つ追加する
path.AddRectangle(New Rectangle(160, 10, 60, 80))
path.AddRectangle(New Rectangle(160, 100, 60, 60))
chw.FillPathClient(Brushes.Chartreuse, path)
End Sub
End Class
このページのQRコード
便利ウェブサイト
便利 Steam アプリ
便利 Android アプリ