6namespace qml_material::sg::mesh
18 float outer_x, outer_y;
19 float inner_x, inner_y;
28void for_each_rrect_corner(
const QRectF& bounds, QVector4D radius,
float inset, Fn&& fn) {
29 const float L = bounds.left();
30 const float R = bounds.right();
31 const float T = bounds.top();
32 const float B = bounds.bottom();
40 { 0, L, T, -1.0f, -1.0f },
41 { 1, R, T, +1.0f, -1.0f },
42 { 2, L, B, -1.0f, +1.0f },
43 { 3, R, B, +1.0f, +1.0f },
46 for (
auto const& s : sides) {
47 const float r = radius[s.idx];
49 .corner_index = s.idx,
52 .inner_x = s.ox - s.sx * inset,
53 .inner_y = s.oy - s.sy * inset,
54 .arc_x = s.ox - s.sx * r,
55 .arc_y = s.oy - s.sy * r,
Definition corner_fan.hpp:16