Hi!
I would like to implement a feature to change the plotted color for each point in the dataset, something like this.
I plan on doing it this way:
- Defining a
ColorGetter struct with function: ImU32 operator()(ImPlotCol col, int idx), this will be the base case, constant colors from ImPlotNextItemData
- Defining a
ColorGetterFuncPtr struct where an user defined function is passed in and called, GetterFuncPtr style
Renderer* structs will take a templated ColorGetter as an argument instead of ImU32 col
- User facing functions will use
ColorGetter, but a new version of them will use ColorGetterFuncPtr
Is this the way of doing this? Will this get merged if I implement it?
Hi!
I would like to implement a feature to change the plotted color for each point in the dataset, something like this.
I plan on doing it this way:
ColorGetterstruct with function:ImU32 operator()(ImPlotCol col, int idx), this will be the base case, constant colors fromImPlotNextItemDataColorGetterFuncPtrstruct where an user defined function is passed in and called,GetterFuncPtrstyleRenderer*structs will take a templatedColorGetteras an argument instead ofImU32 colColorGetter, but a new version of them will useColorGetterFuncPtrIs this the way of doing this? Will this get merged if I implement it?