Class LayerExtensions
- Namespace
- Artemis.UI.Shared.Extensions
- Assembly
- Artemis.UI.Shared.dll
Provides utilities when working with layers in UI elements.
public static class LayerExtensions
- Inheritance
-
objectLayerExtensions
Methods
GetDragOffset(Layer, SKPoint)
Returns the offset from the given point to the closest sides of the layer's shape bounds
public static SKPoint GetDragOffset(this Layer layer, SKPoint dragStart)
Parameters
Returns
GetLayerAnchorPosition(Layer, SKPoint?)
Returns the layer's anchor in real coordinates.
public static SKPoint GetLayerAnchorPosition(this Layer layer, SKPoint? positionOverride = null)
Parameters
Returns
GetLayerBounds(Layer)
Returns the layer's bounds in real coordinates.
public static SKRect GetLayerBounds(this Layer layer)
Parameters
layerLayer
Returns
GetLayerPath(Layer, bool, bool, bool)
Returns an absolute and scaled rectangular path for the given layer in real coordinates.
public static SKPath GetLayerPath(this Layer layer, bool includeTranslation, bool includeScale, bool includeRotation)
Parameters
Returns
GetNormalizedPoint(Layer, SKPoint, bool)
Returns a new point normalized to 0.0-1.0
public static SKPoint GetNormalizedPoint(this Layer layer, SKPoint point, bool absolute)