mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Implemented translations properly on top of the layer shape
This commit is contained in:
1 parent
4e9ece621f
commit
da5fc75836
17 files changed
+300
-168
No files matched your search
@@ -13,21 +13,13 @@ namespace Artemis.Core.Models.Profile.LayerShapes
|
||||
{
|
||||
}
|
||||
|
||||
public override void CalculateRenderProperties(SKPoint shapePosition, SKSize shapeSize)
|
||||
public override void CalculateRenderProperties()
|
||||
{
|
||||
var width = Layer.AbsoluteRectangle.Width;
|
||||
var height = Layer.AbsoluteRectangle.Height;
|
||||
var rect = SKRect.Create(
|
||||
Layer.Rectangle.Left + shapePosition.X * width,
|
||||
Layer.Rectangle.Top + shapePosition.Y * height,
|
||||
shapeSize.Width * width,
|
||||
shapeSize.Height * height
|
||||
);
|
||||
var path = new SKPath();
|
||||
path.AddOval(rect);
|
||||
RenderRectangle = GetUnscaledRectangle();
|
||||
|
||||
var path = new SKPath();
|
||||
path.AddOval(RenderRectangle);
|
||||
RenderPath = path;
|
||||
RenderRectangle = rect;
|
||||
}
|
||||
|
||||
public override void ApplyToEntity()
|
||||
|
||||
Reference in new issue
Block a user