Table of Contents

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
object
LayerExtensions

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

layer Layer
dragStart SKPoint

Returns

SKPoint

GetLayerAnchorPosition(Layer, SKPoint?)

Returns the layer's anchor in real coordinates.

public static SKPoint GetLayerAnchorPosition(this Layer layer, SKPoint? positionOverride = null)

Parameters

layer Layer
positionOverride SKPoint?

Returns

SKPoint

GetLayerBounds(Layer)

Returns the layer's bounds in real coordinates.

public static SKRect GetLayerBounds(this Layer layer)

Parameters

layer Layer

Returns

SKRect

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

layer Layer
includeTranslation bool
includeScale bool
includeRotation bool

Returns

SKPath

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)

Parameters

layer Layer
point SKPoint
absolute bool

Returns

SKPoint