Nevron Open Vision Documentation
Nevron.Nov.Graphics Namespace / NPolygon Class / TryGetLongestLine Method
The step with which the scan line jumps down.
The minimum distance from the found line's center to the sides of the polygon.
The resulting longest inner line.


In This Topic
    TryGetLongestLine Method
    In This Topic
    Gets the longest horizontal inner line in the polygon that is at least at the specified distance from all sides. Returns false if no such line exists.
    Syntax
    'Declaration
     
    
    Public Function TryGetLongestLine( _
       ByVal step As System.Double, _
       ByVal minDistanceToSides As System.Double, _
       ByRef longestLine As NLineSegment _
    ) As System.Boolean
    'Usage
     
    
    Dim instance As NPolygon
    Dim step As System.Double
    Dim minDistanceToSides As System.Double
    Dim longestLine As NLineSegment
    Dim value As System.Boolean
     
    value = instance.TryGetLongestLine(step, minDistanceToSides, longestLine)
    public System.bool TryGetLongestLine( 
       System.double step,
       System.double minDistanceToSides,
       out NLineSegment longestLine
    )

    Parameters

    step
    The step with which the scan line jumps down.
    minDistanceToSides
    The minimum distance from the found line's center to the sides of the polygon.
    longestLine
    The resulting longest inner line.
    Remarks
    The complexity of the algorithm is O(n * log2(n)).
    Requirements

    Target Platforms: Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also