mirror of
https://github.com/gwm17/implot.git
synced 2024-11-22 18:28:53 -05:00
remove imvec2 and implotpoint getters
This commit is contained in:
parent
bb844612eb
commit
eff5cee895
|
@ -238,6 +238,7 @@ struct GetterXsYs {
|
|||
Count = count;
|
||||
Offset = count ? ImPosMod(offset, count) : 0;
|
||||
Stride = stride;
|
||||
|
||||
}
|
||||
const T* Xs;
|
||||
const T* Ys;
|
||||
|
@ -281,38 +282,6 @@ struct GetterXsYRef {
|
|||
}
|
||||
};
|
||||
|
||||
// Interprets an array of ImVec2 points as ImPlotPoints
|
||||
struct GetterImVec2 {
|
||||
GetterImVec2(const ImVec2* data, int count, int offset) {
|
||||
Data = data;
|
||||
Count = count;
|
||||
Offset = count ? ImPosMod(offset, count) : 0;
|
||||
}
|
||||
inline ImPlotPoint operator()(int idx) const {
|
||||
idx = ImPosMod(Offset + idx, Count);
|
||||
return ImPlotPoint((double)Data[idx].x, (double)Data[idx].y);
|
||||
}
|
||||
const ImVec2* Data;
|
||||
int Count;
|
||||
int Offset;
|
||||
};
|
||||
|
||||
// Interprets an array of ImPlotPoints as ImPlotPoints (essentially a pass through)
|
||||
struct GetterImPlotPoint {
|
||||
GetterImPlotPoint(const ImPlotPoint* data, int count, int offset) {
|
||||
Data = data;
|
||||
Count = count;
|
||||
Offset = count ? ImPosMod(offset, count) : 0;
|
||||
}
|
||||
inline ImPlotPoint operator()(int idx) const {
|
||||
idx = ImPosMod(Offset + idx, Count);
|
||||
return Data[idx];
|
||||
}
|
||||
const ImPlotPoint* Data;
|
||||
int Count;
|
||||
int Offset;
|
||||
};
|
||||
|
||||
/// Interprets a user's function pointer as ImPlotPoints
|
||||
struct GetterFuncPtrImPlotPoint {
|
||||
GetterFuncPtrImPlotPoint(ImPlotPoint (*g)(void* data, int idx), void* d, int count, int offset) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user