1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-30 05:58:52 -05:00

rearrangement of bools to take less space in a struct

This commit is contained in:
SergeyN 2020-05-13 03:45:37 +02:00
parent ff5d61756f
commit 1c1b5f965d

View File

@ -243,9 +243,9 @@ struct ImTick {
} }
double PlotPos; double PlotPos;
float PixelPos; float PixelPos;
bool Major;
ImVec2 Size; ImVec2 Size;
int TextOffset; int TextOffset;
bool Major;
bool RenderLabel; bool RenderLabel;
}; };
@ -294,13 +294,13 @@ struct ImPlotState {
ImPool<ImPlotItem> Items; ImPool<ImPlotItem> Items;
ImRect BB_Legend; ImRect BB_Legend;
bool Selecting;
ImVec2 SelectStart; ImVec2 SelectStart;
bool Selecting;
bool Querying; bool Querying;
bool Queried; bool Queried;
bool DraggingQuery;
ImVec2 QueryStart; ImVec2 QueryStart;
ImRect QueryRect; // relative to BB_grid!! ImRect QueryRect; // relative to BB_grid!!
bool DraggingQuery;
ImPlotAxis XAxis; ImPlotAxis XAxis;
ImPlotAxis YAxis[MAX_Y_AXES]; ImPlotAxis YAxis[MAX_Y_AXES];
@ -339,9 +339,6 @@ struct ImPlotContext {
ImRect BB_Frame; ImRect BB_Frame;
ImRect BB_Canvas; ImRect BB_Canvas;
ImRect BB_Grid; ImRect BB_Grid;
// Hover states
bool Hov_Frame;
bool Hov_Grid;
// Cached Colors // Cached Colors
ImU32 Col_Frame, Col_Bg, Col_Border, ImU32 Col_Frame, Col_Bg, Col_Border,
Col_Txt, Col_TxtDis, Col_Txt, Col_TxtDis,
@ -359,6 +356,7 @@ struct ImPlotContext {
float AxisLabelReference[MAX_Y_AXES]; float AxisLabelReference[MAX_Y_AXES];
// Transformation cache // Transformation cache
ImRect PixelRange[MAX_Y_AXES]; ImRect PixelRange[MAX_Y_AXES];
// linear scale (slope) // linear scale (slope)
float Mx; float Mx;
float My[MAX_Y_AXES]; float My[MAX_Y_AXES];
@ -369,10 +367,15 @@ struct ImPlotContext {
// Data extents // Data extents
ImPlotRange ExtentsX; ImPlotRange ExtentsX;
ImPlotRange ExtentsY[MAX_Y_AXES]; ImPlotRange ExtentsY[MAX_Y_AXES];
int VisibleItemCount;
bool FitThisFrame; bool FitX; bool FitThisFrame; bool FitX;
bool FitY[MAX_Y_AXES] = {}; bool FitY[MAX_Y_AXES] = {};
int VisibleItemCount;
// Hover states
bool Hov_Frame;
bool Hov_Grid;
// Render flags // Render flags
bool RenderX, RenderY[MAX_Y_AXES]; bool RenderX, RenderY[MAX_Y_AXES];
// Mouse pos // Mouse pos