Table of Contents

Class LayerPropertyPreview<T>

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

Represents a container for a preview value of a LayerProperty<T> that can be used to update and discard a temporary value.

public sealed class LayerPropertyPreview<T> : IDisposable

Type Parameters

T

The value type of the layer property.

Inheritance
object
LayerPropertyPreview<T>
Implements

Constructors

LayerPropertyPreview(LayerProperty<T>, TimeSpan)

Creates a new instance of the LayerPropertyPreview<T> class.

public LayerPropertyPreview(LayerProperty<T> layerProperty, TimeSpan time)

Parameters

layerProperty LayerProperty<T>

The layer property to apply the preview value to.

time TimeSpan

The time in the timeline at which the preview is applied.

Properties

OriginalKeyframe

Gets the original keyframe of the property at the time the preview was created.

public LayerPropertyKeyframe<T>? OriginalKeyframe { get; }

Property Value

LayerPropertyKeyframe<T>

OriginalValue

Gets the original value of the property at the time the preview was created.

public T OriginalValue { get; }

Property Value

T

PreviewKeyframe

Gets the keyframe that was created to preview the value.

public LayerPropertyKeyframe<T>? PreviewKeyframe { get; }

Property Value

LayerPropertyKeyframe<T>

PreviewValue

Gets the preview value.

public T? PreviewValue { get; }

Property Value

T

Property

Gets the property this preview applies to.

public LayerProperty<T> Property { get; }

Property Value

LayerProperty<T>

Time

Gets the time in the timeline at which the preview is applied.

public TimeSpan Time { get; }

Property Value

TimeSpan

Methods

DiscardPreview()

Discard the preview value and restores the original state of the property. The returned boolean can be used to determine whether the preview value was different from the original value.

public bool DiscardPreview()

Returns

bool

true if any changes where discarded; otherwise false.

Dispose()

Discard the preview value and restores the original state of the property. The returned boolean can be used to determine whether the preview value was different from the original value.

public void Dispose()

Preview(T)

Updates the layer property to the given value, keeping track of the original state of the property.

public void Preview(T value)

Parameters

value T

The value to preview.