Merged
Conversation
…otSpec Upstream implot v1.0 (https://github.com/epezent/implot/releases/tag/v1.0) is a breaking release that replaces per-call (flags, offset, stride) args on every Plot* function with a single ImPlotSpec value-type, and removes the SetNextX-style helpers. The headline new feature is per-index colors and marker sizes via ImPlotSpec arrays (PR epezent/implot#672). Binding changes: - Advance include/implot submodule 1f7a8c0 -> v1.0 (524f9fc) - Regenerate ast-implot.json - Add ImPlotSpec: scalar @BindingField props plus hand-written native setters for the 5 array-pointer fields (LineColors, FillColors, MarkerSizes, MarkerLineColors, MarkerFillColors). Backing buffers are owned in native memory (ImGui::MemAlloc) and freed on destroy() or on reassignment. - Rewrite every Plot* signature: the (flags, offset, stride) tail is replaced by `@OptArg @ArgValue(callPrefix="*") ImPlotSpec spec`, which marshals to `*reinterpret_cast<ImPlotSpec*>(spec.ptr)` at the C++ call site. Progressive-cutoff overloads still expose spec-less variants (relying on C++ default `= ImPlotSpec()`). - Add PlotPolygon, PlotBubbles, NextMarker (new in v1.0) - Remove SetNextLineStyle / SetNextFillStyle / SetNextMarkerStyle / SetNextErrorBarStyle (obsoleted in v1.0 -- configure ImPlotSpec instead) - Trim ImPlotStyle: drop LineWeight/Marker/MarkerSize/MarkerWeight/ FillAlpha/ErrorBarSize/ErrorBarWeight/DigitalBitHeight/ DigitalBitGap (all moved into ImPlotSpec); add new DigitalPadding/DigitalSpacing - Flag enums shift accordingly: ImPlotMarker_None is now -2 (ImPlotMarker_Auto = -1 is new); ImPlotCol drops the 5 per-item entries (Line/Fill/MarkerOutline/MarkerFill/ErrorBar); ImPlotStyleVar drops the 9 matching vars; ImPlotLegendFlags gains Reverse; ImPlotPieChartFlags gains Exploding + NoSliceBorder; new ImPlotBubblesFlags / ImPlotPolygonFlags enums are AST-driven. Example: ExampleImPlot grows a "Per-Index Colors (v1.0 PR #672)" plot showing rainbow LineColors + MarkerFillColors + ramping MarkerSizes. Note: this is source-incompatible for any caller of the affected Plot* methods or the removed SetNextX helpers. The incompatibility mirrors upstream implot's own v1.0 break and is the minimum footprint to expose the new ImPlotSpec-based API. Dear ImGui submodule is intentionally left at v1.90.9-docking. implot v1.0 guards its 1.92-era uses (ImTextureRef, ImFontBaked, CalcFontSize) behind `#ifdef IMGUI_HAS_TEXTURES` / `IMGUI_VERSION_NUM` and compiles cleanly against 1.90.9. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirror the convention used by plot methods (plotStairsV, plotScatterV, etc.) which accept a separate length parameter, letting callers pass a backing array larger than the logical count without having to Arrays.copyOf to an exactly-sized array per frame. Added (arr, len) overloads to: setLineColors setFillColors setMarkerSizes setMarkerLineColors setMarkerFillColors Motivation: when plotting bubble markers with per-point sizes that change every frame (trade prints, live signals), the existing setMarkerSizes(float[]) required an exactly-sized array each call, defeating any attempt to reuse a growing scratch buffer. The new overload lets callers keep a single float[] sized to capacity and pass the current logical length.
f248dd0 to
025bff2
Compare
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream implot v1.0 (https://github.com/epezent/implot/releases/tag/v1.0) is a breaking release that replaces per-call (flags, offset, stride) args on every Plot* function with a single ImPlotSpec value-type, and removes the SetNextX-style helpers. The headline new feature is per-index colors and marker sizes via ImPlotSpec arrays (PR epezent/implot#672).
Binding changes:
@OptArg @ArgValue(callPrefix="*") ImPlotSpec spec, which marshals to*reinterpret_cast<ImPlotSpec*>(spec.ptr)at the C++ call site. Progressive-cutoff overloads still expose spec-less variants (relying on C++ default= ImPlotSpec()).Example: ExampleImPlot grows a "Per-Index Colors (v1.0 PR #672)" plot showing rainbow LineColors + MarkerFillColors + ramping MarkerSizes.
Note: this is source-incompatible for any caller of the affected Plot* methods or the removed SetNextX helpers. The incompatibility mirrors upstream implot's own v1.0 break and is the minimum footprint to expose the new ImPlotSpec-based API.
Dear ImGui submodule is intentionally left at v1.90.9-docking. implot v1.0 guards its 1.92-era uses (ImTextureRef, ImFontBaked, CalcFontSize) behind
#ifdef IMGUI_HAS_TEXTURES/IMGUI_VERSION_NUMand compiles cleanly against 1.90.9.Type of change