Skip to content

DTL.Range.BasicRect.GetWidth

sitRyo edited this page Jan 15, 2020 · 2 revisions
// (1)
uint GetWidth()
// (2)
BasicRect GetWidth(ref uint value)

概要

描画横幅Wを取得する

戻り値

(1) 戻り値の型はuintである。
(2) 引数にwidthを代入して, 戻り値としてBasicRectの参照値を返す。

例外

投げない

Example

Border border = new Border(5);
var matrix = new int[10, 10];
border.SetWidth(5).SetHeight(5);
Debug.Log(border.GetWidth());
Debug.Log(border.GetHeight());
border.Draw(matrix);
new OutputConsole().Draw(matrix);

Output

5
5
5 5 5 5 5 0 0 0 0 0 
5 0 0 0 5 0 0 0 0 0 
5 0 0 0 5 0 0 0 0 0 
5 0 0 0 5 0 0 0 0 0 
5 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 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 
Clone this wiki locally