Skip to content

DTL.Range.BasicRect.SetRange

Gunji Ryota edited this page Jan 15, 2020 · 2 revisions
// (1)
BasicRect SetRange(uint startX, uint startY, uint length)
// (2)
BasicRect SetRange(uint startX, uint startY, uint width, uint height)
// (3)
BasicRect SetRange(DTL.Base.Coordinate2DimensionalAndLength2Dimensional matrixRange)

概要

描画範囲を指定

戻り値

(1), (2), (3) 自分自身の参照値を返す。

例外

投げない

Example

var matrix = new int[10, 10];
MatrixRange matrixRange = new MatrixRange(2, 3, 4, 5);

Border border = new Border(5);
border.SetRange(matrixRange);
border.Draw(matrix);
new OutputConsole().Draw(matrix);

Output

0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 5 5 5 5 0 0 0 0 
0 0 5 0 0 5 0 0 0 0 
0 0 5 0 0 5 0 0 0 0 
0 0 5 0 0 5 0 0 0 0 
0 0 5 5 5 5 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
Clone this wiki locally