34 Impl(
Element child,
float x,
float y)
37 void ComputeRequirement()
override {
38 NodeDecorator::ComputeRequirement();
39 requirement_.selection = Requirement::Selection::NORMAL;
41 Box& box = requirement_.selected_box;
42 box.
x_min = int(
float(requirement_.min_x) * x_);
43 box.
y_min = int(
float(requirement_.min_y) * y_);
44 box.
x_max = int(
float(requirement_.min_x) * x_);
45 box.
y_max = int(
float(requirement_.min_y) * y_);
54 return std::make_shared<Impl>(std::move(child), x, y);
73 Impl(
Element child,
int x,
int y)
76 void ComputeRequirement()
override {
77 NodeDecorator::ComputeRequirement();
78 requirement_.selection = Requirement::Selection::NORMAL;
80 Box& box = requirement_.selected_box;
93 return std::make_shared<Impl>(std::move(child), x, y);