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