Hide members from editors.

This commit is contained in:
2026-09-07 22:10:58 +03:00
parent df8aeca1db
commit e46a13249b
2 changed files with 26 additions and 15 deletions
+24 -15
View File
@@ -1,4 +1,4 @@
using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
namespace Dashboard
@@ -7,7 +7,7 @@ namespace Dashboard
/// Pixel format for images.
/// </summary>
[Flags]
public enum PixelFormat
public enum PixelFormat : byte
{
None = 0,
@@ -20,58 +20,67 @@ namespace Dashboard
Rgb16F = Rgb | F16,
Rgba16F = Rgba | F16,
// Channels
// Channels (hide these from editors)
[EditorBrowsable(EditorBrowsableState.Advanced)]
R = 0x01,
[EditorBrowsable(EditorBrowsableState.Advanced)]
Rg = 0x02,
[EditorBrowsable(EditorBrowsableState.Advanced)]
Rgb = 0x03,
[EditorBrowsable(EditorBrowsableState.Advanced)]
Rgba = 0x04,
[EditorBrowsable(EditorBrowsableState.Advanced)]
A = 0x05,
[EditorBrowsable(EditorBrowsableState.Advanced)]
ColorMask = 0x0F,
[EditorBrowsable(EditorBrowsableState.Advanced)]
I8 = 0x10,
[EditorBrowsable(EditorBrowsableState.Advanced)]
F16 = 0x20,
[EditorBrowsable(EditorBrowsableState.Advanced)]
TypeMask = 0xF0,
}
/// <summary>
/// Color channels for images.
/// </summary>
public enum ColorChannel
public enum ColorChannel : byte
{
/// <summary>
/// An invalid swizzle mask.
/// </summary>
Unknown = 0b00000,
/// <summary>
/// The zero channel. Used for swizzle masks.
/// </summary>
Zero = 0,
Zero = 0b10000,
/// <summary>
/// The one channel. Used for swizzle masks.
/// </summary>
One = 1,
/// <summary>
/// An invalid swizzle mask.
/// </summary>
Unknown = 2,
One = 0b11110,
/// <summary>
/// The red channel.
/// </summary>
Red = 4,
Red = 0b11000,
/// <summary>
/// The green channel.
/// </summary>
Green = 5,
Green = 0b10100,
/// <summary>
/// The blue channel.
/// </summary>
Blue = 6,
Blue = 0b10010,
/// <summary>
/// The alpha channel.
/// </summary>
Alpha = 7,
Alpha = 0b10001,
}
/// <summary>
+2
View File
@@ -1,8 +1,10 @@
using System.ComponentModel;
using System.Numerics;
using Dashboard.Layout;
namespace Dashboard
{
[EditorBrowsable(EditorBrowsableState.Never)]
public static class LayoutExtensions
{
extension<T>(T item)