mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
31 lines
771 B
C#
31 lines
771 B
C#
using Artemis.Storage.Entities.Profile;
|
|
using SkiaSharp;
|
|
|
|
namespace Artemis.Core.Models.Profile.LayerShapes
|
|
{
|
|
public class Rectangle : LayerShape
|
|
{
|
|
public Rectangle(Layer layer) : base(layer)
|
|
{
|
|
}
|
|
|
|
internal Rectangle(Layer layer, ShapeEntity shapeEntity) : base(layer, shapeEntity)
|
|
{
|
|
}
|
|
|
|
public override void CalculateRenderProperties()
|
|
{
|
|
RenderRectangle = GetUnscaledRectangle();
|
|
|
|
var path = new SKPath();
|
|
path.AddRect(RenderRectangle);
|
|
RenderPath = path;
|
|
}
|
|
|
|
public override void ApplyToEntity()
|
|
{
|
|
base.ApplyToEntity();
|
|
Layer.LayerEntity.ShapeEntity.Type = ShapeEntityType.Rectangle;
|
|
}
|
|
}
|
|
} |