C# Класс 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.

Наследование: Object
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
m_bBinReturned System.Boolean
m_iBinLength System.Int32
m_oLastBin System.Drawing.Rectangle
m_oParent System.Drawing.Rectangle

Открытые методы

Метод Описание
RectangleBinner ( Rectangle parent, Int32 binLength ) : System

Initializes a new instance of the RectangleBinner class.

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

Приватные методы

Метод Описание
AssertValid ( ) : void

Описание методов

RectangleBinner() публичный Метод

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. ///
Результат System

TryGetNextBin() публичный Метод

public TryGetNextBin ( Rectangle &nextBin ) : System.Boolean
nextBin System.Drawing.Rectangle
Результат System.Boolean

TryGetRemainingRectangle() публичный Метод

public TryGetRemainingRectangle ( Rectangle &remainingRectangle ) : System.Boolean
remainingRectangle System.Drawing.Rectangle
Результат System.Boolean

Описание свойств

m_bBinReturned защищенное свойство

protected Boolean,System m_bBinReturned
Результат System.Boolean

m_iBinLength защищенное свойство

protected Int32,System m_iBinLength
Результат System.Int32

m_oLastBin защищенное свойство

protected Rectangle,System.Drawing m_oLastBin
Результат System.Drawing.Rectangle

m_oParent защищенное свойство

protected Rectangle,System.Drawing m_oParent
Результат System.Drawing.Rectangle