Share via


LampArrayBitmapEffect Class

Definition

Renders a series of images to selected lamp indexes on the device.

public ref class LampArrayBitmapEffect sealed : ILampArrayEffect
/// [Windows.Foundation.Metadata.Activatable(Windows.Devices.Lights.Effects.ILampArrayBitmapEffectFactory, 458752, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 458752)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class LampArrayBitmapEffect final : ILampArrayEffect
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Devices.Lights.Effects.ILampArrayBitmapEffectFactory), 458752, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 458752)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class LampArrayBitmapEffect : ILampArrayEffect
function LampArrayBitmapEffect(lampArray, lampIndexes)
Public NotInheritable Class LampArrayBitmapEffect
Implements ILampArrayEffect
Inheritance
Object Platform::Object IInspectable LampArrayBitmapEffect
Attributes
Implements

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Examples

LampArray sample

Demonstrates how to control RGB lighting of peripheral devices using the Windows.Devices.Lights and Windows.Devices.Lights.Effects APIs.

AutoRGB Sample

Demonstrates how to extract a single, representative color from a desktop screen and use it to illuminate LED lamps on a connected RGB device.

Remarks

Effect captures a series of images, by the caller subscribing to the BitmapRequested event and calling UpdateBitmap when triggered. This allows for images created on-the-fly to be supplied to the effect.

Best effort is made to create a 2D composition of requested lamps and scale up/down images.

Before you can play an effect, you must append it to a LampArrayEffectPlaylist (see Append).

If a LampArray is bound to a LampArrayBitmapEffect and it disconnects, progress of the effect continues as a no-op. No exception/error is thrown/returned.

Constructors

LampArrayBitmapEffect(LampArray, Int32[])

Creates and initializes a new instance of the effect.

Properties

Duration

Gets or sets the duration of the effect.

StartDelay

Gets or sets the duration to delay before starting the effect.

SuggestedBitmapSize

Gets the most suitable image size for the caller selected lamp indexes that results in minimal scaling/distortion.

UpdateInterval

Gets or sets the interval between the triggering of the BitmapRequested event. The supplied image will be displayed until the event is next triggered.

ZIndex

Gets or sets the global precedence (across all playlists) for two effects that modify the same lamp (on the same LampArray).

Events

BitmapRequested

Event triggered by the system to indicate a new image should be supplied to the effect.

Applies to

See also