CreatePatternFlags example
Example for CreatePatternFlags method
Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Command1.Text = "AddShape (CreatePatternFlags)"
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 sPatFile, sPatternName As String
Dim rotAngle, sScale As Single
Dim fStretchXOn As Boolean
Dim fStretchYOn As Boolean
Dim fBackgroundOn As Boolean
Dim fBorderOff As Boolean
Dim fPolylineOn As Boolean
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
sPatFile = My.Application.Info.DirectoryPath & "\..\AcadPatterns1.pat"
sPatternName = "HEXAGON"
rotAngle = 0
sScale = 10
Fill_sPattern = cAvax1.CreateACADHatchPattern(sPatFile, sPatternName, rotAngle, sScale)
Fill_iType = Avax.AvaxFillType.PatACAD_f
Fill_iInForeColor = 5
'---
fBackgroundOn = False 'No Background
fBorderOff = True 'No Border
Fill_lFlags = CAvax1.CreatePatternFlags(False, False, fBackgroundOn, fBorderOff, False)
'---
Fill_iInBackColor = 2
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