1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-26 20:28:50 -05:00

header cleanup

This commit is contained in:
epezent 2020-09-06 01:48:47 -05:00
parent 6f3f43c815
commit d23bd30a44
2 changed files with 33 additions and 41 deletions

View File

@ -208,7 +208,7 @@ struct ImPlotLimits {
struct ImPlotStyle { struct ImPlotStyle {
// item styling variables // item styling variables
float LineWeight; // = 1, item line weight in pixels float LineWeight; // = 1, item line weight in pixels
ImPlotMarker Marker; // = ImPlotMarker_None, marker specification int Marker; // = ImPlotMarker_None, marker specification
float MarkerSize; // = 4, marker size in pixels (roughly the marker's "radius") float MarkerSize; // = 4, marker size in pixels (roughly the marker's "radius")
float MarkerWeight; // = 1, outline weight of markers in pixels float MarkerWeight; // = 1, outline weight of markers in pixels
float FillAlpha; // = 1, alpha modifier applied to plot fills float FillAlpha; // = 1, alpha modifier applied to plot fills

View File

@ -579,21 +579,13 @@ struct ImPlotAxisScale
/// Two part time struct. /// Two part time struct.
struct ImPlotTime { struct ImPlotTime {
time_t S; time_t S; // second part
int Us; int Us; // microsecond part
ImPlotTime() { S = 0; Us = 0; } ImPlotTime() { S = 0; Us = 0; }
ImPlotTime(time_t s, int us = 0) { ImPlotTime(time_t s, int us = 0) { S = s + us / 1000000; Us = us % 1000000; }
S = s + us / 1000000; void RollOver() { S = S + Us / 1000000; Us = Us % 1000000; }
Us = us % 1000000;
}
void RollOver() {
S = S + Us / 1000000;
Us = Us % 1000000;
}
static ImPlotTime FromDouble(double t) {
return ImPlotTime((time_t)t, (int)(t * 1000000 - floor(t) * 1000000));
}
double ToDouble() const { return (double)S + (double)Us / 1000000.0; } double ToDouble() const { return (double)S + (double)Us / 1000000.0; }
static ImPlotTime FromDouble(double t) { return ImPlotTime((time_t)t, (int)(t * 1000000 - floor(t) * 1000000)); }
}; };
static inline ImPlotTime operator+(const ImPlotTime& lhs, const ImPlotTime& rhs) static inline ImPlotTime operator+(const ImPlotTime& lhs, const ImPlotTime& rhs)
@ -785,7 +777,7 @@ inline T OffsetAndStride(const T* data, int idx, int count, int offset, int stri
// Time Utils // Time Utils
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// NB: These functions only work if there is a currnet context because the // NB: These functions only work if there is a current ImPlotContext because the
// internal tm struct is owned by the context! // internal tm struct is owned by the context!
// Returns true if year is leap year (366 days long) // Returns true if year is leap year (366 days long)