1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Artemis/src/Artemis.UI/Services/Interfaces/ILayerEditorService.cs
2020-02-04 22:01:02 +01:00

51 lines
1.9 KiB
C#

using System.Windows;
using System.Windows.Media;
using Artemis.Core.Models.Profile;
using SkiaSharp;
namespace Artemis.UI.Services.Interfaces
{
public interface ILayerEditorService : IArtemisUIService
{
/// <summary>
/// Returns the layer's bounds, corrected for the current render scale.
/// </summary>
/// <param name="layer"></param>
/// <returns></returns>
Rect GetLayerBounds(Layer layer);
/// <summary>
/// Returns the layer's anchor, corrected for the current render scale.
/// </summary>
/// <param name="layer"></param>
/// <returns></returns>
Point GetLayerAnchorPosition(Layer layer);
/// <summary>
/// Creates a WPF transform group that contains all the transformations required to render the provided layer.
/// Note: Run on UI thread.
/// </summary>
/// <param name="layer"></param>
/// <returns></returns>
TransformGroup GetLayerTransformGroup(Layer layer);
/// <summary>
/// Returns an absolute and scaled rectangular path for the given layer that is corrected for the current render scale.
/// </summary>
/// <param name="layer"></param>
/// <param name="includeTranslation"></param>
/// <param name="includeScale"></param>
/// <param name="includeRotation"></param>
/// <returns></returns>
SKPath GetLayerPath(Layer layer, bool includeTranslation, bool includeScale, bool includeRotation);
/// <summary>
/// Returns a new point scaled to the layer.
/// </summary>
/// <param name="layer"></param>
/// <param name="point"></param>
/// <param name="absolute"></param>
/// <returns></returns>
SKPoint GetScaledPoint(Layer layer, SKPoint point, bool absolute);
}
}