47 if (!back_dot_color_.has_value() || back_dot_color_.value() != value) {
48 back_dot_color_ = value;
63 if (back_dot_opacity_ != value) {
64 back_dot_opacity_ = value;
65 if (back_dot_opacity_ < 0.0) back_dot_opacity_ = 0.0;
66 if (back_dot_opacity_ > 1.0) back_dot_opacity_ = 1.0;
79 if (dot_matrix_style_ != value) {
80 dot_matrix_style_ = value;
95 matrix_size_ =
drawing::size(
static_cast<int32_t
>(dots_[0].
size()),
static_cast<int32_t
>(dots_.size()));
124 if (matrix_size_ != value) {
125 matrix_size_ = value;
126 dots_ =
dots_collection(matrix_size_.height(), std::vector<bool>(matrix_size_.width(),
false));
138 if (show_back_dot_ != value) {
139 show_back_dot_ = value;
147 virtual int32_t
thickness()
const {
return thickness_.value_or(size_.height() < (matrix_size_.height() * 2) ? 1 : (size_.height() - matrix_size_.height()) / matrix_size_.height());}
152 if (!thickness_.has_value() || thickness_.value() != value) {
162 for (int32_t
y = 0; y < static_cast<int32_t>(dots_.size());
y++)
163 for (int32_t
x = 0; x < static_cast<int32_t>(dots_[
y].
size());
x++)
176 if (dots_[point.y()][point.x()] != on) {
177 dots_[point.y()][point.x()] = on;
192 for (
auto point : points)
211 for (int32_t
y = 0; y < static_cast<int32_t>(dots_.size());
y++) {
212 for (int32_t
x = 0; x < static_cast<int32_t>(dots_[
y].
size());
x++) {
230 int32_t
y = (
height() -
static_cast<int32_t
>(dots_.size())) /
static_cast<int32_t
>(dots_.size());
231 int32_t
x = (
width() -
static_cast<int32_t
>(dots_[point.y()].size())) /
static_cast<int32_t
>(dots_[point.y()].size());
241 bool show_back_dot_ =
true;
242 std::optional<drawing::color> back_dot_color_;
243 double back_dot_opacity_ = 0.95;
245 std::optional<int32_t> thickness_;
Contains xtd::argument_out_of_range_exception exception.
The exception that is thrown when one of the arguments provided to a method is out of range.
Definition: argument_out_of_range_exception.h:18
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:39
static color average(const color &color1, const color &color2, double weight, bool average_alpha)
Returns the weighted average color between the two given colors.
Definition: color.h:592
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition: graphics.h:48
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:48
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:25
int32_t width() const
Gets the horizontal component of this Size class.
Definition: size.h:67
int32_t height() const
Gets he vertical component of this Size Class.
Definition: size.h:57
Defines a xtd::drawing::brush of a single color. Brushes are used to fill graphics shapes,...
Definition: solid_brush.h:22
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Contains xtd::forms::control control.
Contains xtd::forms::dot_matrix_style enum class.
virtual void on_back_color_changed(const event_args &e)
Raises the control::back_color_changed event.
virtual void on_paint(paint_event_args &e)
Raises the control::paint event.
virtual void on_fore_color_changed(const event_args &e)
Raises the control::fore_color_changed event.
#define current_stack_frame_
Provides information about the current stack frame.
Definition: stack_frame.h:201
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::forms::segments enum class.
Contains xtd::drawing::solid_brush class.