Added plot style colors and some misc utils. See comments.
- Also exposed the sys crate's ImPlotRange, ImPlotLimits and ImPlotPoint to the user as well as changing the limit-setting interface to using those. I'm not super sure about doing this yet though, because it is more verbose for no real reason to the user and for the purposes of the abstraction it may be better to add facade types anyway. - There is no protection against calling things like `is_hovered` from outside a plot. Will need to think about how to make this impossible by design - we could for example pass an object to Plot's closure that has these methods, and that object is not created anywhere else.
This commit is contained in:
parent
90f7dba1a7
commit
a43a58d819
3 changed files with 163 additions and 25 deletions
31
README.md
31
README.md
|
@ -12,13 +12,20 @@ https://github.com/Gekkio/imgui-rs/pull/339 makes it into a release.
|
|||
|
||||
The sys crate compiles implot, so a C++ compiler will also be required.
|
||||
|
||||
## Design approach
|
||||
This repo tries to follow the approaches and style used in `imgui-rs` somewhat closely,
|
||||
because implot is to be used within imgui programs, and hence keeping the interfaces
|
||||
and design philosophies close should make it easier to do that.
|
||||
|
||||
If you spot any design inconsistencies or papercuts, feel free to open an issue.
|
||||
|
||||
## Status
|
||||
Currently a work in progress. The author is open to collaboration, if you'd like to
|
||||
help, feel free to reach out via a Github issue.
|
||||
|
||||
At this point, raw bindings are working in implot-sys, and more idiomatic interfaces
|
||||
for plot creation as well as adding lines to plots are implemented. Everything else
|
||||
is still being built.
|
||||
for plot creation as well a subset of the functionality for plots are implemented.
|
||||
See below for an overview of the progress.
|
||||
|
||||
- [x] "BeginPlot"
|
||||
- [x] Basic hello world
|
||||
|
@ -37,23 +44,23 @@ is still being built.
|
|||
- [ ] Pie chart
|
||||
- [ ] Digital data
|
||||
- [ ] Plot customization
|
||||
- [ ] Enums
|
||||
- [x] Axis flags
|
||||
- [ ] Markers
|
||||
- [ ] Styling colors
|
||||
- [ ] Styling variables
|
||||
- [ ] Colormaps
|
||||
- [x] Axis flags
|
||||
- [x] Styling colors
|
||||
- [ ] Markers
|
||||
- [ ] Styling variables
|
||||
- [ ] Colormaps
|
||||
- [ ] Plot querying
|
||||
- [ ] is hovered
|
||||
- [ ] mouse position
|
||||
- [ ] mouse limits
|
||||
- [x] is hovered
|
||||
- [x] mouse position in plot
|
||||
- [x] plot limits
|
||||
- [ ] is queried
|
||||
- [ ] GetPlotQuery
|
||||
- [ ] Utils
|
||||
- [x] Plot limit setting
|
||||
- [ ] imgui-rs style safe push/pop stacks
|
||||
- [ ] Plot tick setting
|
||||
- [ ] Plot y axis setting for subsequent elements
|
||||
- [ ] plot position and size reading
|
||||
- [ ] Plot position and size reading
|
||||
- [ ] Pixel to plot position
|
||||
- [ ] Plot to pixel position
|
||||
- [ ] Push/pop plotclip rect (?)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue