31 Impl(
Element child,
float x,
float y)
34 void ComputeRequirement()
override {
35 NodeDecorator::ComputeRequirement();
36 requirement_.selection = Requirement::Selection::NORMAL;
38 Box& box = requirement_.selected_box;
39 box.
x_min = (int)((
float)requirement_.min_x * x_);
40 box.
y_min = (int)((
float)requirement_.min_y * y_);
41 box.
x_max = (int)((
float)requirement_.min_x * x_);
42 box.
y_max = (int)((
float)requirement_.min_y * y_);
51 return std::make_shared<Impl>(std::move(child), x, y);
70 Impl(
Element child,
int x,
int y)
73 void ComputeRequirement()
override {
74 NodeDecorator::ComputeRequirement();
75 requirement_.selection = Requirement::Selection::NORMAL;
77 Box& box = requirement_.selected_box;
90 return std::make_shared<Impl>(std::move(child), x, y);