packages feed

dear-imgui-raw-implot-1.0.0: README.md

# dear-imgui-raw-implot

Raw FFI bindings to [implot], GPU-accelerated plotting for Dear ImGui.

```haskell
{-# LANGUAGE BlockArguments #-}

import DearImGui.Raw.ImPlot qualified as ImPlot
import DearImGui.Raw.ImPlot.Spec qualified as Spec
import Foreign.C.String (withCString)
import Foreign.Marshal.Array (withArrayLen)
import Foreign.Storable (peek)

plotSine :: IO ()
plotSine =
  withCString "sin" \label ->
    withArrayLen [sin (x / 10) | x <- [0 .. 99]] \count values ->
      Spec.withDefault \spec ->
        ImPlot.plotLine_F32 label values (fromIntegral count) 1 0 =<< peek spec
```

[implot]: https://github.com/epezent/implot