Smrf.NodeXL.Layouts.RectangleBinner.RectangleBinner C# (CSharp) Method

RectangleBinner() public method

Initializes a new instance of the RectangleBinner class.
public RectangleBinner ( Rectangle parent, Int32 binLength ) : System
parent System.Drawing.Rectangle /// The parent rectangle to split into bins. ///
binLength System.Int32 /// Length and width of each bin square. Must be greater than zero. ///
return System
    public RectangleBinner
    (
        Rectangle parent,
        Int32 binLength
    )
    {
        m_oParent = parent;
        m_iBinLength = binLength;

        // Start one bin out of bounds, so that the Rectangle.Offset() call in
        // the first call to TryGetNextBin() results in the first in-bounds
        // bin.

        m_oLastBin = Rectangle.FromLTRB(
            m_oParent.Left - m_iBinLength,
            m_oParent.Bottom - m_iBinLength,
            m_oParent.Left,
            m_oParent.Bottom
            );

        m_bBinReturned = false;

        AssertValid();
    }