mirror of
https://github.com/gwm17/implot.git
synced 2024-11-23 02:38:53 -05:00
header cleanup
This commit is contained in:
parent
6f3f43c815
commit
d23bd30a44
48
implot.h
48
implot.h
|
@ -207,31 +207,31 @@ struct ImPlotLimits {
|
|||
// Plot style structure
|
||||
struct ImPlotStyle {
|
||||
// item styling variables
|
||||
float LineWeight; // = 1, item line weight in pixels
|
||||
ImPlotMarker Marker; // = ImPlotMarker_None, marker specification
|
||||
float MarkerSize; // = 4, marker size in pixels (roughly the marker's "radius")
|
||||
float MarkerWeight; // = 1, outline weight of markers in pixels
|
||||
float FillAlpha; // = 1, alpha modifier applied to plot fills
|
||||
float ErrorBarSize; // = 5, error bar whisker width in pixels
|
||||
float ErrorBarWeight; // = 1.5, error bar whisker weight in pixels
|
||||
float DigitalBitHeight; // = 8, digital channels bit height (at y = 1.0f) in pixels
|
||||
float DigitalBitGap; // = 4, digital channels bit padding gap in pixels
|
||||
float LineWeight; // = 1, item line weight in pixels
|
||||
int Marker; // = ImPlotMarker_None, marker specification
|
||||
float MarkerSize; // = 4, marker size in pixels (roughly the marker's "radius")
|
||||
float MarkerWeight; // = 1, outline weight of markers in pixels
|
||||
float FillAlpha; // = 1, alpha modifier applied to plot fills
|
||||
float ErrorBarSize; // = 5, error bar whisker width in pixels
|
||||
float ErrorBarWeight; // = 1.5, error bar whisker weight in pixels
|
||||
float DigitalBitHeight; // = 8, digital channels bit height (at y = 1.0f) in pixels
|
||||
float DigitalBitGap; // = 4, digital channels bit padding gap in pixels
|
||||
// plot styling variables
|
||||
bool AntiAliasedLines; // = false, enable global anti-aliasing on plot lines (overrides ImPlotFlags_AntiAliased)
|
||||
float PlotBorderSize; // = 1, line thickness of border around plot area
|
||||
float MinorAlpha; // = 0.25 alpha multiplier applied to minor axis grid lines
|
||||
ImVec2 MajorTickLen; // = 10,10 major tick lengths for X and Y axes
|
||||
ImVec2 MinorTickLen; // = 5,5 minor tick lengths for X and Y axes
|
||||
ImVec2 MajorTickSize; // = 1,1 line thickness of major ticks
|
||||
ImVec2 MinorTickSize; // = 1,1 line thickness of minor ticks
|
||||
ImVec2 MajorGridSize; // = 1,1 line thickness of major grid lines
|
||||
ImVec2 MinorGridSize; // = 1,1 line thickness of minor grid lines
|
||||
ImVec2 PlotPadding; // = 8,8 padding between widget frame and plot area and/or labels
|
||||
ImVec2 LabelPadding; // = 5,5 padding between axes labels, tick labels, and plot edge
|
||||
ImVec2 LegendPadding; // = 10,10 legend padding from top-left of plot
|
||||
ImVec2 InfoPadding; // = 10,10 padding between plot edge and interior info text
|
||||
ImVec2 PlotMinSize; // = 300,225 minimum size plot frame can be when shrunk
|
||||
ImVec4 Colors[ImPlotCol_COUNT]; // array of plot specific colors
|
||||
bool AntiAliasedLines; // = false, enable global anti-aliasing on plot lines (overrides ImPlotFlags_AntiAliased)
|
||||
float PlotBorderSize; // = 1, line thickness of border around plot area
|
||||
float MinorAlpha; // = 0.25 alpha multiplier applied to minor axis grid lines
|
||||
ImVec2 MajorTickLen; // = 10,10 major tick lengths for X and Y axes
|
||||
ImVec2 MinorTickLen; // = 5,5 minor tick lengths for X and Y axes
|
||||
ImVec2 MajorTickSize; // = 1,1 line thickness of major ticks
|
||||
ImVec2 MinorTickSize; // = 1,1 line thickness of minor ticks
|
||||
ImVec2 MajorGridSize; // = 1,1 line thickness of major grid lines
|
||||
ImVec2 MinorGridSize; // = 1,1 line thickness of minor grid lines
|
||||
ImVec2 PlotPadding; // = 8,8 padding between widget frame and plot area and/or labels
|
||||
ImVec2 LabelPadding; // = 5,5 padding between axes labels, tick labels, and plot edge
|
||||
ImVec2 LegendPadding; // = 10,10 legend padding from top-left of plot
|
||||
ImVec2 InfoPadding; // = 10,10 padding between plot edge and interior info text
|
||||
ImVec2 PlotMinSize; // = 300,225 minimum size plot frame can be when shrunk
|
||||
ImVec4 Colors[ImPlotCol_COUNT]; // array of plot specific colors
|
||||
ImPlotStyle();
|
||||
};
|
||||
|
||||
|
|
|
@ -183,8 +183,8 @@ enum ImPlotTimeUnit_ {
|
|||
};
|
||||
|
||||
enum ImPlotTimeFmt_ {
|
||||
ImPlotTimeFmt_Us, // .428552
|
||||
ImPlotTimeFmt_SUs, // :29.428552
|
||||
ImPlotTimeFmt_Us, // .428 552
|
||||
ImPlotTimeFmt_SUs, // :29.428 552
|
||||
ImPlotTimeFmt_SMs, // :29.428
|
||||
ImPlotTimeFmt_S, // :29
|
||||
ImPlotTimeFmt_HrMinS, // 7:21:29pm
|
||||
|
@ -579,21 +579,13 @@ struct ImPlotAxisScale
|
|||
|
||||
/// Two part time struct.
|
||||
struct ImPlotTime {
|
||||
time_t S;
|
||||
int Us;
|
||||
time_t S; // second part
|
||||
int Us; // microsecond part
|
||||
ImPlotTime() { S = 0; Us = 0; }
|
||||
ImPlotTime(time_t s, int us = 0) {
|
||||
S = s + 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));
|
||||
}
|
||||
ImPlotTime(time_t s, int us = 0) { S = s + us / 1000000; Us = us % 1000000; }
|
||||
void RollOver() { S = S + Us / 1000000; Us = Us % 1000000; }
|
||||
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)
|
||||
|
@ -785,7 +777,7 @@ inline T OffsetAndStride(const T* data, int idx, int count, int offset, int stri
|
|||
// 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!
|
||||
|
||||
// Returns true if year is leap year (366 days long)
|
||||
|
|
Loading…
Reference in New Issue
Block a user