linear gradient is now working.
This commit is contained in:
@@ -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}.");
|
||||
|
||||
Reference in New Issue
Block a user