mirror of
https://github.com/gwm17/implot.git
synced 2024-11-13 22:48:50 -05:00
revert OffsetAndStride
This commit is contained in:
parent
51930a5ae6
commit
bffd448207
2
implot.h
2
implot.h
|
@ -537,6 +537,8 @@ template <typename T> IMPLOT_API void PlotBarsH(const char* label_id, const T* v
|
||||||
template <typename T> IMPLOT_API void PlotBarsH(const char* label_id, const T* xs, const T* ys, int count, double height, int offset=0, int stride=sizeof(T));
|
template <typename T> IMPLOT_API void PlotBarsH(const char* label_id, const T* xs, const T* ys, int count, double height, int offset=0, int stride=sizeof(T));
|
||||||
IMPLOT_API void PlotBarsHG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, double height, int offset=0);
|
IMPLOT_API void PlotBarsHG(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, double height, int offset=0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
|
// Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.
|
||||||
template <typename T> IMPLOT_API void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, int offset=0, int stride=sizeof(T));
|
template <typename T> IMPLOT_API void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* err, int count, int offset=0, int stride=sizeof(T));
|
||||||
template <typename T> IMPLOT_API void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, int offset=0, int stride=sizeof(T));
|
template <typename T> IMPLOT_API void PlotErrorBars(const char* label_id, const T* xs, const T* ys, const T* neg, const T* pos, int count, int offset=0, int stride=sizeof(T));
|
||||||
|
|
|
@ -1270,7 +1270,7 @@ void FillRange(ImVector<T>& buffer, int n, T vmin, T vmax) {
|
||||||
// Offsets and strides a data buffer
|
// Offsets and strides a data buffer
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static inline T OffsetAndStride(const T* data, int idx, int , int , int stride) {
|
static inline T OffsetAndStride(const T* data, int idx, int , int , int stride) {
|
||||||
// idx = ImPosMod(offset + idx, count);
|
idx = ImPosMod(offset + idx, count);
|
||||||
return *(const T*)(const void*)((const unsigned char*)data + (size_t)idx * stride);
|
return *(const T*)(const void*)((const unsigned char*)data + (size_t)idx * stride);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user