Rename and tweak D2D1PixelOptions type

このコミットが含まれているのは:
Sergio Pedri committed 2022-05-08 21:50:17 +02:00
1 親 a70ae6af38
コミット ec1798cbe3
9ファイル変更
+25 -22

検索条件に一致するファイルはありません

+2 -2
ファイルの表示
@@ -16,7 +16,7 @@ public sealed class D2DPixelOptionsAttribute : Attribute
/// Creates a new instance of the <see cref="D2DPixelOptionsAttribute"/> type with the specified arguments.
/// </summary>
/// <param name="options">The options to specify for the shader.</param>
public D2DPixelOptionsAttribute(D2D1PixelOption options)
public D2DPixelOptionsAttribute(D2D1PixelOptions options)
{
Options = options;
}
@@ -24,5 +24,5 @@ public sealed class D2DPixelOptionsAttribute : Attribute
/// <summary>
/// Gets the options to specify for the shader.
/// </summary>
public D2D1PixelOption Options { get; }
public D2D1PixelOptions Options { get; }
}
@@ -1,22 +1,25 @@
namespace ComputeSharp.D2D1;
using System;
using static TerraFX.Interop.DirectX.D2D1_PIXEL_OPTIONS;
namespace ComputeSharp.D2D1;
/// <summary>
/// Indicates how the sampling of a D2D1 pixel shader will be restricted. This indicates whether the vertex buffer
/// is large and tends to change infrequently or smaller and changes frequently (typically frame over frame).
/// Indicates how the sampling of a D2D1 pixel shader will be restricted.
/// </summary>
/// <remarks>
/// This type exposes the available values in <see href="https://docs.microsoft.com/windows/win32/api/d2d1effectauthor/ne-d2d1effectauthor-d2d1_pixel_options"/>.
/// </remarks>
public enum D2D1PixelOption
[Flags]
public enum D2D1PixelOptions
{
/// <summary>
/// The pixel shader is not restricted in its sampling.
/// </summary>
None,
None = (int)D2D1_PIXEL_OPTIONS_NONE,
/// <summary>
/// The pixel shader samples inputs only at the same scene coordinate as the output pixel
/// and returns transparent black whenever the input pixels are also transparent black.
/// </summary>
TrivialSampling
TrivialSampling = (int)D2D1_PIXEL_OPTIONS_TRIVIAL_SAMPLING
}