LampArrayColorRampEffect 類別

定義

將燈光/秒從其現有色彩 (最後設定為) 的任何色彩轉換為指定的色彩。

public ref class LampArrayColorRampEffect sealed : ILampArrayEffect
/// [Windows.Foundation.Metadata.Activatable(Windows.Devices.Lights.Effects.ILampArrayColorRampEffectFactory, 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 LampArrayColorRampEffect final : ILampArrayEffect
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Devices.Lights.Effects.ILampArrayColorRampEffectFactory), 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 LampArrayColorRampEffect : ILampArrayEffect
function LampArrayColorRampEffect(lampArray, lampIndexes)
Public NotInheritable Class LampArrayColorRampEffect
Implements ILampArrayEffect
繼承
Object Platform::Object IInspectable LampArrayColorRampEffect
屬性
實作

Windows 需求

裝置系列
Windows 10, version 1809 (已於 10.0.17763.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v7.0 引進)

範例

LampArray 範例

示範如何使用 Windows.Devices.LightsWindows.Devices.Lights.Effects API 來控制周邊裝置的 RGB 光源。

AutoRGB 範例

示範如何從桌面畫面擷取單一代表性色彩,並用它來在連線的 RGB 裝置上光源 LED 燈。

備註

轉換是透過指定 之 RampDuration的簡單線性曲線。

不保證跨燈的行為與燈/秒可以從不同的色彩開始相同。

在播放效果之前,您必須將它附加至 LampArrayEffectPlaylist (請參閱 附加) 。

如果 LampArray 系結至 LampArrayColorRampEffect 且中斷連線,效果的進度會繼續為無作業。 不會擲回/傳回例外狀況/錯誤。

建構函式

LampArrayColorRampEffect(LampArray, Int32[])

建立並初始化效果的新實例。

屬性

Color

取得或設定效果的尖峰濃度色彩。

CompletionBehavior

取得或設定效果完成時的行為。

RampDuration

取得或設定從先前設定色彩增加至尖峰濃度所花費的時間。

StartDelay

取得或設定開始效果之前延遲的持續時間。

ZIndex

修改相同燈光之兩個效果的全域優先順序。

適用於

另請參閱