mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Hooked up rotation and opacity
This commit is contained in:
1 parent
f071871695
commit
4e9ece621f
9 files changed
+202
-137
No files matched your search
@@ -17,14 +17,17 @@ namespace Artemis.Core.Models.Profile.LayerShapes
|
||||
{
|
||||
var width = Layer.AbsoluteRectangle.Width;
|
||||
var height = Layer.AbsoluteRectangle.Height;
|
||||
var rect = SKRect.Create(shapePosition.X * width, shapePosition.Y * height, shapeSize.Width * width, shapeSize.Height * 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);
|
||||
path.Transform(SKMatrix.MakeTranslation(Layer.Rectangle.Left, Layer.Rectangle.Top));
|
||||
|
||||
RenderPath = path;
|
||||
RenderRectangle = path.GetRect();
|
||||
RenderRectangle = rect;
|
||||
}
|
||||
|
||||
public override void ApplyToEntity()
|
||||
|
||||
@@ -17,13 +17,17 @@ namespace Artemis.Core.Models.Profile.LayerShapes
|
||||
{
|
||||
var width = Layer.AbsoluteRectangle.Width;
|
||||
var height = Layer.AbsoluteRectangle.Height;
|
||||
var rect = SKRect.Create(shapePosition.X * width, shapePosition.Y * height, shapeSize.Width * width, shapeSize.Height * 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.AddRect(rect);
|
||||
path.Transform(SKMatrix.MakeTranslation(Layer.Rectangle.Left, Layer.Rectangle.Top));
|
||||
|
||||
RenderPath = path;
|
||||
RenderRectangle = path.GetRect();
|
||||
RenderRectangle = rect;
|
||||
}
|
||||
|
||||
public override void ApplyToEntity()
|
||||
|
||||
Reference in new issue
Block a user