-
-
Notifications
You must be signed in to change notification settings - Fork 87
dtl::shape::StarLine (形状クラス)
Kasugaccho edited this page Oct 25, 2019
·
1 revision
namespace dtl::shape {
template <typename T>
class StarLine;
}※ T は1bit以上の型
StarLineとは "Matrixの描画範囲に五芒星を描画する" 機能を持つクラスである。
描画範囲の全てを必ず塗りつぶすとは限らない (Matrixの初期化が必要) 。
| 機能名 | 対応 |
|---|---|
| 非長方形Matrix | 不可 |
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| draw | Matrixに描画する | v0.4.14 |
| drawArray | Matrixに描画する | v0.4.14 |
| create | Matrixに描画してMatrixを返す | v0.4.14 |
| createArray | Matrixに描画してMatrixを返す | v0.4.14 |
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| getPointX | 描画始点座標Xを取得 | v0.4.14 |
| getPointY | 描画始点座標Yを取得 | v0.4.14 |
| getWidth | 描画横幅Wを取得 | v0.4.14 |
| getHeight | 描画縦幅Hを取得 | v0.4.14 |
| getValue | 描画値を取得 | v0.4.14 |
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| setPointX | 描画始点座標Xを指定 | v0.4.14 |
| setPointY | 描画始点座標Yを指定 | v0.4.14 |
| setWidth | 描画横幅Wを指定 | v0.4.14 |
| setHeight | 描画縦幅Hを指定 | v0.4.14 |
| setPoint | 描画始点座標(X,Y)を指定 | v0.4.14 |
| setRange | 描画範囲(X,Y,W,H)を指定 | v0.4.14 |
| setValue | 描画値を指定 | v0.4.14 |
| 名前 | 説明 | 対応バージョン |
|---|---|---|
| clearPointX | 描画始点座標Xを消去 | v0.4.14 |
| clearPointY | 描画始点座標Yを消去 | v0.4.14 |
| clearWidth | 描画横幅Wを消去 | v0.4.14 |
| clearHeight | 描画縦幅Hを消去 | v0.4.14 |
| clearPoint | 描画始点座標(X,Y)を消去 | v0.4.14 |
| clearRange | 描画範囲(X,Y,W,H)を消去 | v0.4.14 |
| clearValue | 描画値を消去 | v0.4.14 |
継承元: <DTL/Range/RectBaseWithValueXYRA.hpp>
dtl::shape::StarLine<shape_t>(draw_value, x, y, r, angle).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, 32>, 24> matrix{ {} };
dtl::shape::StarLine<shape_t>(1, 16, 12, 10, 0.0).draw(matrix);
dtl::console::OutputNumber<shape_t>(",").draw(matrix);
dtl::console::OutputString<shape_t>("//", "##").draw(matrix);
return 0;
}0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////##//////////////////////////////
////////////////////////////////####////////////////////////////
////////////////////////////////####////////////////////////////
//////////////////////////////##//##////////////////////////////
//////////////////////////////##////##//////////////////////////
//////////////////////////////##////##//////////////////////////
////////////////////////////##//////##//////////////////////////
////////////##########################################//////////
//////////////####//////////##////////##////////####////////////
//////////////////##//////##//////////##//////##////////////////
////////////////////####//##////////////######//////////////////
////////////////////////####////////////##//////////////////////
////////////////////////####//////////####//////////////////////
////////////////////////##//####//####////##////////////////////
////////////////////////##//////##////////##////////////////////
//////////////////////##////####//####////##////////////////////
//////////////////////##//##//////////##////##//////////////////
//////////////////////####//////////////######//////////////////
////////////////////##//////////////////////##//////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
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)
