Table of Contents

Class AnimationOverlayOptions

Namespace
Egami.Operations
Assembly
Egami.dll
public sealed record AnimationOverlayOptions : IEquatable<AnimationOverlayOptions>
Inheritance
AnimationOverlayOptions
Implements
Inherited Members

Examples

// A looping sticker on an animated background: the sticker keeps its own speed and loops for the background's whole length.
background.Apply(ops => ops.DrawAnimation(sticker, new Point(10, 10), new AnimationOverlayOptions { Repeat = 0, Opacity = 0.9f }), Ct);
background.Save("with-sticker.gif");

Properties

Blend

Gets how the overlay is combined with each base frame. Defaults to SourceOver.

public BlendMode Blend { get; init; }

Property Value

BlendMode

Exceptions

ArgumentOutOfRangeException

The value is not defined.

Default

Gets the default options: source-over, opaque, looping for as long as the base runs, from the start, by time.

public static AnimationOverlayOptions Default { get; }

Property Value

AnimationOverlayOptions

Opacity

Gets the overlay's opacity, from 0 to 1. Defaults to 1.

public float Opacity { get; init; }

Property Value

float

Exceptions

ArgumentOutOfRangeException

The value is outside 0 to 1.

Repeat

Gets how many times the overlay plays, or 0 (the default) to loop it for as long as the base runs. Over a still base, 0 plays it once.

public int Repeat { get; init; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

The value is negative.

Start

Gets when the overlay starts, from the base's start. Defaults to zero. Ignored by ByIndex.

public TimeSpan Start { get; init; }

Property Value

TimeSpan

Exceptions

ArgumentOutOfRangeException

The value is negative.

Timing

Gets how frames are paired. Defaults to ByTime.

public AnimationTiming Timing { get; init; }

Property Value

AnimationTiming

Exceptions

ArgumentOutOfRangeException

The value is not defined.