Working on the progrart functions.

This commit is contained in:
Creeper Lv
2025-12-25 23:00:26 +11:00
parent 2d2fec0bed
commit 18b7b00fc3
17 changed files with 400 additions and 96 deletions

View File

@@ -11,7 +11,10 @@ namespace Progrart.Core
{
this.DrawingCore = core;
}
public SKPoint TranslatePoint(float x, float y)
{
return new SKPoint(x * DrawingCore.Width, y * DrawingCore.Height);
}
public RenderContext(int W, int H)
{
DrawingCore = new PrimitiveDrawingCore(W, H);
@@ -22,9 +25,13 @@ namespace Progrart.Core
internal bool isDisposed = false;
SKSurface surface;
SKImageInfo info;
public readonly int Width;
public readonly int Height;
public SKCanvas canvas { get; }
public PrimitiveDrawingCore(int W, int H)
{
Width = W;
Height = H;
info = new SKImageInfo(W, H);
surface = SKSurface.Create(info);
canvas = surface.Canvas;
@@ -38,6 +45,10 @@ namespace Progrart.Core
}
}
public class ExecuteArguments
{
public Dictionary<string, string> data = new Dictionary<string, string>();
}
[Serializable]
public class RenderConfig
{