SOURCE DUMP v1

This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit fb20299e9d
5 changed files with 768360 additions and 0 deletions

View file

@ -0,0 +1,15 @@
namespace Brutal.ImPlotApi
{
public abstract partial class ImPlot
{
public abstract partial class Internal : Brutal.ImPlotApi.ImPlot
{
public new abstract class PInvoke : Brutal.ImPlotApi.Internal.PInvoke;
}
}
}
namespace Brutal.ImPlotApi.Internal
{
public abstract partial class PInvoke : Brutal.ImPlotApi.ImPlot.PInvoke;
}

View file

@ -0,0 +1,6 @@
namespace Brutal.ImPlotApi;
public static partial class Constants
{
public static readonly float4 IMPLOT_AUTO_COL = new(0, 0, 0, -1);
}

View file

@ -0,0 +1,40 @@
namespace Brutal.ImPlotApi;
public partial class ImPlot
{
public static void PlotLine(
ImString labelId,
ReadOnlySpan<float2> values,
ImPlotLineFlags flags = default,
int offset = 0
)
{
unsafe
{
fixed (float2* valuesPtr = values)
{
var xs = (float*)valuesPtr;
var ys = xs + 1;
PlotLine(labelId, xs, ys, values.Length, flags, offset, sizeof(float2));
}
}
}
public static void PlotLine(
ImString labelId,
ReadOnlySpan<double2> values,
ImPlotLineFlags flags = default,
int offset = 0
)
{
unsafe
{
fixed (double2* valuesPtr = values)
{
var xs = (double*)valuesPtr;
var ys = xs + 1;
PlotLine(labelId, xs, ys, values.Length, flags, offset, sizeof(double2));
}
}
}
}

View file

@ -0,0 +1,23 @@
namespace Brutal.ImPlotApi;
public partial class ImPlot
{
public static void PlotShaded(
ImString labelId,
ReadOnlySpan<float2> values,
double yref = 0d,
ImPlotShadedFlags flags = default,
int offset = 0
)
{
unsafe
{
fixed (float2* valuesPtr = values)
{
var xsPtr = (float*)valuesPtr;
var ysPtr = xsPtr + 1;
PlotShaded(labelId, xsPtr, ysPtr, values.Length, yref, flags, offset, sizeof(float2));
}
}
}
}

View file

@ -0,0 +1 @@
global using tm = System.DateTime; // TODO: wrap C++ tm?