using System;
using System.Diagnostics.CodeAnalysis;
using ComputeSharp.D2D1.Interop;
using Microsoft.Graphics.Canvas;
using Windows.Graphics.Effects;
namespace ComputeSharp.D2D1.Uwp;
///
partial class PixelShaderEffect
{
///
/// Gets or sets the current value in use.
///
public T Value
{
get => GetConstantBuffer();
set => SetConstantBuffer(in value);
}
///
/// Gets or sets the instance to use for the effect, if any.
///
/// Thrown if the value is set to .
[DisallowNull]
public D2D1TransformMapper? TransformMapper
{
get => GetTransformMapper();
set => SetTransformMapper(value);
}
///
/// Gets or sets a value indicating whether to enable caching the output from drawing this effect.
///
public bool CacheOutput
{
get => GetCacheOutput();
set => SetCacheOutput(value);
}
///
/// Gets or sets the precision to use for intermediate buffers when drawing this effect.
///
/// If , the default precision for effects will be used.
public CanvasBufferPrecision? BufferPrecision
{
get => GetBufferPrecision();
set => SetBufferPrecision(value);
}
///
/// Gets the object associated with the current instance.
///
public SourceCollection Sources { get; } = new();
///
/// Represents the collection of sources in a instance.
///
public sealed class SourceCollection
{
///
/// Gets or sets the source at a specified index.
///
/// The index of the source to get or set.
/// The source at the specified index.
/// Thrown if is not a valid index for the current effect.
public IGraphicsEffectSource this[int index]
{
get => null!;
set { }
}
}
}