diff --git a/libs/ui/source/color_view.cpp b/libs/ui/source/color_view.cpp index 6d9111b8..5ece909b 100644 --- a/libs/ui/source/color_view.cpp +++ b/libs/ui/source/color_view.cpp @@ -29,7 +29,28 @@ namespace psemek::ui box[1] = geom::expand(geom::interval::singleton(box[1].center()), box[0].length() / 2.f); } - p.draw_rect(box, color_); + if (color_[3] != 255) + { + p.draw_rect(box, {255, 255, 255, 255}); + + int const n = 4; + geom::vector d = box.dimensions() / (n * 1.f); + + for (int x = 0; x < n; ++x) + { + for (int y = 0; y < n; ++y) + { + if ((x + y) % 2 == 0) continue; + + auto origin = box.corner(0.f, 0.f) + geom::pointwise_mult(d, {x * 1.f, y}); + + p.draw_rect(geom::span(origin, origin + d), {191, 191, 191, 255}); + } + } + } + + if (color_[3] != 0) + p.draw_rect(box, color_); } }