Started work on the keyframe engine to tie everything together!

This commit is contained in:
Robert committed 2020-01-08 14:35:29 +01:00
1 parent 7a3b5dec3e
commit acdb90897e
28 files changed
+339 -107

No files matched your search

@@ -13,11 +13,11 @@ namespace Artemis.Core.Models.Profile.LayerShapes
{
}
public override void CalculateRenderProperties()
public override void CalculateRenderProperties(SKPoint shapePosition, SKSize shapeSize)
{
var width = Layer.AbsoluteRectangle.Width;
var height = Layer.AbsoluteRectangle.Height;
var rect = SKRect.Create(Position.X * width, Position.Y * height, Size.Width * width, Size.Height * height);
var rect = SKRect.Create(shapePosition.X * width, shapePosition.Y * height, shapeSize.Width * width, shapeSize.Height * height);
var path = new SKPath();
path.AddRect(rect);
path.Transform(SKMatrix.MakeTranslation(Layer.Rectangle.Left, Layer.Rectangle.Top));