-
-
Notifications
You must be signed in to change notification settings - Fork 87
dtl::shape::Rect (形状クラス)
Kasugaccho edited this page Aug 17, 2019
·
19 revisions
namespace dtl::shape {
template <typename T>
class Rect;
}※ T は1bit以上の型
| 機能名 | 対応 |
|---|---|
| 非長方形Matrix | 可能✅ |
Rectとは "Matrixの描画範囲に描画値を設置する" 機能を持つクラスである。
描画範囲の全てを必ず塗りつぶす。
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| draw | Matrixに描画する | v0.4.0 |
| drawArray | Matrixに描画する | v0.4.0 |
| drawAdd | Matrixに描画する | v0.4.12 |
| create | Matrixに描画してMatrixを返す | v0.4.0 |
| createArray | Matrixに描画してMatrixを返す | v0.4.0 |
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| getPointX | 描画始点座標Xを取得 | v0.4.0 |
| getPointY | 描画始点座標Yを取得 | v0.4.0 |
| getWidth | 描画横幅Wを取得 | v0.4.0 |
| getHeight | 描画縦幅Hを取得 | v0.4.0 |
| getValue | 描画値を取得 | v0.4.0 |
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| setPointX | 描画始点座標Xを指定 | v0.4.0 |
| setPointY | 描画始点座標Yを指定 | v0.4.0 |
| setWidth | 描画横幅Wを指定 | v0.4.0 |
| setHeight | 描画縦幅Hを指定 | v0.4.0 |
| setPoint | 描画始点座標(X,Y)を指定 | v0.4.0 |
| setRange | 描画範囲(X,Y,W,H)を指定 | v0.4.0 |
| setValue | 描画値を指定 | v0.4.0 |
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| clearPointX | 描画始点座標Xを消去 | v0.4.0 |
| clearPointY | 描画始点座標Yを消去 | v0.4.0 |
| clearWidth | 描画横幅Wを消去 | v0.4.0 |
| clearHeight | 描画縦幅Hを消去 | v0.4.0 |
| clearPoint | 描画始点座標(X,Y)を消去 | v0.4.0 |
| clearRange | 描画範囲(X,Y,W,H)を消去 | v0.4.0 |
| clearValue | 描画値を消去 | v0.4.0 |
継承元: <DTL/Range/RectBaseWithValue.hpp>
dtl::shape::Rect<shape_t>(draw_value).draw(matrix, width, height);#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::Rect<shape_t>(1).draw(matrix);
dtl::console::OutputNumber<shape_t>(",").draw(matrix);
dtl::console::OutputString<shape_t>("//", "##").draw(matrix);
return 0;
}1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
################################
################################
################################
################################
################################
################################
################################
################################
################################
################################
################################
################################

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)
