本文整理汇总了VB.NET中System.Drawing.Graphics.FillPolygon方法的典型用法代码示例。如果您正苦于以下问题:VB.NET Graphics.FillPolygon方法的具体用法?VB.NET Graphics.FillPolygon怎么用?VB.NET Graphics.FillPolygon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Graphics 的用法示例。
在下文中一共展示了Graphics.FillPolygon方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的VB.NET代码示例。
示例1: FillPolygonPoint
Public Sub FillPolygonPoint(ByVal e As PaintEventArgs)
' Create solid brush.
Dim blueBrush As New SolidBrush(Color.Blue)
' Create points that define polygon.
Dim point1 As New Point(50, 50)
Dim point2 As New Point(100, 25)
Dim point3 As New Point(200, 5)
Dim point4 As New Point(250, 50)
Dim point5 As New Point(300, 100)
Dim point6 As New Point(350, 200)
Dim point7 As New Point(250, 250)
Dim curvePoints As Point() = {point1, point2, point3, point4, _
point5, point6, point7}
' Draw polygon to screen.
e.Graphics.FillPolygon(blueBrush, curvePoints)
End Sub
开发者ID:VB.NET开发者,项目名称:System.Drawing,代码行数:19,代码来源:Graphics.FillPolygon
示例2: FillPolygonPointF
Public Sub FillPolygonPointF(ByVal e As PaintEventArgs)
' Create solid brush.
Dim blueBrush As New SolidBrush(Color.Blue)
' Create points that define polygon.
Dim point1 As New PointF(50.0F, 50.0F)
Dim point2 As New PointF(100.0F, 25.0F)
Dim point3 As New PointF(200.0F, 5.0F)
Dim point4 As New PointF(250.0F, 50.0F)
Dim point5 As New PointF(300.0F, 100.0F)
Dim point6 As New PointF(350.0F, 200.0F)
Dim point7 As New PointF(250.0F, 250.0F)
Dim curvePoints As PointF() = {point1, point2, point3, point4, _
point5, point6, point7}
' Fill polygon to screen.
e.Graphics.FillPolygon(blueBrush, curvePoints)
End Sub
开发者ID:VB.NET开发者,项目名称:System.Drawing,代码行数:19,代码来源:Graphics.FillPolygon
示例3: FillPolygonPointFillMode
Public Sub FillPolygonPointFillMode(ByVal e As PaintEventArgs)
' Create solid brush.
Dim blueBrush As New SolidBrush(Color.Blue)
' Create points that define polygon.
Dim point1 As New Point(50, 50)
Dim point2 As New Point(100, 25)
Dim point3 As New Point(200, 5)
Dim point4 As New Point(250, 50)
Dim point5 As New Point(300, 100)
Dim point6 As New Point(350, 200)
Dim point7 As New Point(250, 250)
Dim curvePoints As Point() = {point1, point2, point3, point4, _
point5, point6, point7}
' Define fill mode.
Dim newFillMode As FillMode = FillMode.Winding
' Draw polygon to screen.
e.Graphics.FillPolygon(blueBrush, curvePoints, newFillMode)
End Sub
开发者ID:VB.NET开发者,项目名称:System.Drawing,代码行数:22,代码来源:Graphics.FillPolygon
示例4: FillPolygonPointFFillMode
Public Sub FillPolygonPointFFillMode(ByVal e As PaintEventArgs)
' Create solid brush.
Dim blueBrush As New SolidBrush(Color.Blue)
' Create points that define polygon.
Dim point1 As New PointF(50.0F, 50.0F)
Dim point2 As New PointF(100.0F, 25.0F)
Dim point3 As New PointF(200.0F, 5.0F)
Dim point4 As New PointF(250.0F, 50.0F)
Dim point5 As New PointF(300.0F, 100.0F)
Dim point6 As New PointF(350.0F, 200.0F)
Dim point7 As New PointF(250.0F, 250.0F)
Dim curvePoints As PointF() = {point1, point2, point3, point4, _
point5, point6, point7}
' Define fill mode.
Dim newFillMode As FillMode = FillMode.Winding
' Fill polygon to screen.
e.Graphics.FillPolygon(blueBrush, curvePoints, newFillMode)
End Sub
开发者ID:VB.NET开发者,项目名称:System.Drawing,代码行数:22,代码来源:Graphics.FillPolygon
示例5: DrawArrow
' 导入命名空间
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms
public class DrawArrow
public Shared Sub Main
Application.Run(New Form1)
End Sub
End class
public class Form1
Inherits System.Windows.Forms.Form
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
e.Graphics.ScaleTransform(30, 30, MatrixOrder.Append)
DrawArrow(e.Graphics, HatchStyle.Horizontal)
End Sub
Private Sub DrawArrow(ByVal gr As Graphics, ByVal hatch_style As HatchStyle)
Dim pts() As Point = { _
New Point(0, 1), _
New Point(2, 1), _
New Point(2, 0), _
New Point(4, 2), _
New Point(2, 4), _
New Point(2, 3), _
New Point(0, 3) _
}
gr.FillPolygon(New HatchBrush(hatch_style, Color.Black, Color.White), pts)
gr.DrawPolygon(New Pen(Color.Black, 0), pts)
End Sub
Public Sub New()
MyBase.New()
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
End Sub
End Class
开发者ID:VB程序员,项目名称:System.Drawing,代码行数:42,代码来源:Graphics.FillPolygon
注:本文中的System.Drawing.Graphics.FillPolygon方法示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论