C# Class RectanglePlacer.Biz.RectPlacer

Rectを水平軸上で移動して それぞれがが重ならないように配置する
Exibir arquivo Open project: kienaiProject/ArtOfWords Class Usage Examples

Public Properties

Property Type Description
placedRects List

Public Methods

Method Description
Place ( List targetRects ) : void

引数のRectを干渉しないようにX軸上に移動して設定する

RectPlacer ( double minPos, double maxPos ) : System

コンストラクター

Private Methods

Method Description
FindSpaceAndSetRect ( Rect &rect, List rectList ) : void

元のWidthを無視して、設定しうるRect領域を検索して設定する

FindUsableWidth ( double current, List rectList ) : double

コンフリクトを起こさないWidth幅を検査して返す

GetConflictRects ( PlacableRect placable, List cmpList ) : List

2つのRectを比較してコンフリクトする可能性のあるRectのリストを返す

IsConflictRectHorizontal ( Rect &rect1, Rect &rect2 ) : bool

2つのRectを比較して同じ経線上に存在しないことを確認する

IsConflictRectVertical ( Rect &rect1, Rect &rect2 ) : bool

2つのRectを比較して同じ緯線上に存在しないことを確認する

SetLeftOneRect ( PlacableRect rect ) : void

X軸上のポイントを設定する

SetMaxWidth ( List list ) : void

Rectの理論上の最大幅を設定する

SetPlacableRect ( Rect &rect, List rectList ) : void

設定しうるRect領域を検索して設定する

Method Details

Place() public method

引数のRectを干渉しないようにX軸上に移動して設定する
public Place ( List targetRects ) : void
targetRects List 設定したいRectのリスト
return void

RectPlacer() public method

コンストラクター
public RectPlacer ( double minPos, double maxPos ) : System
minPos double x軸上の最小値
maxPos double x軸上の最大値
return System

Property Details

placedRects public_oe property

public List placedRects
return List