C# Class Smrf.NodeXL.Layouts.RectangleBinner

Splits a parent rectangle into "bin" rectangles.
A bin is a small square that fits into a parent rectangle. This class splits the parent into consecutive bins, running from left to right along the bottom of the parent and then moving up a row.

Pass the parent rectangle to the constructor, along with the length of the bin. Call TryGetNextBin to get the next bin, and call to get any space not occupied by the returned bins.

Inheritance: Object
Afficher le fichier Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Свойство Type Description
m_bBinReturned System.Boolean
m_iBinLength System.Int32
m_oLastBin System.Drawing.Rectangle
m_oParent System.Drawing.Rectangle

Méthodes publiques

Méthode Description
RectangleBinner ( Rectangle parent, Int32 binLength ) : System

Initializes a new instance of the RectangleBinner class.

TryGetNextBin ( Rectangle &nextBin ) : System.Boolean
TryGetRemainingRectangle ( Rectangle &remainingRectangle ) : System.Boolean

Private Methods

Méthode Description
AssertValid ( ) : void

Method Details

RectangleBinner() public méthode

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. ///
Résultat System

TryGetNextBin() public méthode

public TryGetNextBin ( Rectangle &nextBin ) : System.Boolean
nextBin System.Drawing.Rectangle
Résultat System.Boolean

TryGetRemainingRectangle() public méthode

public TryGetRemainingRectangle ( Rectangle &remainingRectangle ) : System.Boolean
remainingRectangle System.Drawing.Rectangle
Résultat System.Boolean

Property Details

m_bBinReturned protected_oe property

protected Boolean,System m_bBinReturned
Résultat System.Boolean

m_iBinLength protected_oe property

protected Int32,System m_iBinLength
Résultat System.Int32

m_oLastBin protected_oe property

protected Rectangle,System.Drawing m_oLastBin
Résultat System.Drawing.Rectangle

m_oParent protected_oe property

protected Rectangle,System.Drawing m_oParent
Résultat System.Drawing.Rectangle