CreateVectorHatchPattern example
Example for CreateVectorHatchPattern method
Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Command1.Text = "AddShape (CreateVectorHatchPattern)"
cAvax1.StartAvax()
End Sub
Private Sub Form1_FormClosed(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
cAvax1.EndAvax()
End Sub
Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
Dim Fill_iType As Byte
Dim Fill_lHatchIndex As Integer
Dim Fill_iInForeColor As Short
Dim Fill_iInBackColor As Short
Dim Fill_sPattern As String
Dim Fill_zOrder, Fill_lFlags As Integer
Dim iClr, iWidth As Short
Dim iStyle, iLayer As Short
Dim xV() As Single
Dim yV() As Single
Dim zV() As Single
Dim x1() As Single
Dim y1() As Single
Dim x2() As Single
Dim y2() As Single
Dim dx, dy As Single
Dim rotAngle, sScale As Single
ReDim xV(5)
ReDim yV(5)
ReDim zV(5)
xV(1) = 2
yV(1) = 2
xV(2) = 2
yV(2) = 12
xV(3) = 12
yV(3) = 12
xV(4) = 12
yV(4) = 2
xV(5) = 10
yV(5) = -1
ReDim x1(3)
ReDim y1(3)
ReDim x2(3)
ReDim y2(3)
x1(1) = 0
y1(1) = 0
x2(1) = 1
y2(1) = 1
x1(2) = 1
y1(2) = 1
x2(2) = 3
y2(2) = 1
x1(3) = 3
y1(3) = 1
x2(3) = 1
y2(3) = 5
rotAngle = 0
sScale = 1
Fill_iType = Avax.AvaxFillType.Vector_f
Fill_sPattern = cAvax1.CreateVectorHatchPattern(x1, y1, x2, y2, dx, dy, rotAngle, sScale)
Fill_iInForeColor = 5
Fill_lFlags = CAvax1.CreatePatternFlags(False, False, True, False, False)
Fill_iInBackColor = 2
iWidth = 2 'Width
iClr = 1 'Border color
Call CAvax1.Add_Shape(xV, yV, zV, Nothing, Fill_iType, Fill_lHatchIndex, Fill_iInForeColor, Fill_iInBackColor, Fill_sPattern, Fill_zOrder, Fill_lFlags, iClr, iWidth, iStyle, iLayer, Avax.AvaxPolylineType.Polyline_pt)
End Sub