linear gradient is now working.

This commit is contained in:
Creeper Lv
2026-01-24 01:14:58 +11:00
parent 14de38a329
commit 48e7e54db3
18 changed files with 58 additions and 58 deletions

View File

@@ -6,7 +6,7 @@ using System.Diagnostics;
namespace Progrart.Core.Graphics
{
public class RoundRectangle : BaseElement
public class RoundRectangle : BaseElement
{
float StrokeWidth;
@@ -43,7 +43,7 @@ namespace Progrart.Core.Graphics
}
}
public override void LoadProperties()
public override void LoadProperties(RenderContext context)
{
if (__object is not null)
{
@@ -71,15 +71,15 @@ namespace Progrart.Core.Graphics
}
if (__object.Get("Shader") is JsObject shaderObj)
shader = ProgrartConversion.ObtainFromJsObject(shaderObj);
shader = ProgrartConversion.ObtainFromJsObject(context, shaderObj);
}
}
public override void Render(RenderContext context)
{
base.Render(context);
LoadProperties();
LoadProperties(context);
SKPoint Position = context.TranslatePoint(Start);
SKPoint Size = context.TranslatePoint(this.Size);
SKPoint Size = context.TranslatePoint(this.Size);
float rx = context.TranslateSize(this.rx);
float ry = context.TranslateSize(this.ry);
Trace.WriteLine($"Draw Rectangle from {Position} to {Size} using {Color} with size of {StrokeWidth}.");