mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Delay rounding h/2.
This commit is contained in:
parent
d80e7cc025
commit
06cd57fe6e
@ -1801,14 +1801,13 @@ static uint32_t DarkenColor( uint32_t color )
|
||||
static void DrawZigZag( ImDrawList* draw, const ImVec2& wpos, double start, double end, double h, uint32_t color, float thickness = 1.f )
|
||||
{
|
||||
const auto spanSz = end - start;
|
||||
const auto h05 = round( h * 0.5 );
|
||||
|
||||
if( spanSz <= h05 )
|
||||
if( spanSz <= h * 0.5 )
|
||||
{
|
||||
draw->AddLine( wpos + ImVec2( start, 0 ), wpos + ImVec2( start + spanSz, round( -spanSz ) ), color, thickness );
|
||||
return;
|
||||
}
|
||||
|
||||
const auto h05 = round( h * 0.5 );
|
||||
draw->AddLine( wpos + ImVec2( start, 0 ), wpos + ImVec2( start + h05, -h05 ), color, thickness );
|
||||
start += h05;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user