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