Nevron .NET Vision
Nevron.GraphicsCore Namespace / NMonochromeRaster Class / FindLargestRectangle Method / FindLargestRectangle(Int32,Int32) Method
The minimum required width of the rectangle. Pass -1 if no min width constraint is required.
The minimum required height of the largest rectangle. Pass -1 if no min height constraint is required.


In This Topic
    FindLargestRectangle(Int32,Int32) Method
    In This Topic
    Finds the largest rectangle containing ones in this monochrome raster, which staisfies the given constraints. If such rectangle does not exist a empty rectangle is returned.
    Syntax
    'Declaration
     
    
    Public Overloads Function FindLargestRectangle( _
       ByVal minWidth As System.Integer, _
       ByVal minHeight As System.Integer _
    ) As NRectangle
    'Usage
     
    
    Dim instance As NMonochromeRaster
    Dim minWidth As System.Integer
    Dim minHeight As System.Integer
    Dim value As NRectangle
     
    value = instance.FindLargestRectangle(minWidth, minHeight)
    public NRectangle FindLargestRectangle( 
       System.int minWidth,
       System.int minHeight
    )

    Parameters

    minWidth
    The minimum required width of the rectangle. Pass -1 if no min width constraint is required.
    minHeight
    The minimum required height of the largest rectangle. Pass -1 if no min height constraint is required.
    Remarks
    The algorithm runs in O(M * N^2) time and O(M) space, where M is the height (number of rows) in the raster and N is its width (number of columns).
    Requirements

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

    See Also