added hight and width to canvas
This commit is contained in:
parent
008ee97fc1
commit
dece90008a
@ -40,6 +40,21 @@ abstract Canvas(Array<Array<Pixel>>) to Array<Array<Pixel>> {
|
||||
this[y][x] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public function hight(): Int {
|
||||
return this.length;
|
||||
}
|
||||
|
||||
public function maxWidth() {
|
||||
var max = 0;
|
||||
for (i in 0...this.length){
|
||||
if (this[i].length > max){
|
||||
max = this[i].length;
|
||||
}
|
||||
}
|
||||
|
||||
return max;
|
||||
}
|
||||
}
|
||||
|
||||
class CanvasKeyValueIterator{
|
||||
|
Loading…
Reference in New Issue
Block a user