Don't draw many illegible plot points.

This commit is contained in:
Bartosz Taudul 2019-03-22 20:11:24 +01:00
parent e6baee2bf9
commit 532bf19efa

View File

@ -3922,6 +3922,12 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
}
pdqsort_branchless( tmpvec, dst );
if( rsz > MaxPoints )
{
draw->AddLine( wpos + ImVec2( x1, offset + PlotHeight - ( tmpvec[0] - min ) * revrange * PlotHeight ), wpos + ImVec2( x1, offset + PlotHeight - ( dst[-1] - min ) * revrange * PlotHeight ), 0xFF44DDDD, 4.f );
}
else
{
draw->AddLine( wpos + ImVec2( x1, offset + PlotHeight - ( tmpvec[0] - min ) * revrange * PlotHeight ), wpos + ImVec2( x1, offset + PlotHeight - ( dst[-1] - min ) * revrange * PlotHeight ), 0xFF44DDDD );
auto vit = tmpvec;
@ -3939,6 +3945,7 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl
}
vit = vrange;
}
}
prevy = it - 1;
}