mirror of
https://github.com/gwm17/implot.git
synced 2024-11-22 18:28:53 -05:00
ImPlotAxis::WillRender(): return false if axis is disabled (#350)
This saves a few CPU cycles in SetupFinish(), which otherwise formats tick labels & spacing for disabled axes.
This commit is contained in:
parent
df4256c9e8
commit
196a0243c5
|
@ -796,7 +796,7 @@ struct ImPlotAxis
|
||||||
inline bool HasGridLines() const { return !ImHasFlag(Flags, ImPlotAxisFlags_NoGridLines); }
|
inline bool HasGridLines() const { return !ImHasFlag(Flags, ImPlotAxisFlags_NoGridLines); }
|
||||||
inline bool HasTickLabels() const { return !ImHasFlag(Flags, ImPlotAxisFlags_NoTickLabels); }
|
inline bool HasTickLabels() const { return !ImHasFlag(Flags, ImPlotAxisFlags_NoTickLabels); }
|
||||||
inline bool HasTickMarks() const { return !ImHasFlag(Flags, ImPlotAxisFlags_NoTickMarks); }
|
inline bool HasTickMarks() const { return !ImHasFlag(Flags, ImPlotAxisFlags_NoTickMarks); }
|
||||||
inline bool WillRender() const { return HasGridLines() || HasTickLabels() || HasTickMarks(); }
|
inline bool WillRender() const { return Enabled && (HasGridLines() || HasTickLabels() || HasTickMarks()); }
|
||||||
inline bool IsOpposite() const { return ImHasFlag(Flags, ImPlotAxisFlags_Opposite); }
|
inline bool IsOpposite() const { return ImHasFlag(Flags, ImPlotAxisFlags_Opposite); }
|
||||||
inline bool IsInverted() const { return ImHasFlag(Flags, ImPlotAxisFlags_Invert); }
|
inline bool IsInverted() const { return ImHasFlag(Flags, ImPlotAxisFlags_Invert); }
|
||||||
inline bool IsForeground() const { return ImHasFlag(Flags, ImPlotAxisFlags_Foreground); }
|
inline bool IsForeground() const { return ImHasFlag(Flags, ImPlotAxisFlags_Foreground); }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user