mirror of
https://github.com/gwm17/implot.git
synced 2025-01-31 03:18:51 -05:00
FitPoint on x
This commit is contained in:
parent
99319d9fa7
commit
2a7430dae8
10
implot.cpp
10
implot.cpp
|
@ -2562,7 +2562,15 @@ inline void PlotDigitalEx(const char* label_id, Getter getter, int count, int of
|
||||||
|
|
||||||
if (gp.Style.Colors[ImPlotCol_Line].w != -1)
|
if (gp.Style.Colors[ImPlotCol_Line].w != -1)
|
||||||
item->Color = gp.Style.Colors[ImPlotCol_Line];
|
item->Color = gp.Style.Colors[ImPlotCol_Line];
|
||||||
|
|
||||||
|
// find data extents
|
||||||
|
if (gp.FitThisFrame) {
|
||||||
|
for (int i = 0; i < count; ++i) {
|
||||||
|
ImVec2 p = getter(i);
|
||||||
|
FitPoint(ImVec2(p.x, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::PushClipRect(gp.BB_Grid.Min, gp.BB_Grid.Max, true);
|
ImGui::PushClipRect(gp.BB_Grid.Min, gp.BB_Grid.Max, true);
|
||||||
bool cull = HasFlag(gp.CurrentPlot->Flags, ImPlotFlags_CullData);
|
bool cull = HasFlag(gp.CurrentPlot->Flags, ImPlotFlags_CullData);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user