-
-
Notifications
You must be signed in to change notification settings - Fork 87
dtl::shape::Rect
Kasugaccho edited this page Aug 17, 2019
·
22 revisions
namespace dtl::shape {
template <typename T>
class Rect;
}-
Tis 1 bit or more.
| Name | Support |
|---|---|
| Non Rectangular Matrix | True✅ |
Rect is a class that sets drawing values in the drawing range of Matrix.
Fill the entire drawing area.
| Name | Description | Minimum Version |
|---|---|---|
| draw | Draw on Matrix. | v0.4.0 |
| drawArray | Draw on Matrix. | v0.4.0 |
| drawAdd | Draw on Matrix. | v0.4.12 |
| create | Draw on Matrix. | v0.4.0 |
| createArray | Draw on Matrix. | v0.4.0 |
| Name | Description | Minimum Version |
|---|---|---|
| getPointX | Gets the drawing start point coordinate X. | v0.4.0 |
| getPointY | Gets the drawing start point coordinate Y. | v0.4.0 |
| getWidth | Gets the drawing width. | v0.4.0 |
| getHeight | Gets the drawing height. | v0.4.0 |
| getValue | Gets the drawing value. | v0.4.0 |
| Name | Description | Minimum Version |
|---|---|---|
| setPointX | Set the drawing start point coordinate X. | v0.4.0 |
| setPointY | Set the drawing start point coordinate Y. | v0.4.0 |
| setWidth | Set the drawing width. | v0.4.0 |
| setHeight | Set the drawing height. | v0.4.0 |
| setPoint | Set the drawing start point coordinates (X, Y). | v0.4.0 |
| setRange | Set the drawing range (X, Y, W, H). | v0.4.0 |
| setValue | Set the drawing value. | v0.4.0 |
| Name | Description | Minimum Version |
|---|---|---|
| clearPointX | Resets the drawing start coordinate X to the initial value (deletes the drawing start coordinate X). | v0.4.0 |
| clearPointY | Resets the drawing start coordinate Y to the initial value (deletes the drawing start coordinate Y). | v0.4.0 |
| clearWidth | Resets the width of the range (X axis direction) to the initial value (deletes the drawing width). | v0.4.0 |
| clearHeight | Resets the height of the range (Y axis direction) to the initial value (deletes the drawing height). | v0.4.0 |
| clearPoint | Resets the drawing start coordinate (X, Y) to the initial value (deletes the drawing start coordinate (X, Y)). | v0.4.0 |
| clearRange | Resets the drawing range to the initial value (deletes the drawing range (X, Y, W, H)). | v0.4.0 |
| clearValue | Resets the drawing value to the initial value (deletes the drawing value). | v0.4.0 |
Parent class: <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)
