@@ -261,7 +261,7 @@ enum ImPlotTimeFmt_ { // default [ 24 Hour Clock ]
261
261
ImPlotTimeFmt_SUs, // :29.428 552 [ :29.428 552 ]
262
262
ImPlotTimeFmt_SMs, // :29.428 [ :29.428 ]
263
263
ImPlotTimeFmt_S, // :29 [ :29 ]
264
- ImPlotTimeFmt_MinSMs, // 21:29.428 [ 21:29.428 ]
264
+ ImPlotTimeFmt_MinSMs, // 21:29.428 [ 21:29.428 ]
265
265
ImPlotTimeFmt_HrMinSMs, // 7:21:29.428pm [ 19:21:29.428 ]
266
266
ImPlotTimeFmt_HrMinS, // 7:21:29pm [ 19:21:29 ]
267
267
ImPlotTimeFmt_HrMin, // 7:21pm [ 19:21 ]
@@ -437,6 +437,11 @@ struct ImPlotAnnotation {
437
437
ImU32 ColorFg;
438
438
int TextOffset;
439
439
bool Clamp;
440
+ ImPlotAnnotation () {
441
+ ColorBg = ColorFg = 0 ;
442
+ TextOffset = 0 ;
443
+ Clamp = false ;
444
+ }
440
445
};
441
446
442
447
// Collection of plot labels
@@ -540,6 +545,7 @@ struct ImPlotTick
540
545
int Idx;
541
546
542
547
ImPlotTick (double value, bool major, int level, bool show_label) {
548
+ PixelPos = 0 ;
543
549
PlotPos = value;
544
550
Major = major;
545
551
ShowLabel = show_label;
@@ -666,6 +672,7 @@ struct ImPlotAxis
666
672
bool Held;
667
673
668
674
ImPlotAxis () {
675
+ ID = 0 ;
669
676
Flags = PreviousFlags = ImPlotAxisFlags_None;
670
677
Range.Min = 0 ;
671
678
Range.Max = 1 ;
@@ -764,7 +771,7 @@ struct ImPlotAxis
764
771
765
772
inline void SetAspect (double unit_per_pix) {
766
773
double new_size = unit_per_pix * PixelSize ();
767
- double delta = (new_size - Range.Size ()) * 0 .5f ;
774
+ double delta = (new_size - Range.Size ()) * 0.5 ;
768
775
if (IsLocked ())
769
776
return ;
770
777
else if (IsLockedMin () && !IsLockedMax ())
@@ -793,7 +800,7 @@ struct ImPlotAxis
793
800
Range.Max += delta;
794
801
}
795
802
if (z > ConstraintZoom.Max ) {
796
- double delta = (z - ConstraintZoom.Max ) * 0 .5f ;
803
+ double delta = (z - ConstraintZoom.Max ) * 0.5 ;
797
804
Range.Min += delta;
798
805
Range.Max -= delta;
799
806
}
@@ -945,6 +952,7 @@ struct ImPlotItem
945
952
946
953
ImPlotItem () {
947
954
ID = 0 ;
955
+ Color = IM_COL32_WHITE;
948
956
NameOffset = -1 ;
949
957
Show = true ;
950
958
SeenThisFrame = false ;
@@ -986,7 +994,7 @@ struct ImPlotItemGroup
986
994
ImPool<ImPlotItem> ItemPool;
987
995
int ColormapIdx;
988
996
989
- ImPlotItemGroup () { ColormapIdx = 0 ; }
997
+ ImPlotItemGroup () { ID = 0 ; ColormapIdx = 0 ; }
990
998
991
999
int GetItemCount () const { return ItemPool.GetBufSize (); }
992
1000
ImGuiID GetItemID (const char * label_id) { return ImGui::GetID (label_id); /* GetIDWithSeed */ }
@@ -1129,12 +1137,16 @@ struct ImPlotSubplot {
1129
1137
bool HasTitle;
1130
1138
1131
1139
ImPlotSubplot () {
1132
- Rows = Cols = CurrentIdx = 0 ;
1133
- FrameHovered = false ;
1134
- Items.Legend .Location = ImPlotLocation_North;
1135
- Items.Legend .Flags = ImPlotLegendFlags_Horizontal|ImPlotLegendFlags_Outside;
1136
- Items.Legend .CanGoInside = false ;
1137
- HasTitle = false ;
1140
+ ID = 0 ;
1141
+ Flags = PreviousFlags = ImPlotSubplotFlags_None;
1142
+ Rows = Cols = CurrentIdx = 0 ;
1143
+ FrameHovered = false ;
1144
+ Items.Legend .Location = ImPlotLocation_North;
1145
+ Items.Legend .Flags = ImPlotLegendFlags_Horizontal|ImPlotLegendFlags_Outside;
1146
+ Items.Legend .CanGoInside = false ;
1147
+ TempSizes[0 ] = TempSizes[1 ] = 0 ;
1148
+ FrameHovered = false ;
1149
+ HasTitle = false ;
1138
1150
}
1139
1151
};
1140
1152
0 commit comments