mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Check if plot is in drawing range.
This commit is contained in:
parent
0e94ed8fc6
commit
3780c47bb6
@ -23,12 +23,13 @@ bool View::DrawPlot( PlotData& plot, double pxns, int& offset, const ImVec2& wpo
|
|||||||
const auto nspx = 1.0 / pxns;
|
const auto nspx = 1.0 / pxns;
|
||||||
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );
|
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );
|
||||||
|
|
||||||
|
auto& vec = plot.data;
|
||||||
|
vec.ensure_sorted();
|
||||||
|
if( vec.front().time.Val() > m_vd.zvEnd || vec.back().time.Val() < m_vd.zvStart ) return false;
|
||||||
|
|
||||||
auto yPos = wpos.y + offset;
|
auto yPos = wpos.y + offset;
|
||||||
if( yPos + PlotHeight >= yMin && yPos <= yMax )
|
if( yPos + PlotHeight >= yMin && yPos <= yMax )
|
||||||
{
|
{
|
||||||
auto& vec = plot.data;
|
|
||||||
vec.ensure_sorted();
|
|
||||||
|
|
||||||
const auto color = GetPlotColor( plot, m_worker );
|
const auto color = GetPlotColor( plot, m_worker );
|
||||||
const auto bg = 0x22000000 | ( DarkenColorMore( color ) & 0xFFFFFF );
|
const auto bg = 0x22000000 | ( DarkenColorMore( color ) & 0xFFFFFF );
|
||||||
const auto fill = 0x22000000 | ( DarkenColor( color ) & 0xFFFFFF );
|
const auto fill = 0x22000000 | ( DarkenColor( color ) & 0xFFFFFF );
|
||||||
|
Loading…
Reference in New Issue
Block a user