| 6151 | } |
| 6152 | |
| 6153 | ImDrawFlags ImGui::CalcRoundingFlagsForRectInRect(const ImRect& r_in, const ImRect& r_outer, float threshold) |
| 6154 | { |
| 6155 | bool round_l = r_in.Min.x <= r_outer.Min.x + threshold; |
| 6156 | bool round_r = r_in.Max.x >= r_outer.Max.x - threshold; |
| 6157 | bool round_t = r_in.Min.y <= r_outer.Min.y + threshold; |
| 6158 | bool round_b = r_in.Max.y >= r_outer.Max.y - threshold; |
| 6159 | return ImDrawFlags_RoundCornersNone |
| 6160 | | ((round_t && round_l) ? ImDrawFlags_RoundCornersTopLeft : 0) | ((round_t && round_r) ? ImDrawFlags_RoundCornersTopRight : 0) |
| 6161 | | ((round_b && round_l) ? ImDrawFlags_RoundCornersBottomLeft : 0) | ((round_b && round_r) ? ImDrawFlags_RoundCornersBottomRight : 0); |
| 6162 | } |
| 6163 | |
| 6164 | // Helper for ColorPicker4() |
| 6165 | // NB: This is rather brittle and will show artifact when rounding this enabled if rounded corners overlap multiple cells. Caller currently responsible for avoiding that. |
nothing calls this directly
no outgoing calls
no test coverage detected