Skip to content

dtl::retouch::Angular (修正クラス)

Kasugaccho edited this page Aug 17, 2019 · 2 revisions

バージョン:0.4.12.0以降

<DTL/Retouch/Angular.hpp>

namespace dtl::retouch {
  template <typename T>
  class Angular;
}

T は1bit以上の型

対応機能

機能名 対応
非長方形Matrix 可能✅

例 (C++11)

#include <DTL.hpp>
#include <cstdint>
#include <array>

int main() {

	using shape_t = std::uint_fast8_t;
	std::array<std::array<shape_t, 7>, 7> matrix{ {} };

	dtl::shape::SimplePyramid<shape_t>(99, 17).draw(matrix);

	dtl::console::OutputNumber<shape_t>(",").draw(matrix);
	dtl::console::OutputStringBool<shape_t>("##", "//").drawOperator(matrix, [](const shape_t value) {return value > 50; });

	dtl::retouch::Angular<shape_t>(5).draw(matrix);

	dtl::console::OutputNumber<shape_t>(",").draw(matrix);
	dtl::console::OutputStringBool<shape_t>("##", "//").drawOperator(matrix, [](const shape_t value) {return value > 50; });

	return 0;
}

出力

17,17,17,17,17,17,17,
17,44,44,44,44,44,17,
17,44,71,71,71,44,17,
17,44,71,99,71,44,17,
17,44,71,71,71,44,17,
17,44,44,44,44,44,17,
17,17,17,17,17,17,17,
//////////////
//////////////
////######////
////######////
////######////
//////////////
//////////////
15,15,15,15,15,15,15,
15,40,40,40,40,40,15,
15,40,70,70,70,40,15,
15,40,70,95,70,40,15,
15,40,70,70,70,40,15,
15,40,40,40,40,40,15,
15,15,15,15,15,15,15,
//////////////
//////////////
////######////
////######////
////######////
//////////////
//////////////
Clone this wiki locally