-
-
Notifications
You must be signed in to change notification settings - Fork 87
dtl::retouch::Modulo (修正クラス)
Kasugaccho edited this page Jul 27, 2019
·
2 revisions
<DTL/Retouch/Modulo.hpp>
namespace dtl::retouch {
template <typename T>
class Modulo;
}※ T は1bit以上の型
| 機能名 | 対応 |
|---|---|
| 非長方形Matrix | 可能✅ |
Moduloとは "Matrixの描画範囲を指定値で剰余演算する" 機能を持つクラスである。
描画範囲の全てを必ず塗りつぶすとは限らない (Matrixの初期化が必要) 。
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| draw | Matrixに描画する | v0.4.11 |
| drawArray | Matrixに描画する | v0.4.11 |
| create | Matrixに描画してMatrixを返す | v0.4.11 |
| createArray | Matrixに描画してMatrixを返す | v0.4.11 |
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| getPointX | 描画始点座標Xを取得 | v0.4.11 |
| getPointY | 描画始点座標Yを取得 | v0.4.11 |
| getWidth | 描画横幅Wを取得 | v0.4.11 |
| getHeight | 描画縦幅Hを取得 | v0.4.11 |
| getValue | 描画値を取得 | v0.4.11 |
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| setPointX | 描画始点座標Xを指定 | v0.4.11 |
| setPointY | 描画始点座標Yを指定 | v0.4.11 |
| setWidth | 描画横幅Wを指定 | v0.4.11 |
| setHeight | 描画縦幅Hを指定 | v0.4.11 |
| setPoint | 描画始点座標(X,Y)を指定 | v0.4.11 |
| setRange | 描画範囲(X,Y,W,H)を指定 | v0.4.11 |
| setValue | 描画値を指定 | v0.4.11 |
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| clearPointX | 描画始点座標Xを消去 | v0.4.11 |
| clearPointY | 描画始点座標Yを消去 | v0.4.11 |
| clearWidth | 描画横幅Wを消去 | v0.4.11 |
| clearHeight | 描画縦幅Hを消去 | v0.4.11 |
| clearPoint | 描画始点座標(X,Y)を消去 | v0.4.11 |
| clearRange | 描画範囲(X,Y,W,H)を消去 | v0.4.11 |
| clearValue | 描画値を消去 | v0.4.11 |
#include <DTL.hpp>
#include <cstdint>
#include <array>
int main() {
using shape_t = std::uint_fast8_t;
std::array<std::array<shape_t, 5>, 6> matrix{ {} };
dtl::shape::AscendingOrder<shape_t>(10).draw(matrix);
dtl::console::OutputNumber<shape_t>(",").draw(matrix);
dtl::retouch::Modulo<shape_t>(5).draw(matrix);
dtl::console::OutputNumber<shape_t>(",").draw(matrix);
return 0;
}10,11,12,13,14,
15,16,17,18,19,
20,21,22,23,24,
25,26,27,28,29,
30,31,32,33,34,
35,36,37,38,39,
0,1,2,3,4,
0,1,2,3,4,
0,1,2,3,4,
0,1,2,3,4,
0,1,2,3,4,
0,1,2,3,4,
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)