1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Fix striped rect early exit test.

This commit is contained in:
Bartosz Taudul
2022-06-29 01:39:06 +02:00
parent e6c54600f1
commit dd6933fe32
2 changed files with 9 additions and 6 deletions
+4 -1
View File
@@ -194,7 +194,7 @@ static const ImVec4 SyntaxColorsDimmed[] = {
return res;
}
[[maybe_unused]] static void DrawStripedRect( ImDrawList* draw, double x0, double y0, double x1, double y1, double sw, uint32_t color, bool fix_stripes_in_screen_space, bool inverted )
[[maybe_unused]] static void DrawStripedRect( ImDrawList* draw, const ImVec2& wpos, double x0, double y0, double x1, double y1, double sw, uint32_t color, bool fix_stripes_in_screen_space, bool inverted )
{
assert( x1 >= x0 );
assert( y1 >= y0 );
@@ -209,6 +209,9 @@ static const ImVec4 SyntaxColorsDimmed[] = {
x1 = std::min<double>( ww, x1 );
}
x0 += wpos.x;
x1 += wpos.x;
ImGui::PushClipRect( ImVec2( x0, y0 ), ImVec2( x1, y1 ), true );
const auto rw = x1 - x0;