diff --git a/Dashboard.Common/ImageProperties.cs b/Dashboard.Common/ImageProperties.cs
index 0317116..676bc51 100644
--- a/Dashboard.Common/ImageProperties.cs
+++ b/Dashboard.Common/ImageProperties.cs
@@ -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.
///
[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,
}
///
/// Color channels for images.
///
- public enum ColorChannel
+ public enum ColorChannel : byte
{
+ ///
+ /// An invalid swizzle mask.
+ ///
+ Unknown = 0b00000,
+
///
/// The zero channel. Used for swizzle masks.
///
- Zero = 0,
+ Zero = 0b10000,
///
/// The one channel. Used for swizzle masks.
///
- One = 1,
-
- ///
- /// An invalid swizzle mask.
- ///
- Unknown = 2,
+ One = 0b11110,
///
/// The red channel.
///
- Red = 4,
+ Red = 0b11000,
///
/// The green channel.
///
- Green = 5,
+ Green = 0b10100,
///
/// The blue channel.
///
- Blue = 6,
+ Blue = 0b10010,
///
/// The alpha channel.
///
- Alpha = 7,
+ Alpha = 0b10001,
}
///
diff --git a/Dashboard.Common/LayoutExtensions.cs b/Dashboard.Common/LayoutExtensions.cs
index 7276eae..341ce68 100644
--- a/Dashboard.Common/LayoutExtensions.cs
+++ b/Dashboard.Common/LayoutExtensions.cs
@@ -1,8 +1,10 @@
+using System.ComponentModel;
using System.Numerics;
using Dashboard.Layout;
namespace Dashboard
{
+ [EditorBrowsable(EditorBrowsableState.Never)]
public static class LayoutExtensions
{
extension(T item)