-
-
Notifications
You must be signed in to change notification settings - Fork 81
dtl::shape::PointGridWithBorder (形状クラス)
Kasugaccho edited this page Aug 17, 2019
·
11 revisions
<DTL/Shape/PointGridWithBorder.hpp>
namespace dtl::shape {
template <typename T>
class PointGridWithBorder;
}
※ T
は1bit以上の型
機能名 | 対応 |
---|---|
非長方形Matrix | 可能✅ |
名前 | 説明 | 対応バージョン |
---|---|---|
draw | Matrixに描画する | v0.4.X |
drawArray | Matrixに描画する | v0.4.X |
create | Matrixに描画してMatrixを返す | v0.4.X |
createArray | Matrixに描画してMatrixを返す | v0.4.X |
名前 | 説明 | 対応バージョン |
---|---|---|
getPointX | 描画始点座標Xを取得 | v0.4.X |
getPointY | 描画始点座標Yを取得 | v0.4.X |
getWidth | 描画横幅Wを取得 | v0.4.X |
getHeight | 描画縦幅Hを取得 | v0.4.X |
getValue | 描画値を取得 | v0.4.X |
名前 | 説明 | 対応バージョン |
---|---|---|
setPointX | 描画始点座標Xを指定 | v0.4.X |
setPointY | 描画始点座標Yを指定 | v0.4.X |
setWidth | 描画横幅Wを指定 | v0.4.X |
setHeight | 描画縦幅Hを指定 | v0.4.X |
setPoint | 描画始点座標(X,Y)を指定 | v0.4.X |
setRange | 描画範囲(X,Y,W,H)を指定 | v0.4.X |
setValue | 描画値を指定 | v0.4.X |
名前 | 説明 | 対応バージョン |
---|---|---|
clearPointX | 描画始点座標Xを消去 | v0.4.X |
clearPointY | 描画始点座標Yを消去 | v0.4.X |
clearWidth | 描画横幅Wを消去 | v0.4.X |
clearHeight | 描画縦幅Hを消去 | v0.4.X |
clearPoint | 描画始点座標(X,Y)を消去 | v0.4.X |
clearRange | 描画範囲(X,Y,W,H)を消去 | v0.4.X |
clearValue | 描画値を消去 | v0.4.X |
#include <DTL.hpp>
#include <cstdint>
#include <array>
int main() {
using shape_t = std::uint_fast8_t;
std::array<std::array<shape_t, 16>, 12> matrix{ {} };
dtl::shape::PointGridWithBorder<shape_t>(1, 2).draw(matrix);
dtl::console::OutputNumber<shape_t>(",").draw(matrix);
dtl::console::OutputString<shape_t>("//", "##", "%%").draw(matrix);
return 0;
}
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,
2,0,1,0,1,0,1,0,1,0,1,0,1,0,2,2,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,
2,0,1,0,1,0,1,0,1,0,1,0,1,0,2,2,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,
2,0,1,0,1,0,1,0,1,0,1,0,1,0,2,2,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,
2,0,1,0,1,0,1,0,1,0,1,0,1,0,2,2,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%//////////////////////////%%%%
%%//##//##//##//##//##//##//%%%%
%%//////////////////////////%%%%
%%//##//##//##//##//##//##//%%%%
%%//////////////////////////%%%%
%%//##//##//##//##//##//##//%%%%
%%//////////////////////////%%%%
%%//##//##//##//##//##//##//%%%%
%%//////////////////////////%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) 2018-2021 As Project.
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)