Description
Find first line
Syntax
Visual Basic |
---|
Public Function FirstLine() As CiLine
|
Return Type
Nothing or 0 when no more lines are available.
Example
Iterate image lines
VB Example (Visual Basic) | Copy Code |
---|
Public Sub T_ShowLines(ByRef Tools As CiTools)
Dim Line As CiLine
With Tools
.pLineCurvature = ciCurvVeryLow
.pMaxLineAngle = 4.5
.pMaxLineGap = 5
.pMinLineLength = 100
.pLineDirection = ciLineVertAndHorz
Set Line = .FirstLine
Do While Not Line Is Nothing
With Line
Debug.Print " Line Angle=" & .Angle & _
" Thickness=" & .Thickness & _
" Rect=" & "(" & .Rect.left & "," & _
.Rect.top & " - " & .Rect.right & "," & _
.Rect.bottom & ")" & _
" Start (" & .Start.X & "," & .Start.Y & _
") End (" & .End.X & "," & .End.Y & ")" & _
" Dir=" & Switch(.Direction = ciLineHorz, "Horz", _
.Direction = ciLineVert, "Vert")
End With
Set Line = .NextLine
Loop
End With
End Sub
|
|
See Also