mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-28 05:58:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
5 changed files with 784842 additions and 0 deletions
15
Brutal.ImPlot/Manual/ImPlot.Internal.cs
Normal file
15
Brutal.ImPlot/Manual/ImPlot.Internal.cs
Normal 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;
|
||||
}
|
||||
6
Brutal.ImPlot/Manual/Macros.manual.cs
Normal file
6
Brutal.ImPlot/Manual/Macros.manual.cs
Normal 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);
|
||||
}
|
||||
40
Brutal.ImPlot/Manual/PlotLine.manual.cs
Normal file
40
Brutal.ImPlot/Manual/PlotLine.manual.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
23
Brutal.ImPlot/Manual/PlotShaded.manual.cs
Normal file
23
Brutal.ImPlot/Manual/PlotShaded.manual.cs
Normal 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
Brutal.ImPlot/Manual/TODO.cs
Normal file
1
Brutal.ImPlot/Manual/TODO.cs
Normal file
|
|
@ -0,0 +1 @@
|
|||
global using tm = System.DateTime; // TODO: wrap C++ tm?
|
||||
Loading…
Reference in a new issue