diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..dd005ceb
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,61 @@
+name: RGB.NET-CI
+
+on:
+ push:
+ branches: [ Development ]
+ paths:
+ - '**.cs'
+ - '**.csproj'
+ - '**.yml'
+
+jobs:
+ build:
+
+ runs-on: windows-2022
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 7.0.x
+ - name: Git Semantic Version
+ id: versioning
+ uses: PaulHatch/semantic-version@v4.0.3
+ with:
+ short_tags: false
+ format: "${major}.${minor}.${patch}-prerelease.${increment}"
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Build
+ run: dotnet build --no-restore --configuration Release /p:Version=${{ steps.versioning.outputs.version }}
+ - name: Test
+ run: dotnet test --no-build --verbosity normal --configuration Release
+ - name: Upload a Build Artifact NET5
+ uses: actions/upload-artifact@v2.2.4
+ with:
+ name: RGB.NET-NET5
+ path: bin/net5.0/RGB.NET.*.dll
+ if-no-files-found: error
+ - name: Upload a Build Artifact NET6
+ uses: actions/upload-artifact@v2.2.4
+ with:
+ name: RGB.NET-NET6
+ path: bin/net6.0/RGB.NET.*.dll
+ if-no-files-found: error
+ - name: Upload a Build Artifact NET7
+ uses: actions/upload-artifact@v2.2.4
+ with:
+ name: RGB.NET-NET7
+ path: bin/net7.0/RGB.NET.*.dll
+ if-no-files-found: error
+ - name: Upload Nuget Build Artifact
+ uses: actions/upload-artifact@v2.2.4
+ with:
+ name: RGB.NET-Nugets
+ path: bin/*nupkg
+ if-no-files-found: error
+ - name: Nuget Push
+ run: dotnet nuget push **\*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
diff --git a/.github/workflows/pr_verify.yml b/.github/workflows/pr_verify.yml
new file mode 100644
index 00000000..b47d33ee
--- /dev/null
+++ b/.github/workflows/pr_verify.yml
@@ -0,0 +1,24 @@
+name: PR-Verify
+
+on:
+ pull_request:
+ branches: [ master, Development ]
+
+jobs:
+ build:
+
+ runs-on: windows-2022
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 7.0.x
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Build
+ run: dotnet build --no-restore --configuration Release /p:Version=0.0.0
+ - name: Test
+ run: dotnet test --no-build --verbosity normal --configuration Release
+
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..f5e9cce6
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,66 @@
+name: RGB.NET-Release
+
+on:
+ push:
+ branches: [ master ]
+ paths:
+ - '**.cs'
+ - '**.csproj'
+ - '**.yml'
+
+jobs:
+ build:
+ runs-on: windows-2022
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 7.0.x
+ - name: Git Semantic Version
+ id: versioning
+ uses: PaulHatch/semantic-version@v4.0.3
+ with:
+ short_tags: false
+ format: "${major}.${minor}.${patch}"
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Build
+ run: dotnet build --no-restore --configuration Release /p:Version=${{ steps.versioning.outputs.version }}
+ - name: Test
+ run: dotnet test --no-build --verbosity normal --configuration Release
+ - name: Upload a Build Artifact NET5
+ uses: actions/upload-artifact@v2.2.4
+ with:
+ name: RGB.NET-NET5
+ path: bin/net5.0/RGB.NET.*.dll
+ if-no-files-found: error
+ - name: Upload a Build Artifact NET6
+ uses: actions/upload-artifact@v2.2.4
+ with:
+ name: RGB.NET-NET6
+ path: bin/net6.0/RGB.NET.*.dll
+ if-no-files-found: error
+ - name: Upload a Build Artifact NET7
+ uses: actions/upload-artifact@v2.2.4
+ with:
+ name: RGB.NET-NET7
+ path: bin/net7.0/RGB.NET.*.dll
+ if-no-files-found: error
+ - name: Upload Nuget Build Artifact
+ uses: actions/upload-artifact@v2.2.4
+ with:
+ name: RGB.NET-Nugets
+ path: bin/*nupkg
+ if-no-files-found: error
+ - name: Release
+ uses: softprops/action-gh-release@v1
+ with:
+ tag_name: ${{ steps.versioning.outputs.version_tag }}
+ generate_release_notes: true
+ files: bin/net7.0/RGB.NET.*.dll
+ - name: Nuget Push
+ run: dotnet nuget push **\*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
diff --git a/Documentation/DeviceLayout.xsd b/Documentation/DeviceLayout.xsd
index 91ced394..8624cf4a 100644
--- a/Documentation/DeviceLayout.xsd
+++ b/Documentation/DeviceLayout.xsd
@@ -7,17 +7,22 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -28,39 +33,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
+
+
-
+
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 7d7098dd..7261a9a1 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,87 @@
# RGB.NET
+[![GitHub release (latest by date)](https://img.shields.io/github/v/release/DarthAffe/RGB.NET?style=for-the-badge)](https://github.com/DarthAffe/RGB.NET/releases)
+[![Nuget](https://img.shields.io/nuget/v/RGB.NET.Core?style=for-the-badge)](https://www.nuget.org/packages?q=rgb.net)
+[![GitHub](https://img.shields.io/github/license/DarthAffe/RGB.NET?style=for-the-badge)](https://github.com/DarthAffe/RGB.NET/blob/master/LICENSE)
+[![GitHub Repo stars](https://img.shields.io/github/stars/DarthAffe/RGB.NET?style=for-the-badge)](https://github.com/DarthAffe/RGB.NET/stargazers)
+[![Discord](https://img.shields.io/discord/366163308941934592?logo=discord&logoColor=white&style=for-the-badge)](https://discord.gg/9kytURv)
-This project aims to unify the use of various RGB-devices.
-**It is currently under heavy development and will have breaking changes in the future!** Right now a lot of devices aren't working as expected and there are bugs/unfinished features. Please think about that when you consider using the library in this early stage.
-
-If you want to help with layouting/testing devices or if you need support using the library feel free to join the [RGB.NET discord-channel](https://discord.gg/9kytURv).
+> **IMPORTANT NOTE**
+This is a library to integrate RGB-devices into your own application. It does not contain any executables!
+If you're looking for a full blown software solution to manage your RGB-devices, take a look at [Artemis](https://artemis-rgb.com/).
+## Getting Started
+### Setup
+1. Add the [RGB.NET.Core](https://www.nuget.org/packages/RGB.NET.Core) and [Devices](https://www.nuget.org/packages?q=rgb.net.Devices)-Nugets for all devices you want to use.
+2. For some of the vendors SDK-libraries are needed. Check the contained Readmes for more information in that case.
+3. Create a new `RGBSurface`.
+```csharp
+RGBSurface surface = new RGBSurface();
+```
-## Adding prerelease packages using NuGet ##
-This is the easiest and therefore preferred way to include RGB.NET in your project.
+4. Initialize the providers for all devices you want to use and add the devices to the surface. For example:
+```csharp
+CorsairDeviceProvider.Instance.Initialize(throwExceptions: true);
+surface.Attach(CorsairDeviceProvider.Instance.Devices);
+```
+The `Initialize`-method allows to load only devices of specific types by setting a filter and for debugging purposes allows to enable exception throwing. (By default they are catched and provided through the `Exception`-event.)
+You can also use the `Load`-Extension on the surface.
+```csharp
+surface.Load(CorsairDeviceProvider.Instance);
+```
+> While most device-providers are implemented in a way that supports fast loading like this some may have a different loading procedures. (For example the `WS281XDeviceProvider` requires device-definitions before loading.)
-Since there aren't any release-packages right now you'll have to use the CI-feed from [http://nuget.arge.be](http://nuget.arge.be).
-You can include it either by adding ```http://nuget.arge.be/v3/index.json``` to your Visual Studio package sources or by adding this [NuGet.Config](https://github.com/DarthAffe/RGB.NET/tree/master/Documentation/NuGet.Config) to your project (at the same level as your solution).
+5. Add an update-trigger. In most cases the TimerUpdateTrigger is preferable, but you can also implement your own to fit your needs.
+```csharp
+surface.RegisterUpdateTrigger(new TimerUpdateTrigger());
+```
+> If you want to trigger updates manually the `ManualUpdateTrigger` should be used.
-### .NET 4.5 Support ###
-At the end of the year with the release of .NET 5 the support for old .NET-Framwork versions will be droppped!
-It's not recommended to use RGB.NET in projects targeting .NET 4.x that aren't planned to be moved to Core/.NET 5 in the future.
+6. *This step is optional but recommended.* For rendering the location of each LED on the surface can be important. Since not all SDKs provide useful layout-information you might want to add Layouts to your devices. (TODO: add wiki article for this)
+Same goes for the location of the device on the surface. If you don't care about the exact location of the devices you can use:
+```csharp
+surface.AlignDevices();
+```
+The basic setup is now complete and you can start setting up your rendering.
-### Device-Layouts
-To be able to have devices with correct LED-locations and sizes they need to be layouted. Pre-created layouts can be found at https://github.com/DarthAffe/RGB.NET-Resources.
+### Basic Rendering
+As an example we'll add a moving rainbow over all devices on the surface.
+1. Create a led-group containing all leds on the surface (all devices)
+```csharp
+ILedGroup allLeds = new ListLedGroup(surface, surface.Leds);
+```
-If you plan to create layouts for your own devices check out https://github.com/DarthAffe/RGB.NET/wiki/Creating-Layouts first. There's also a layout-editor which strongly simplifies most of the work: https://github.com/SpoinkyNL/RGB.NET-Layout-Editor
+2. Create a rainbow-gradient.
+```csharp
+RainbowGradient rainbow = new RainbowGradient();
+```
-### Example usage of RGB.NET
-[![Example video](https://img.youtube.com/vi/JLRa0Wv4qso/0.jpg)](http://www.youtube.com/watch?v=JLRa0Wv4qso)
+3. Add a decorator to the gradient to make it move. (Decorators are
+```csharp
+rainbow.AddDecorator(new MoveGradientDecorator(surface));
+```
-#### Example Projects
-[https://github.com/DarthAffe/KeyboardAudioVisualizer](https://github.com/DarthAffe/KeyboardAudioVisualizer)
-[https://github.com/DarthAffe/RGBSyncPlus](https://github.com/DarthAffe/RGBSyncPlus)
+4. Create a texture (the size - in this example 10, 10 - is not important here since the gradient shoukd be stretched anyway)
+```csharp
+ITexture texture = new ConicalGradientTexture(new Size(10, 10), rainbow);
+```
+
+5. Add a brush rendering the texture to the led-group
+```csharp
+allLeds.Brush = new TextureBrush(texture);
+```
+
+### Full example
+```csharp
+RGBSurface surface = new RGBSurface();
+surface.Load(CorsairDeviceProvider.Instance);
+surface.AlignDevices();
+
+surface.RegisterUpdateTrigger(new TimerUpdateTrigger());
+
+ILedGroup allLeds = new ListLedGroup(surface, surface.Leds);
+RainbowGradient rainbow = new RainbowGradient();
+rainbow.AddDecorator(new MoveGradientDecorator(surface));
+ITexture texture = new ConicalGradientTexture(new Size(10, 10), rainbow);
+allLeds.Brush = new TextureBrush(texture);
+```
\ No newline at end of file
diff --git a/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs b/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs
deleted file mode 100644
index 9c251098..00000000
--- a/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable MemberCanBeProtected.Global
-// ReSharper disable ReturnTypeCanBeEnumerable.Global
-// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
-// ReSharper disable UnusedMember.Global
-
-using System;
-using RGB.NET.Brushes.Gradients;
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes
-{
- ///
- ///
- ///
- /// Represents a brush drawing a conical gradient.
- ///
- public class ConicalGradientBrush : AbstractBrush, IGradientBrush
- {
- #region Properties & Fields
-
- private float _origin = (float)Math.Atan2(-1, 0);
- ///
- /// Gets or sets the origin (radian-angle) this is drawn to. (default: -π/2)
- ///
- public float Origin
- {
- get => _origin;
- set => SetProperty(ref _origin, value);
- }
-
- private Point _center = new Point(0.5, 0.5);
- ///
- /// Gets or sets the center (as percentage in the range [0..1]) of the drawn by this . (default: 0.5, 0.5)
- ///
- public Point Center
- {
- get => _center;
- set => SetProperty(ref _center, value);
- }
-
- private IGradient _gradient;
- ///
- ///
- /// Gets or sets the gradient drawn by the brush. If null it will default to full transparent.
- ///
- public IGradient Gradient
- {
- get => _gradient;
- set => SetProperty(ref _gradient, value);
- }
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- public ConicalGradientBrush()
- { }
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The drawn by this .
- public ConicalGradientBrush(IGradient gradient)
- {
- this.Gradient = gradient;
- }
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The center (as percentage in the range [0..1]).
- /// The drawn by this .
- public ConicalGradientBrush(Point center, IGradient gradient)
- {
- this.Center = center;
- this.Gradient = gradient;
- }
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The center (as percentage in the range [0..1]).
- /// The origin (radian-angle) the is drawn to.
- /// The drawn by this .
- public ConicalGradientBrush(Point center, float origin, IGradient gradient)
- {
- this.Center = center;
- this.Origin = origin;
- this.Gradient = gradient;
- }
-
- #endregion
-
- #region Methods
-
- ///
- protected override Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget)
- {
- double centerX = rectangle.Size.Width * Center.X;
- double centerY = rectangle.Size.Height * Center.Y;
-
- double angle = Math.Atan2(renderTarget.Point.Y - centerY, renderTarget.Point.X - centerX) - Origin;
- if (angle < 0) angle += Math.PI * 2;
- double offset = angle / (Math.PI * 2);
-
- return Gradient.GetColor(offset);
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Brushes/Brushes/IGradientBrush.cs b/RGB.NET.Brushes/Brushes/IGradientBrush.cs
deleted file mode 100644
index 5677154c..00000000
--- a/RGB.NET.Brushes/Brushes/IGradientBrush.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using RGB.NET.Brushes.Gradients;
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes
-{
- ///
- ///
- /// Represents a basic gradient-brush.
- ///
- public interface IGradientBrush : IBrush
- {
- ///
- /// Gets the used by this .
- ///
- IGradient Gradient { get; }
- }
-}
diff --git a/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs b/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs
deleted file mode 100644
index 0880e4c4..00000000
--- a/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-// ReSharper disable CollectionNeverUpdated.Global
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable MemberCanBeProtected.Global
-// ReSharper disable ReturnTypeCanBeEnumerable.Global
-// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
-// ReSharper disable UnusedMember.Global
-
-using RGB.NET.Brushes.Gradients;
-using RGB.NET.Brushes.Helper;
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes
-{
- ///
- ///
- ///
- /// Represents a brush drawing a linear gradient.
- ///
- public class LinearGradientBrush : AbstractBrush, IGradientBrush
- {
- #region Properties & Fields
-
- private Point _startPoint = new Point(0, 0.5);
- ///
- /// Gets or sets the start (as percentage in the range [0..1]) of the drawn by this . (default: 0.0, 0.5)
- ///
- public Point StartPoint
- {
- get => _startPoint;
- set => SetProperty(ref _startPoint, value);
- }
-
- private Point _endPoint = new Point(1, 0.5);
- ///
- /// Gets or sets the end (as percentage in the range [0..1]) of the drawn by this . (default: 1.0, 0.5)
- ///
- public Point EndPoint
- {
- get => _endPoint;
- set => SetProperty(ref _endPoint, value);
- }
-
- private IGradient _gradient;
- ///
- public IGradient Gradient
- {
- get => _gradient;
- set => SetProperty(ref _gradient, value);
- }
-
- #endregion
-
- #region Constructor
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- public LinearGradientBrush()
- { }
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The drawn by this .
- public LinearGradientBrush(IGradient gradient)
- {
- this.Gradient = gradient;
- }
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The start (as percentage in the range [0..1]).
- /// The end (as percentage in the range [0..1]).
- /// The drawn by this .
- public LinearGradientBrush(Point startPoint, Point endPoint, IGradient gradient)
- {
- this.StartPoint = startPoint;
- this.EndPoint = endPoint;
- this.Gradient = gradient;
- }
-
- #endregion
-
- #region Methods
-
- ///
- ///
- /// Gets the color at an specific point assuming the brush is drawn into the given rectangle.
- ///
- /// The rectangle in which the brush should be drawn.
- /// The target (key/point) from which the color should be taken.
- /// The color at the specified point.
- protected override Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget)
- {
- if (Gradient == null) return Color.Transparent;
-
- Point startPoint = new Point(StartPoint.X * rectangle.Size.Width, StartPoint.Y * rectangle.Size.Height);
- Point endPoint = new Point(EndPoint.X * rectangle.Size.Width, EndPoint.Y * rectangle.Size.Height);
-
- double offset = GradientHelper.CalculateLinearGradientOffset(startPoint, endPoint, renderTarget.Point);
- return Gradient.GetColor(offset);
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs b/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs
deleted file mode 100644
index 58df28e7..00000000
--- a/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
-// ReSharper disable UnusedMember.Global
-
-using System;
-using RGB.NET.Brushes.Gradients;
-using RGB.NET.Brushes.Helper;
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes
-{
- ///
- ///
- ///
- /// Represents a brush drawing a radial gradient around a center point.
- ///
- public class RadialGradientBrush : AbstractBrush, IGradientBrush
- {
- #region Properties & Fields
-
- private Point _center = new Point(0.5, 0.5);
- ///
- /// Gets or sets the center (as percentage in the range [0..1]) around which the should be drawn. (default: 0.5, 0.5)
- ///
- public Point Center
- {
- get => _center;
- set => SetProperty(ref _center, value);
- }
-
- private IGradient _gradient;
- ///
- public IGradient Gradient
- {
- get => _gradient;
- set => SetProperty(ref _gradient, value);
- }
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- public RadialGradientBrush()
- { }
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The gradient drawn by the brush.
- public RadialGradientBrush(IGradient gradient)
- {
- this.Gradient = gradient;
- }
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The center point (as percentage in the range [0..1]).
- /// The gradient drawn by the brush.
- public RadialGradientBrush(Point center, IGradient gradient)
- {
- this.Center = center;
- this.Gradient = gradient;
- }
-
- #endregion
-
- #region Methods
-
- ///
- protected override Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget)
- {
- if (Gradient == null) return Color.Transparent;
-
- Point centerPoint = new Point(rectangle.Location.X + (rectangle.Size.Width * Center.X), rectangle.Location.Y + (rectangle.Size.Height * Center.Y));
-
- // Calculate the distance to the farthest point from the center as reference (this has to be a corner)
- // ReSharper disable once RedundantCast - never trust this ...
- double refDistance = Math.Max(Math.Max(Math.Max(GradientHelper.CalculateDistance(rectangle.Location, centerPoint),
- GradientHelper.CalculateDistance(new Point(rectangle.Location.X + rectangle.Size.Width, rectangle.Location.Y), centerPoint)),
- GradientHelper.CalculateDistance(new Point(rectangle.Location.X, rectangle.Location.Y + rectangle.Size.Height), centerPoint)),
- GradientHelper.CalculateDistance(new Point(rectangle.Location.X + rectangle.Size.Width, rectangle.Location.Y + rectangle.Size.Height), centerPoint));
-
- double distance = GradientHelper.CalculateDistance(renderTarget.Point, centerPoint);
- double offset = distance / refDistance;
- return Gradient.GetColor(offset);
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Brushes/Brushes/SolidColorBrush.cs b/RGB.NET.Brushes/Brushes/SolidColorBrush.cs
deleted file mode 100644
index 3620ea5e..00000000
--- a/RGB.NET.Brushes/Brushes/SolidColorBrush.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
-
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes
-{
- ///
- ///
- /// Represents a brush drawing only a single color.
- ///
- public class SolidColorBrush : AbstractBrush
- {
- #region Properties & Fields
-
- private Color _color;
- ///
- /// Gets or sets the drawn by this .
- ///
- public Color Color
- {
- get => _color;
- set => SetProperty(ref _color, value);
- }
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The drawn by this .
- public SolidColorBrush(Color color)
- {
- this.Color = color;
- }
-
- #endregion
-
- #region Methods
-
- ///
- protected override Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget) => Color;
-
- #endregion
-
- #region Operators
-
- ///
- /// Converts a to a .
- ///
- /// The to convert.
- public static explicit operator SolidColorBrush(Color color) => new SolidColorBrush(color);
-
- ///
- /// Converts a to a .
- ///
- /// The to convert.
- public static implicit operator Color(SolidColorBrush brush) => brush.Color;
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/RGB.NET.Brushes/Decorators/IGradientDecorator.cs b/RGB.NET.Brushes/Decorators/IGradientDecorator.cs
deleted file mode 100644
index 86c07de8..00000000
--- a/RGB.NET.Brushes/Decorators/IGradientDecorator.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes
-{
- ///
- ///
- /// Represents a basic decorator decorating a .
- ///
- public interface IGradientDecorator : IDecorator
- { }
-}
diff --git a/RGB.NET.Brushes/Gradients/AbstractGradient.cs b/RGB.NET.Brushes/Gradients/AbstractGradient.cs
deleted file mode 100644
index c32a0dab..00000000
--- a/RGB.NET.Brushes/Gradients/AbstractGradient.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-// ReSharper disable MemberCanBeProtected.Global
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
-
-using System;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Linq;
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes.Gradients
-{
- ///
- ///
- ///
- /// Represents a basic gradient.
- ///
- public abstract class AbstractGradient : AbstractDecoratable, IGradient
- {
- #region Properties & Fields
-
- ///
- /// Gets a list of the stops used by this .
- ///
- public ObservableCollection GradientStops { get; } = new ObservableCollection();
-
- private bool _wrapGradient;
- ///
- /// Gets or sets if the Gradient wraps around if there isn't a second stop to take.
- /// Example: There is a stop at offset 0.0, 0.5 and 0.75.
- /// Without wrapping offset 1.0 will be calculated the same as 0.75; with wrapping it would be the same as 0.0.
- ///
- public bool WrapGradient
- {
- get => _wrapGradient;
- set => SetProperty(ref _wrapGradient, value);
- }
-
- #endregion
-
- #region Events
-
- ///
- public event EventHandler GradientChanged;
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- protected AbstractGradient()
- {
- GradientStops.CollectionChanged += GradientCollectionChanged;
- PropertyChanged += (sender, args) => OnGradientChanged();
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The stops with which the gradient should be initialized.
- protected AbstractGradient(params GradientStop[] gradientStops)
- {
- GradientStops.CollectionChanged += GradientCollectionChanged;
- PropertyChanged += (sender, args) => OnGradientChanged();
-
- foreach (GradientStop gradientStop in gradientStops)
- GradientStops.Add(gradientStop);
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// Specifies whether the gradient should wrapp or not (see for an example of what this means).
- /// The stops with which the gradient should be initialized.
- protected AbstractGradient(bool wrapGradient, params GradientStop[] gradientStops)
- {
- this.WrapGradient = wrapGradient;
-
- GradientStops.CollectionChanged += GradientCollectionChanged;
- PropertyChanged += (sender, args) => OnGradientChanged();
-
- foreach (GradientStop gradientStop in gradientStops)
- GradientStops.Add(gradientStop);
- }
-
- #endregion
-
- #region Methods
-
- ///
- /// Clips the offset and ensures, that it is inside the bounds of the stop list.
- ///
- ///
- ///
- protected double ClipOffset(double offset)
- {
- double max = GradientStops.Max(n => n.Offset);
- if (offset > max)
- return max;
-
- double min = GradientStops.Min(n => n.Offset);
- return offset < min ? min : offset;
- }
-
- ///
- public abstract Color GetColor(double offset);
-
- ///
- public virtual void Move(double offset)
- {
- offset /= 360.0;
-
- foreach (GradientStop gradientStop in GradientStops)
- gradientStop.Offset += offset;
-
- while (GradientStops.All(x => x.Offset > 1))
- foreach (GradientStop gradientStop in GradientStops)
- gradientStop.Offset -= 1;
-
- while (GradientStops.All(x => x.Offset < 0))
- foreach (GradientStop gradientStop in GradientStops)
- gradientStop.Offset += 1;
- }
-
- ///
- /// Should be called to indicate that the gradient was changed.
- ///
- protected void OnGradientChanged() => GradientChanged?.Invoke(this, null);
-
- private void GradientCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
- {
- if (e.OldItems != null)
- foreach (GradientStop gradientStop in e.OldItems)
- gradientStop.PropertyChanged -= GradientStopChanged;
-
- if (e.NewItems != null)
- foreach (GradientStop gradientStop in e.NewItems)
- gradientStop.PropertyChanged += GradientStopChanged;
-
- OnGradientChanged();
- }
-
- private void GradientStopChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs) => OnGradientChanged();
-
- #endregion
- }
-}
diff --git a/RGB.NET.Brushes/Gradients/GradientStop.cs b/RGB.NET.Brushes/Gradients/GradientStop.cs
deleted file mode 100644
index 3cb4597a..00000000
--- a/RGB.NET.Brushes/Gradients/GradientStop.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
-// ReSharper disable MemberCanBePrivate.Global
-
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes.Gradients
-{
- ///
- /// Represents a stop on a gradient.
- ///
- public class GradientStop : AbstractBindable
- {
- #region Properties & Fields
-
- private double _offset;
- ///
- /// Gets or sets the percentage offset to place this . This should be inside the range of [0..1] but it's not necessary.
- ///
- public double Offset
- {
- get => _offset;
- set => SetProperty(ref _offset, value);
- }
-
- private Color _color;
- ///
- /// Gets or sets the of this .
- ///
- public Color Color
- {
- get => _color;
- set => SetProperty(ref _color, value);
- }
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The percentage offset to place this .
- /// The of the .
- public GradientStop(double offset, Color color)
- {
- this.Offset = offset;
- this.Color = color;
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Brushes/Gradients/IGradient.cs b/RGB.NET.Brushes/Gradients/IGradient.cs
deleted file mode 100644
index 590ba4cd..00000000
--- a/RGB.NET.Brushes/Gradients/IGradient.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System;
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes.Gradients
-{
- ///
- ///
- /// Represents a basic gradient.
- ///
- public interface IGradient : IDecoratable
- {
- ///
- /// Occurs if the is changed.
- ///
- event EventHandler GradientChanged;
-
- ///
- /// Gets the of the on the specified offset.
- ///
- /// The percentage offset to take the from.
- /// The at the specific offset.
- Color GetColor(double offset);
-
- ///
- /// Moves the by the provided offset.
- ///
- /// The offset the should be moved.
- void Move(double offset);
- }
-}
diff --git a/RGB.NET.Brushes/Gradients/LinearGradient.cs b/RGB.NET.Brushes/Gradients/LinearGradient.cs
deleted file mode 100644
index 535fe5de..00000000
--- a/RGB.NET.Brushes/Gradients/LinearGradient.cs
+++ /dev/null
@@ -1,152 +0,0 @@
-// ReSharper disable UnusedMember.Global
-
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes.Gradients
-{
- ///
- ///
- /// Represents a linear interpolated gradient with n stops.
- ///
- public class LinearGradient : AbstractGradient
- {
- #region Properties & Fields
-
- private bool _isOrderedGradientListDirty = true;
- private LinkedList _orderedGradientStops;
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- public LinearGradient()
- {
- Initialize();
- }
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The stops with which the gradient should be initialized.
- public LinearGradient(params GradientStop[] gradientStops)
- : base(gradientStops)
- {
- Initialize();
- }
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// Specifies whether the gradient should wrapp or not (see for an example of what this means).
- /// The stops with which the gradient should be initialized.
- public LinearGradient(bool wrapGradient, params GradientStop[] gradientStops)
- : base(wrapGradient, gradientStops)
- {
- Initialize();
- }
-
- #endregion
-
- #region Methods
-
- private void Initialize()
- {
- void OnGradientStopOnPropertyChanged(object sender, PropertyChangedEventArgs args) => _isOrderedGradientListDirty = true;
-
- foreach (GradientStop gradientStop in GradientStops)
- gradientStop.PropertyChanged += OnGradientStopOnPropertyChanged;
-
- GradientStops.CollectionChanged += (sender, args) =>
- {
- if (args.OldItems != null)
- foreach (GradientStop gradientStop in args.OldItems)
- gradientStop.PropertyChanged -= OnGradientStopOnPropertyChanged;
-
- if (args.NewItems != null)
- foreach (GradientStop gradientStop in args.NewItems)
- gradientStop.PropertyChanged += OnGradientStopOnPropertyChanged;
- };
- }
-
- ///
- ///
- /// Gets the linear interpolated at the given offset.
- ///
- /// The percentage offset to take the color from.
- /// The at the specific offset.
- public override Color GetColor(double offset)
- {
- if (GradientStops.Count == 0) return Color.Transparent;
- if (GradientStops.Count == 1) return GradientStops[0].Color;
-
- if (_isOrderedGradientListDirty)
- _orderedGradientStops = new LinkedList(GradientStops.OrderBy(x => x.Offset));
-
- (GradientStop gsBefore, GradientStop gsAfter) = GetEnclosingGradientStops(offset, _orderedGradientStops, WrapGradient);
-
- double blendFactor = 0;
- if (!gsBefore.Offset.Equals(gsAfter.Offset))
- blendFactor = ((offset - gsBefore.Offset) / (gsAfter.Offset - gsBefore.Offset));
-
- double colA = ((gsAfter.Color.A - gsBefore.Color.A) * blendFactor) + gsBefore.Color.A;
- double colR = ((gsAfter.Color.R - gsBefore.Color.R) * blendFactor) + gsBefore.Color.R;
- double colG = ((gsAfter.Color.G - gsBefore.Color.G) * blendFactor) + gsBefore.Color.G;
- double colB = ((gsAfter.Color.B - gsBefore.Color.B) * blendFactor) + gsBefore.Color.B;
-
- return new Color(colA, colR, colG, colB);
- }
-
- ///
- /// Get the two s encapsulating the given offset.
- ///
- /// The reference offset.
- /// The ordered list of to choose from.
- /// Bool indicating if the gradient should be wrapped or not.
- ///
- protected virtual (GradientStop gsBefore, GradientStop gsAfter) GetEnclosingGradientStops(double offset, LinkedList orderedStops, bool wrap)
- {
- LinkedList gradientStops = new LinkedList(orderedStops);
-
- if (wrap)
- {
- GradientStop gsBefore, gsAfter;
-
- do
- {
- gsBefore = gradientStops.LastOrDefault(n => n.Offset <= offset);
- if (gsBefore == null)
- {
- GradientStop lastStop = gradientStops.Last.Value;
- gradientStops.AddFirst(new GradientStop(lastStop.Offset - 1, lastStop.Color));
- gradientStops.RemoveLast();
- }
-
- gsAfter = gradientStops.FirstOrDefault(n => n.Offset >= offset);
- if (gsAfter == null)
- {
- GradientStop firstStop = gradientStops.First.Value;
- gradientStops.AddLast(new GradientStop(firstStop.Offset + 1, firstStop.Color));
- gradientStops.RemoveFirst();
- }
-
- } while ((gsBefore == null) || (gsAfter == null));
-
- return (gsBefore, gsAfter);
- }
-
- offset = ClipOffset(offset);
- return (gradientStops.Last(n => n.Offset <= offset), gradientStops.First(n => n.Offset >= offset));
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Brushes/Gradients/RainbowGradient.cs b/RGB.NET.Brushes/Gradients/RainbowGradient.cs
deleted file mode 100644
index 01946d02..00000000
--- a/RGB.NET.Brushes/Gradients/RainbowGradient.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
-
-using System;
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes.Gradients
-{
- ///
- ///
- ///
- /// Represents a rainbow gradient which circles through all colors of the HUE-color-space.
- /// See as reference.
- ///
- public class RainbowGradient : AbstractDecoratable, IGradient
- {
- #region Properties & Fields
-
- private double _startHue;
- ///
- /// Gets or sets the hue (in degrees) to start from.
- ///
- public double StartHue
- {
- get => _startHue;
- set => SetProperty(ref _startHue, value);
- }
-
- private double _endHue;
- ///
- /// Gets or sets the hue (in degrees) to end the with.
- ///
- public double EndHue
- {
- get => _endHue;
- set => SetProperty(ref _endHue, value);
- }
-
- #endregion
-
- #region Events
-
- ///
- public event EventHandler GradientChanged;
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The hue (in degrees) to start from (default: 0)
- /// The hue (in degrees) to end with (default: 360)
- public RainbowGradient(double startHue = 0, double endHue = 360)
- {
- this.StartHue = startHue;
- this.EndHue = endHue;
-
- PropertyChanged += (sender, args) => OnGradientChanged();
- }
-
- #endregion
-
- #region Methods
-
- ///
- ///
- /// Gets the color on the rainbow at the given offset.
- ///
- /// The percentage offset to take the color from.
- /// The color at the specific offset.
- public Color GetColor(double offset)
- {
- double range = EndHue - StartHue;
- double hue = StartHue + (range * offset);
- return HSVColor.Create(hue, 1, 1);
- }
-
- ///
- public void Move(double offset)
- {
- // RainbowGradient is calculated inverse
- offset *= -1;
-
- StartHue += offset;
- EndHue += offset;
-
- while ((StartHue > 360) && (EndHue > 360))
- {
- StartHue -= 360;
- EndHue -= 360;
- }
- while ((StartHue < -360) && (EndHue < -360))
- {
- StartHue += 360;
- EndHue += 360;
- }
- }
-
- ///
- /// Should be called to indicate that the gradient was changed.
- ///
- protected void OnGradientChanged() => GradientChanged?.Invoke(this, null);
-
- #endregion
- }
-}
diff --git a/RGB.NET.Brushes/Helper/GradientHelper.cs b/RGB.NET.Brushes/Helper/GradientHelper.cs
deleted file mode 100644
index b350af4b..00000000
--- a/RGB.NET.Brushes/Helper/GradientHelper.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-// ReSharper disable MemberCanBePrivate.Global
-
-using System;
-using RGB.NET.Core;
-
-namespace RGB.NET.Brushes.Helper
-{
- ///
- /// Offers some extensions and helper-methods for gradient related things.
- ///
- public static class GradientHelper
- {
- #region Methods
-
- // Based on https://web.archive.org/web/20170125201230/https://dotupdate.wordpress.com/2008/01/28/find-the-color-of-a-point-in-a-lineargradientbrush/
- ///
- /// Calculates the offset of an given on an gradient.
- ///
- /// The start of the gradient.
- /// The end of the gradient.
- /// The on the gradient to which the offset is calculated.
- /// The offset of the on the gradient.
- public static double CalculateLinearGradientOffset(Point startPoint, Point endPoint, Point point)
- {
- Point intersectingPoint;
- if (startPoint.Y.Equals(endPoint.Y)) // Horizontal case
- intersectingPoint = new Point(point.X, startPoint.Y);
-
- else if (startPoint.X.Equals(endPoint.X)) // Vertical case
- intersectingPoint = new Point(startPoint.X, point.Y);
-
- else // Diagonal case
- {
- double slope = (endPoint.Y - startPoint.Y) / (endPoint.X - startPoint.X);
- double orthogonalSlope = -1 / slope;
-
- double startYIntercept = startPoint.Y - (slope * startPoint.X);
- double pointYIntercept = point.Y - (orthogonalSlope * point.X);
-
- double intersectingPointX = (pointYIntercept - startYIntercept) / (slope - orthogonalSlope);
- double intersectingPointY = (slope * intersectingPointX) + startYIntercept;
- intersectingPoint = new Point(intersectingPointX, intersectingPointY);
- }
-
- // Calculate distances relative to the vector start
- double intersectDistance = CalculateDistance(intersectingPoint, startPoint, endPoint);
- double gradientLength = CalculateDistance(endPoint, startPoint, endPoint);
-
- return intersectDistance / gradientLength;
- }
-
- // Based on https://web.archive.org/web/20170125201230/https://dotupdate.wordpress.com/2008/01/28/find-the-color-of-a-point-in-a-lineargradientbrush/
- ///
- /// Returns the signed magnitude of a on a vector.
- ///
- /// The on the vector of which the magnitude should be calculated.
- /// The origin of the vector.
- /// The direction of the vector.
- /// The signed magnitude of a on a vector.
- public static double CalculateDistance(Point point, Point origin, Point direction)
- {
- double distance = CalculateDistance(point, origin);
-
- return (((point.Y < origin.Y) && (direction.Y > origin.Y)) ||
- ((point.Y > origin.Y) && (direction.Y < origin.Y)) ||
- ((point.Y.Equals(origin.Y)) && (point.X < origin.X) && (direction.X > origin.X)) ||
- ((point.Y.Equals(origin.Y)) && (point.X > origin.X) && (direction.X < origin.X)))
- ? -distance : distance;
- }
-
- ///
- /// Calculated the distance between two .
- ///
- /// The first .
- /// The second .
- /// The distance between the two .
- public static double CalculateDistance(Point point1, Point point2) => Math.Sqrt(((point1.Y - point2.Y) * (point1.Y - point2.Y)) + ((point1.X - point2.X) * (point1.X - point2.X)));
-
- #endregion
- }
-}
diff --git a/RGB.NET.Core/Brushes/AbstractBrush.cs b/RGB.NET.Core/Brushes/AbstractBrush.cs
deleted file mode 100644
index 7521bf2c..00000000
--- a/RGB.NET.Core/Brushes/AbstractBrush.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-// ReSharper disable VirtualMemberNeverOverriden.Global
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable VirtualMemberNeverOverridden.Global
-
-using System.Collections.Generic;
-using System.Linq;
-
-namespace RGB.NET.Core
-{
- ///
- ///
- ///
- /// Represents a basic brush.
- ///
- public abstract class AbstractBrush : AbstractDecoratable, IBrush
- {
- #region Properties & Fields
-
- ///
- public bool IsEnabled { get; set; } = true;
-
- ///
- public BrushCalculationMode BrushCalculationMode { get; set; } = BrushCalculationMode.Relative;
-
- ///
- public double Brightness { get; set; }
-
- ///
- public double Opacity { get; set; }
-
- ///
- public IList ColorCorrections { get; } = new List();
-
- ///
- public Rectangle RenderedRectangle { get; protected set; }
-
- ///
- public Dictionary RenderedTargets { get; } = new Dictionary();
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The overall percentage brightness of the brush. (default: 1.0)
- /// The overall percentage opacity of the brush. (default: 1.0)
- protected AbstractBrush(double brightness = 1, double opacity = 1)
- {
- this.Brightness = brightness;
- this.Opacity = opacity;
- }
-
- #endregion
-
- #region Methods
-
- ///
- public virtual void PerformRender(Rectangle rectangle, IEnumerable renderTargets)
- {
- RenderedRectangle = rectangle;
- RenderedTargets.Clear();
-
- foreach (BrushRenderTarget renderTarget in renderTargets)
- {
- Color color = GetColorAtPoint(rectangle, renderTarget);
- color = ApplyDecorators(rectangle, renderTarget, color);
- RenderedTargets[renderTarget] = color;
- }
- }
-
- ///
- /// Applies all attached and enabled decorators to the brush.
- ///
- /// The rectangle in which the brush should be drawn.
- /// The target (key/point) from which the color should be taken.
- /// The to be modified.
- protected virtual Color ApplyDecorators(Rectangle rectangle, BrushRenderTarget renderTarget, Color color)
- {
- lock (Decorators)
- foreach (IBrushDecorator decorator in Decorators)
- if (decorator.IsEnabled)
- color = decorator.ManipulateColor(rectangle, renderTarget, color);
-
- return color;
- }
-
- ///
- public virtual void PerformFinalize()
- {
- List renderTargets = RenderedTargets.Keys.ToList();
- foreach (BrushRenderTarget renderTarget in renderTargets)
- RenderedTargets[renderTarget] = FinalizeColor(RenderedTargets[renderTarget]);
- }
-
- ///
- /// Gets the color at an specific point assuming the brush is drawn into the given rectangle.
- ///
- /// The rectangle in which the brush should be drawn.
- /// The target (key/point) from which the color should be taken.
- /// The color at the specified point.
- protected abstract Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget);
-
- ///
- /// Finalizes the color by appliing the overall brightness and opacity.
- /// This method should always be the last call of a implementation.
- ///
- /// The color to finalize.
- /// The finalized color.
- protected virtual Color FinalizeColor(Color color)
- {
- if (ColorCorrections.Count > 0)
- foreach (IColorCorrection colorCorrection in ColorCorrections)
- color = colorCorrection.ApplyTo(color);
-
- // Since we use HSV to calculate there is no way to make a color 'brighter' than 100%
- // Be carefull with the naming: Since we use HSV the correct term is 'value' but outside we call it 'brightness'
- // THIS IS NOT A HSB CALCULATION!!!
- if (Brightness < 1)
- color = color.MultiplyHSV(value: Brightness.Clamp(0, 1));
-
- if (Opacity < 1)
- color = color.MultiplyA(Opacity.Clamp(0, 1));
-
- return color;
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Core/Brushes/BrushCalculationMode.cs b/RGB.NET.Core/Brushes/BrushCalculationMode.cs
deleted file mode 100644
index 310f5635..00000000
--- a/RGB.NET.Core/Brushes/BrushCalculationMode.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// ReSharper disable UnusedMember.Global
-
-namespace RGB.NET.Core
-{
- ///
- /// Contains a list of all brush calculation modes.
- ///
- public enum BrushCalculationMode
- {
- ///
- /// The calculation for will be the rectangle around the the is applied to.
- ///
- Relative,
-
- ///
- /// The calculation for will always be the rectangle completly containing all affected .
- ///
- Absolute
- }
-}
diff --git a/RGB.NET.Core/Brushes/BrushRenderTarget.cs b/RGB.NET.Core/Brushes/BrushRenderTarget.cs
deleted file mode 100644
index e4934e8b..00000000
--- a/RGB.NET.Core/Brushes/BrushRenderTarget.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-// ReSharper disable MemberCanBePrivate.Global
-// ReSharper disable UnusedAutoPropertyAccessor.Global
-
-namespace RGB.NET.Core
-{
- ///
- /// Represents a single target of a brush render.
- ///
- public class BrushRenderTarget
- {
- #region Properties & Fields
-
- ///
- /// Gets the target-.
- ///
- public Led Led { get; }
-
- ///
- /// Gets the representing the area to render the target-.
- ///
- public Rectangle Rectangle { get; }
-
- ///
- /// Gets the representing the position to render the target-.
- ///
- public Point Point { get; }
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The target-.
- /// The representing the area to render the target-.
- public BrushRenderTarget(Led led, Rectangle rectangle)
- {
- this.Led = led;
- this.Rectangle = rectangle;
-
- this.Point = rectangle.Center;
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Core/Brushes/IBrush.cs b/RGB.NET.Core/Brushes/IBrush.cs
deleted file mode 100644
index 7d7f2c03..00000000
--- a/RGB.NET.Core/Brushes/IBrush.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-// ReSharper disable UnusedMemberInSuper.Global
-// ReSharper disable UnusedMember.Global
-// ReSharper disable ReturnTypeCanBeEnumerable.Global
-
-using System.Collections.Generic;
-
-namespace RGB.NET.Core
-{
- ///
- /// Represents a basic brush.
- ///
- public interface IBrush : IDecoratable
- {
- ///
- /// Gets or sets if the is enabled and will be drawn on an update.
- ///
- bool IsEnabled { get; set; }
-
- ///
- /// Gets or sets the calculation mode used for the rectangle/points used for color-selection in brushes.
- ///
- BrushCalculationMode BrushCalculationMode { get; set; }
-
- ///
- /// Gets or sets the overall percentage brightness of the .
- ///
- double Brightness { get; set; }
-
- ///
- /// Gets or sets the overall percentage opacity of the .
- ///
- double Opacity { get; set; }
-
- ///
- /// Gets a list of used to correct the colors of the .
- ///
- IList ColorCorrections { get; }
-
- ///
- /// Gets the used in the last render pass.
- ///
- Rectangle RenderedRectangle { get; }
-
- ///
- /// Gets a dictionary containing all for calculated in the last render pass.
- ///
- Dictionary RenderedTargets { get; }
-
- ///
- /// Performs the render pass of the and calculates the raw for all requested .
- ///
- /// The in which the brush should be drawn.
- /// The (keys/points) of which the color should be calculated.
- void PerformRender(Rectangle rectangle, IEnumerable renderTargets);
-
- ///
- /// Performs the finalize pass of the and calculates the final for all previously calculated .
- ///
- void PerformFinalize();
- }
-}
\ No newline at end of file
diff --git a/RGB.NET.Core/Color/Behaviors/DefaultColorBehavior.cs b/RGB.NET.Core/Color/Behaviors/DefaultColorBehavior.cs
index e666f6f7..69423253 100644
--- a/RGB.NET.Core/Color/Behaviors/DefaultColorBehavior.cs
+++ b/RGB.NET.Core/Color/Behaviors/DefaultColorBehavior.cs
@@ -1,80 +1,62 @@
-namespace RGB.NET.Core
-{
- public class DefaultColorBehavior : IColorBehavior
- {
- #region Properties & Fields
-
- private static DefaultColorBehavior _instance = new DefaultColorBehavior();
- ///
- /// Gets the singleton instance of .
- ///
- public static DefaultColorBehavior Instance { get; } = _instance;
-
- #endregion
-
- #region Constructors
-
- private DefaultColorBehavior()
- { }
-
- #endregion
-
- #region Methods
+using System;
- ///
- /// Converts the individual byte values of this to a human-readable string.
- ///
- /// A string that contains the individual byte values of this . For example "[A: 255, R: 255, G: 0, B: 0]".
- public virtual string ToString(Color color) => $"[A: {color.GetA()}, R: {color.GetR()}, G: {color.GetG()}, B: {color.GetB()}]";
+namespace RGB.NET.Core;
- ///
- /// Tests whether the specified object is a and is equivalent to this .
- ///
- /// The object to test.
- /// true if is a equivalent to this ; otherwise, false.
- public virtual bool Equals(Color color, object obj)
- {
- if (!(obj is Color)) return false;
-
- (double a, double r, double g, double b) = ((Color)obj).GetRGB();
- return color.A.EqualsInTolerance(a) && color.R.EqualsInTolerance(r) && color.G.EqualsInTolerance(g) && color.B.EqualsInTolerance(b);
- }
-
- ///
- /// Returns a hash code for this .
- ///
- /// An integer value that specifies the hash code for this .
- public virtual int GetHashCode(Color color)
- {
- unchecked
- {
- int hashCode = color.A.GetHashCode();
- hashCode = (hashCode * 397) ^ color.R.GetHashCode();
- hashCode = (hashCode * 397) ^ color.G.GetHashCode();
- hashCode = (hashCode * 397) ^ color.B.GetHashCode();
- return hashCode;
- }
- }
-
- ///
- /// Blends a over this color.
- ///
- /// The to blend.
- public virtual Color Blend(Color baseColor, Color blendColor)
- {
- if (blendColor.A.EqualsInTolerance(0)) return baseColor;
+///
+///
+/// Represents the default-behavior for the work with colors.
+///
+public class DefaultColorBehavior : IColorBehavior
+{
+ #region Methods
+
+ ///
+ /// Converts the individual byte values of this to a human-readable string.
+ ///
+ /// A string that contains the individual byte values of this . For example "[A: 255, R: 255, G: 0, B: 0]".
+ public virtual string ToString(in Color color) => $"[A: {color.GetA()}, R: {color.GetR()}, G: {color.GetG()}, B: {color.GetB()}]";
+
+ ///
+ /// Tests whether the specified object is a and is equivalent to this .
+ ///
+ /// The color to test.
+ /// The object to test.
+ /// true if is a equivalent to this ; otherwise, false.
+ public virtual bool Equals(in Color color, object? obj)
+ {
+ if (obj is not Color color2) return false;
+
+ return color.A.EqualsInTolerance(color2.A)
+ && color.R.EqualsInTolerance(color2.R)
+ && color.G.EqualsInTolerance(color2.G)
+ && color.B.EqualsInTolerance(color2.B);
+ }
- if (blendColor.A.EqualsInTolerance(1))
- return blendColor;
+ ///
+ /// Returns a hash code for this .
+ ///
+ /// An integer value that specifies the hash code for this .
+ public virtual int GetHashCode(in Color color) => HashCode.Combine(color.A, color.R, color.G, color.B);
+
+ ///
+ /// Blends a over this color.
+ ///
+ /// The to to blend over.
+ /// The to blend.
+ public virtual Color Blend(in Color baseColor, in Color blendColor)
+ {
+ if (blendColor.A.EqualsInTolerance(0)) return baseColor;
- double resultA = (1.0 - ((1.0 - blendColor.A) * (1.0 - baseColor.A)));
- double resultR = (((blendColor.R * blendColor.A) / resultA) + ((baseColor.R * baseColor.A * (1.0 - blendColor.A)) / resultA));
- double resultG = (((blendColor.G * blendColor.A) / resultA) + ((baseColor.G * baseColor.A * (1.0 - blendColor.A)) / resultA));
- double resultB = (((blendColor.B * blendColor.A) / resultA) + ((baseColor.B * baseColor.A * (1.0 - blendColor.A)) / resultA));
+ if (blendColor.A.EqualsInTolerance(1))
+ return blendColor;
- return new Color(resultA, resultR, resultG, resultB);
- }
+ float resultA = (1.0f - ((1.0f - blendColor.A) * (1.0f - baseColor.A)));
+ float resultR = (((blendColor.R * blendColor.A) / resultA) + ((baseColor.R * baseColor.A * (1.0f - blendColor.A)) / resultA));
+ float resultG = (((blendColor.G * blendColor.A) / resultA) + ((baseColor.G * baseColor.A * (1.0f - blendColor.A)) / resultA));
+ float resultB = (((blendColor.B * blendColor.A) / resultA) + ((baseColor.B * baseColor.A * (1.0f - blendColor.A)) / resultA));
- #endregion
+ return new Color(resultA, resultR, resultG, resultB);
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Color/Behaviors/IColorBehavior.cs b/RGB.NET.Core/Color/Behaviors/IColorBehavior.cs
index 630aca5b..29b66147 100644
--- a/RGB.NET.Core/Color/Behaviors/IColorBehavior.cs
+++ b/RGB.NET.Core/Color/Behaviors/IColorBehavior.cs
@@ -1,13 +1,35 @@
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a behavior of a color for base operations.
+///
+public interface IColorBehavior
{
- public interface IColorBehavior
- {
- string ToString(Color color);
+ ///
+ /// Converts the specified to a string representation.
+ ///
+ /// The color to convert.
+ /// The string representation of the specified color.
+ string ToString(in Color color);
- bool Equals(Color color, object obj);
+ ///
+ /// Tests whether the specified object is a and is equivalent to this .
+ ///
+ /// The color to test.
+ /// The object to test.
+ /// true if is a equivalent to this ; otherwise, false.
+ bool Equals(in Color color, object? obj);
- int GetHashCode(Color color);
+ ///
+ /// Returns a hash code for this .
+ ///
+ /// An integer value that specifies the hash code for this .
+ int GetHashCode(in Color color);
- Color Blend(Color baseColor, Color blendColor);
- }
-}
+ ///
+ /// Blends a over this color.
+ ///
+ /// The to to blend over.
+ /// The to blend.
+ Color Blend(in Color baseColor, in Color blendColor);
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Color/Color.cs b/RGB.NET.Core/Color/Color.cs
index 81a3a33a..ae775d37 100644
--- a/RGB.NET.Core/Color/Color.cs
+++ b/RGB.NET.Core/Color/Color.cs
@@ -5,284 +5,279 @@
using System;
using System.Diagnostics;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents an ARGB (alpha, red, green, blue) color.
+///
+[DebuggerDisplay("[A: {A}, R: {R}, G: {G}, B: {B}]")]
+public readonly struct Color
{
+ #region Constants
+
+ private static readonly Color TRANSPARENT = new(0, 0, 0, 0);
+ ///
+ /// Gets an transparent color [A: 0, R: 0, G: 0, B: 0]
+ ///
+ public static ref readonly Color Transparent => ref TRANSPARENT;
+
+ #endregion
+
+ #region Properties & Fields
+
+ ///
+ /// Gets or sets the used to perform operations on colors.
+ ///
+ public static IColorBehavior Behavior { get; set; } = new DefaultColorBehavior();
+
+ ///
+ /// Gets the alpha component value of this as percentage in the range [0..1].
+ ///
+ public readonly float A;
+
+ ///
+ /// Gets the red component value of this as percentage in the range [0..1].
+ ///
+ public readonly float R;
+
+ ///
+ /// Gets the green component value of this as percentage in the range [0..1].
+ ///
+ public readonly float G;
+
+ ///
+ /// Gets the blue component value of this as percentage in the range [0..1].
+ ///
+ public readonly float B;
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ ///
+ /// Initializes a new instance of the struct using RGB-Values.
+ /// Alpha defaults to 255.
+ ///
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public Color(byte r, byte g, byte b)
+ : this(byte.MaxValue, r, g, b)
+ { }
+
///
///
- /// Represents an ARGB (alpha, red, green, blue) color.
+ /// Initializes a new instance of the struct using RGB-Values.
+ /// Alpha defaults to 255.
+ ///
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public Color(int r, int g, int b)
+ : this((byte)r.Clamp(0, byte.MaxValue), (byte)g.Clamp(0, byte.MaxValue), (byte)b.Clamp(0, byte.MaxValue))
+ { }
+
+ ///
+ /// Initializes a new instance of the struct using ARGB values.
+ ///
+ /// The alpha component value of this .
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public Color(byte a, byte r, byte g, byte b)
+ : this(a.GetPercentageFromByteValue(), r.GetPercentageFromByteValue(), g.GetPercentageFromByteValue(), b.GetPercentageFromByteValue())
+ { }
+
+ ///
+ /// Initializes a new instance of the struct using ARGB values.
+ ///
+ /// The alpha component value of this .
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public Color(int a, int r, int g, int b)
+ : this((byte)a.Clamp(0, byte.MaxValue), (byte)r.Clamp(0, byte.MaxValue), (byte)g.Clamp(0, byte.MaxValue), (byte)b.Clamp(0, byte.MaxValue))
+ { }
+
+ ///
+ /// Initializes a new instance of the struct using RGB-percent values.
+ /// Alpha defaults to 1.0.
+ ///
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public Color(float r, float g, float b)
+ : this(1.0f, r, g, b)
+ { }
+
+ ///
+ /// Initializes a new instance of the struct using ARGB-percent values.
+ ///
+ /// The alpha component value of this .
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public Color(float a, byte r, byte g, byte b)
+ : this(a, r.GetPercentageFromByteValue(), g.GetPercentageFromByteValue(), b.GetPercentageFromByteValue())
+ { }
+
+ ///
+ /// Initializes a new instance of the struct using ARGB-percent values.
+ ///
+ /// The alpha component value of this .
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public Color(float a, int r, int g, int b)
+ : this(a, (byte)r.Clamp(0, byte.MaxValue), (byte)g.Clamp(0, byte.MaxValue), (byte)b.Clamp(0, byte.MaxValue))
+ { }
+
+ ///
+ /// Initializes a new instance of the struct using ARGB-percent values.
+ ///
+ /// The alpha component value of this .
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public Color(int a, float r, float g, float b)
+ : this((byte)a.Clamp(0, byte.MaxValue), r, g, b)
+ { }
+
+ ///
+ /// Initializes a new instance of the struct using ARGB-percent values.
+ ///
+ /// The alpha component value of this .
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public Color(byte a, float r, float g, float b)
+ : this(a.GetPercentageFromByteValue(), r, g, b)
+ { }
+
+ ///
+ /// Initializes a new instance of the struct using ARGB-percent values.
///
- [DebuggerDisplay("[A: {A}, R: {R}, G: {G}, B: {B}]")]
- public struct Color
+ /// The alpha component value of this .
+ /// The red component value of this .
+ /// The green component value of this .
+ /// The blue component value of this .
+ public Color(float a, float r, float g, float b)
{
- #region Constants
-
- ///
- /// Gets an transparent color [A: 0, R: 0, G: 0, B: 0]
- ///
- public static Color Transparent => new Color(0, 0, 0, 0);
-
- #endregion
-
- #region Properties & Fields
-
- private static IColorBehavior _behavior = DefaultColorBehavior.Instance;
- ///
- /// Gets or sets the used to perform operations on colors.
- ///
- public static IColorBehavior Behavior
- {
- get => _behavior;
- set => _behavior = value ?? DefaultColorBehavior.Instance;
- }
-
- ///
- /// Gets the alpha component value of this as percentage in the range [0..1].
- ///
- public double A { get; }
-
- ///
- /// Gets the red component value of this as percentage in the range [0..1].
- ///
- public double R { get; }
-
- ///
- /// Gets the green component value of this as percentage in the range [0..1].
- ///
- public double G { get; }
-
- ///
- /// Gets the blue component value of this as percentage in the range [0..1].
- ///
- public double B { get; }
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- /// Initializes a new instance of the struct using RGB-Values.
- /// Alpha defaults to 255.
- ///
- /// The red component value of this .
- /// The green component value of this .
- /// The blue component value of this .
- public Color(byte r, byte g, byte b)
- : this(byte.MaxValue, r, g, b)
- { }
-
- ///
- ///
- /// Initializes a new instance of the struct using RGB-Values.
- /// Alpha defaults to 255.
- ///
- /// The red component value of this .
- /// The green component value of this .
- /// The blue component value of this .
- public Color(int r, int g, int b)
- : this((byte)r.Clamp(0, byte.MaxValue), (byte)g.Clamp(0, byte.MaxValue), (byte)b.Clamp(0, byte.MaxValue))
- { }
-
- ///
- /// Initializes a new instance of the struct using ARGB values.
- ///
- /// The alpha component value of this .
- /// The red component value of this .
- /// The green component value of this .
- /// The blue component value of this .
- public Color(byte a, byte r, byte g, byte b)
- : this(a.GetPercentageFromByteValue(), r.GetPercentageFromByteValue(), g.GetPercentageFromByteValue(), b.GetPercentageFromByteValue())
- { }
-
- ///
- /// Initializes a new instance of the struct using ARGB values.
- ///
- /// The alpha component value of this .
- /// The red component value of this .
- /// The green component value of this .
- /// The blue component value of this .
- public Color(int a, int r, int g, int b)
- : this((byte)a.Clamp(0, byte.MaxValue), (byte)r.Clamp(0, byte.MaxValue), (byte)g.Clamp(0, byte.MaxValue), (byte)b.Clamp(0, byte.MaxValue))
- { }
-
- ///
- /// Initializes a new instance of the struct using RGB-percent values.
- /// Alpha defaults to 1.0.
- ///
- /// The red component value of this .
- /// The green component value of this .
- /// The blue component value of this .
- public Color(double r, double g, double b)
- : this(1.0, r, g, b)
- { }
-
- ///
- /// Initializes a new instance of the struct using ARGB-percent values.
- ///
- /// The alpha component value of this .
- /// The red component value of this .
- /// The green component value of this .
- /// The blue component value of this .
- public Color(double a, byte r, byte g, byte b)
- : this(a, r.GetPercentageFromByteValue(), g.GetPercentageFromByteValue(), b.GetPercentageFromByteValue())
- { }
-
- ///
- /// Initializes a new instance of the struct using ARGB-percent values.
- ///
- /// The alpha component value of this .
- /// The red component value of this .
- /// The green component value of this .
- /// The blue component value of this .
- public Color(double a, int r, int g, int b)
- : this(a, (byte)r.Clamp(0, byte.MaxValue), (byte)g.Clamp(0, byte.MaxValue), (byte)b.Clamp(0, byte.MaxValue))
- { }
-
- ///
- /// Initializes a new instance of the struct using ARGB-percent values.
- ///
- /// The alpha component value of this .
- /// The red component value of this .
- /// The green component value of this .
- /// The blue component value of this .
- public Color(int a, double r, double g, double b)
- : this((byte)a.Clamp(0, byte.MaxValue), r, g, b)
- { }
-
- ///
- /// Initializes a new instance of the struct using ARGB-percent values.
- ///
- /// The alpha component value of this .
- /// The red component value of this .
- /// The green component value of this .
- /// The blue component value of this .
- public Color(byte a, double r, double g, double b)
- : this(a.GetPercentageFromByteValue(), r, g, b)
- { }
-
- ///
- /// Initializes a new instance of the struct using ARGB-percent values.
- ///
- /// The alpha component value of this .
- /// The red component value of this .
- /// The green component value of this .
- /// The blue component value of this .
- public Color(double a, double r, double g, double b)
- {
- A = a.Clamp(0, 1);
- R = r.Clamp(0, 1);
- G = g.Clamp(0, 1);
- B = b.Clamp(0, 1);
- }
-
- ///
- ///
- /// Initializes a new instance of the struct by cloning a existing .
- ///
- /// The the values are copied from.
- public Color(Color color)
- : this(color.A, color.R, color.G, color.B)
- { }
-
- #endregion
-
- #region Methods
-
- ///
- /// Gets a human-readable string, as defined by the current .
- ///
- /// A string that contains the individual byte values of this . Default format: "[A: 255, R: 255, G: 0, B: 0]".
- public override string ToString() => Behavior.ToString(this);
-
- ///
- /// Tests whether the specified object is a and is equivalent to this , as defined by the current .
- ///
- /// The object to test.
- /// true if is a equivalent to this ; otherwise, false.
- public override bool Equals(object obj) => Behavior.Equals(this, obj);
-
- ///
- /// Returns a hash code for this , as defined by the current .
- ///
- /// An integer value that specifies the hash code for this .
- public override int GetHashCode() => Behavior.GetHashCode(this);
-
- ///
- /// Blends a over this color, as defined by the current .
- ///
- /// The to blend.
- public Color Blend(Color color) => Behavior.Blend(this, color);
-
- #endregion
-
- #region Operators
-
- ///
- /// Blends the provided colors as if would've been called on .
- ///
- /// The base color.
- /// The color to blend.
- /// The blended color.
- public static Color operator +(Color color1, Color color2) => color1.Blend(color2);
-
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are equal; otherwise, false.
- public static bool operator ==(Color color1, Color color2) => color1.Equals(color2);
-
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are not equal; otherwise, false.
- public static bool operator !=(Color color1, Color color2) => !(color1 == color2);
-
- ///
- /// Converts a of ARGB-components to a .
- ///
- /// The containing the components.
- /// The color.
- public static implicit operator Color((byte r, byte g, byte b) components) => new Color(components.r, components.g, components.b);
-
- ///
- /// Converts a of ARGB-components to a .
- ///
- /// The containing the components.
- /// The color.
- public static implicit operator Color((byte a, byte r, byte g, byte b) components) => new Color(components.a, components.r, components.g, components.b);
-
- ///
- /// Converts a of ARGB-components to a .
- ///
- /// The containing the components.
- /// The color.
- public static implicit operator Color((int r, int g, int b) components) => new Color(components.r, components.g, components.b);
-
- ///
- /// Converts a of ARGB-components to a .
- ///
- /// The containing the components.
- /// The color.
- public static implicit operator Color((int a, int r, int g, int b) components) => new Color(components.a, components.r, components.g, components.b);
-
- ///
- /// Converts a of ARGB-components to a .
- ///
- /// The containing the components.
- /// The color.
- public static implicit operator Color((double r, double g, double b) components) => new Color(components.r, components.g, components.b);
-
- ///
- /// Converts a of ARGB-components to a .
- ///
- /// The containing the components.
- /// The color.
- public static implicit operator Color((double a, double r, double g, double b) components) => new Color(components.a, components.r, components.g, components.b);
-
- #endregion
+ A = a.Clamp(0, 1);
+ R = r.Clamp(0, 1);
+ G = g.Clamp(0, 1);
+ B = b.Clamp(0, 1);
}
-}
+
+ ///
+ ///
+ /// Initializes a new instance of the struct by cloning a existing .
+ ///
+ /// The the values are copied from.
+ public Color(in Color color)
+ : this(color.A, color.R, color.G, color.B)
+ { }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Gets a human-readable string, as defined by the current .
+ ///
+ /// A string that contains the individual byte values of this . Default format: "[A: 255, R: 255, G: 0, B: 0]".
+ public override string ToString() => Behavior.ToString(this);
+
+ ///
+ /// Tests whether the specified object is a and is equivalent to this , as defined by the current .
+ ///
+ /// The object to test.
+ /// true if is a equivalent to this ; otherwise, false.
+ public override bool Equals(object? obj) => Behavior.Equals(this, obj);
+
+ ///
+ /// Returns a hash code for this , as defined by the current .
+ ///
+ /// An integer value that specifies the hash code for this .
+ // ReSharper disable once NonReadonlyMemberInGetHashCode
+ public override int GetHashCode() => Behavior.GetHashCode(this);
+
+ ///
+ /// Blends a over this color, as defined by the current .
+ ///
+ /// The to blend.
+ public Color Blend(in Color color) => Behavior.Blend(this, color);
+
+ #endregion
+
+ #region Operators
+
+ ///
+ /// Blends the provided colors as if would've been called on .
+ ///
+ /// The base color.
+ /// The color to blend.
+ /// The blended color.
+ public static Color operator +(in Color color1, in Color color2) => color1.Blend(color2);
+
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are equal; otherwise, false.
+ public static bool operator ==(in Color color1, in Color color2) => color1.Equals(color2);
+
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are not equal; otherwise, false.
+ public static bool operator !=(in Color color1, in Color color2) => !(color1 == color2);
+
+ ///
+ /// Converts a of ARGB-components to a .
+ ///
+ /// The containing the components.
+ /// The color.
+ public static implicit operator Color((byte r, byte g, byte b) components) => new(components.r, components.g, components.b);
+
+ ///
+ /// Converts a of ARGB-components to a .
+ ///
+ /// The containing the components.
+ /// The color.
+ public static implicit operator Color((byte a, byte r, byte g, byte b) components) => new(components.a, components.r, components.g, components.b);
+
+ ///
+ /// Converts a of ARGB-components to a .
+ ///
+ /// The containing the components.
+ /// The color.
+ public static implicit operator Color((int r, int g, int b) components) => new(components.r, components.g, components.b);
+
+ ///
+ /// Converts a of ARGB-components to a .
+ ///
+ /// The containing the components.
+ /// The color.
+ public static implicit operator Color((int a, int r, int g, int b) components) => new(components.a, components.r, components.g, components.b);
+
+ ///
+ /// Converts a of ARGB-components to a .
+ ///
+ /// The containing the components.
+ /// The color.
+ public static implicit operator Color((float r, float g, float b) components) => new(components.r, components.g, components.b);
+
+ ///
+ /// Converts a of ARGB-components to a .
+ ///
+ /// The containing the components.
+ /// The color.
+ public static implicit operator Color((float a, float r, float g, float b) components) => new(components.a, components.r, components.g, components.b);
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Color/HSVColor.cs b/RGB.NET.Core/Color/HSVColor.cs
index f99581c7..35af63fe 100644
--- a/RGB.NET.Core/Color/HSVColor.cs
+++ b/RGB.NET.Core/Color/HSVColor.cs
@@ -2,226 +2,227 @@
// ReSharper disable UnusedMember.Global
using System;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Contains helper-methods and extension for the -type to work in the HSV color space.
+///
+public static class HSVColor
{
- public static class HSVColor
+ #region Getter
+
+ ///
+ /// Gets the hue component value (HSV-color space) of this as degree in the range [0..360].
+ ///
+ /// The color to get the value from.
+ /// The hue component value of the color.
+ public static float GetHue(this in Color color) => color.GetHSV().hue;
+
+ ///
+ /// Gets the saturation component value (HSV-color space) of this in the range [0..1].
+ ///
+ /// The color to get the value from.
+ /// The saturation component value of the color.
+ public static float GetSaturation(this in Color color) => color.GetHSV().saturation;
+
+ ///
+ /// Gets the value component value (HSV-color space) of this in the range [0..1].
+ ///
+ /// The color to get the value from.
+ /// The value component value of the color.
+ public static float GetValue(this in Color color) => color.GetHSV().value;
+
+ ///
+ /// Gets the hue, saturation and value component values (HSV-color space) of this .
+ /// Hue as degree in the range [0..1].
+ /// Saturation in the range [0..1].
+ /// Value in the range [0..1].
+ ///
+ /// The color to get the value from.
+ /// A tuple containing the hue, saturation and value component value of the color.
+ public static (float hue, float saturation, float value) GetHSV(this in Color color)
+ => CaclulateHSVFromRGB(color.R, color.G, color.B);
+
+ #endregion
+
+ #region Manipulation
+
+ ///
+ /// Adds the specified HSV values to this color.
+ ///
+ /// The color to modify.
+ /// The hue value to add.
+ /// The saturation value to add.
+ /// The value value to add.
+ /// The new color after the modification.
+ public static Color AddHSV(this in Color color, float hue = 0, float saturation = 0, float value = 0)
{
- #region Getter
-
- ///
- /// Gets the hue component value (HSV-color space) of this as degree in the range [0..360].
- ///
- ///
- ///
- public static double GetHue(this Color color) => color.GetHSV().hue;
-
- ///
- /// Gets the saturation component value (HSV-color space) of this in the range [0..1].
- ///
- ///
- ///
- public static double GetSaturation(this Color color) => color.GetHSV().saturation;
-
- ///
- /// Gets the value component value (HSV-color space) of this in the range [0..1].
- ///
- ///
- ///
- public static double GetValue(this Color color) => color.GetHSV().value;
-
- ///
- /// Gets the hue, saturation and value component values (HSV-color space) of this .
- /// Hue as degree in the range [0..1].
- /// Saturation in the range [0..1].
- /// Value in the range [0..1].
- ///
- ///
- ///
- public static (double hue, double saturation, double value) GetHSV(this Color color)
- => CaclulateHSVFromRGB(color.R, color.G, color.B);
-
- #endregion
-
- #region Manipulation
-
- ///
- /// Adds the given HSV values to this color.
- ///
- /// The hue value to add.
- /// The saturation value to add.
- /// The value value to add.
- /// The new color after the modification.
- public static Color AddHSV(this Color color, double hue = 0, double saturation = 0, double value = 0)
- {
- (double cHue, double cSaturation, double cValue) = color.GetHSV();
- return Create(color.A, cHue + hue, cSaturation + saturation, cValue + value);
- }
-
- ///
- /// Subtracts the given HSV values to this color.
- ///
- /// The hue value to subtract.
- /// The saturation value to subtract.
- /// The value value to subtract.
- /// The new color after the modification.
- public static Color SubtractHSV(this Color color, double hue = 0, double saturation = 0, double value = 0)
- {
- (double cHue, double cSaturation, double cValue) = color.GetHSV();
- return Create(color.A, cHue - hue, cSaturation - saturation, cValue - value);
- }
-
- ///
- /// Multiplies the given HSV values to this color.
- ///
- /// The hue value to multiply.
- /// The saturation value to multiply.
- /// The value value to multiply.
- /// The new color after the modification.
- public static Color MultiplyHSV(this Color color, double hue = 1, double saturation = 1, double value = 1)
- {
- (double cHue, double cSaturation, double cValue) = color.GetHSV();
- return Create(color.A, cHue * hue, cSaturation * saturation, cValue * value);
- }
-
- ///
- /// Divides the given HSV values to this color.
- ///
- /// The hue value to divide.
- /// The saturation value to divide.
- /// The value value to divide.
- /// The new color after the modification.
- public static Color DivideHSV(this Color color, double hue = 1, double saturation = 1, double value = 1)
- {
- (double cHue, double cSaturation, double cValue) = color.GetHSV();
- return Create(color.A, cHue / hue, cSaturation / saturation, cValue / value);
- }
-
- ///
- /// Sets the given hue value of this color.
- ///
- /// The hue value to set.
- /// The saturation value to set.
- /// The value value to set.
- /// The new color after the modification.
- public static Color SetHSV(this Color color, double? hue = null, double? saturation = null, double? value = null)
- {
- (double cHue, double cSaturation, double cValue) = color.GetHSV();
- return Create(color.A, hue ?? cHue, saturation ?? cSaturation, value ?? cValue);
- }
-
- #endregion
-
- #region Factory
-
- ///
- /// Creates a new instance of the struct using HSV-Values.
- ///
- /// The hue component value of this .
- /// The saturation component value of this .
- /// The value component value of this .
- /// The color created from the values.
- public static Color Create(double hue, double saturation, double value)
- => Create(1.0, hue, saturation, value);
-
- ///
- /// Creates a new instance of the struct using AHSV-Values.
- ///
- /// The alpha component value of this .
- /// The hue component value of this .
- /// The saturation component value of this .
- /// The value component value of this .
- /// The color created from the values.
- public static Color Create(byte a, double hue, double saturation, double value)
- => Create((double)a / byte.MaxValue, hue, saturation, value);
-
- ///
- /// Creates a new instance of the struct using AHSV-Values.
- ///
- /// The alpha component value of this .
- /// The hue component value of this .
- /// The saturation component value of this .
- /// The value component value of this .
- /// The color created from the values.
- public static Color Create(int a, double hue, double saturation, double value)
- => Create((double)a / byte.MaxValue, hue, saturation, value);
-
- ///
- /// Creates a new instance of the struct using AHSV-Values.
- ///
- /// The alpha component value of this .
- /// The hue component value of this .
- /// The saturation component value of this .
- /// The value component value of this .
- /// The color created from the values.
- public static Color Create(double a, double hue, double saturation, double value)
- {
- (double r, double g, double b) = CalculateRGBFromHSV(hue, saturation, value);
- return new Color(a, r, g, b);
- }
+ (float cHue, float cSaturation, float cValue) = color.GetHSV();
+ return Create(color.A, cHue + hue, cSaturation + saturation, cValue + value);
+ }
- #endregion
+ ///
+ /// Subtracts the specified HSV values to this color.
+ ///
+ /// The color to modify.
+ /// The hue value to subtract.
+ /// The saturation value to subtract.
+ /// The value value to subtract.
+ /// The new color after the modification.
+ public static Color SubtractHSV(this in Color color, float hue = 0, float saturation = 0, float value = 0)
+ {
+ (float cHue, float cSaturation, float cValue) = color.GetHSV();
+ return Create(color.A, cHue - hue, cSaturation - saturation, cValue - value);
+ }
- #region Helper
+ ///
+ /// Multiplies the specified HSV values to this color.
+ ///
+ /// The color to modify.
+ /// The hue value to multiply.
+ /// The saturation value to multiply.
+ /// The value value to multiply.
+ /// The new color after the modification.
+ public static Color MultiplyHSV(this in Color color, float hue = 1, float saturation = 1, float value = 1)
+ {
+ (float cHue, float cSaturation, float cValue) = color.GetHSV();
+ return Create(color.A, cHue * hue, cSaturation * saturation, cValue * value);
+ }
- private static (double h, double s, double v) CaclulateHSVFromRGB(double r, double g, double b)
- {
- if (r.EqualsInTolerance(g) && g.EqualsInTolerance(b)) return (0, 0, r);
+ ///
+ /// Divides the specified HSV values to this color.
+ ///
+ /// The color to modify.
+ /// The hue value to divide.
+ /// The saturation value to divide.
+ /// The value value to divide.
+ /// The new color after the modification.
+ public static Color DivideHSV(this in Color color, float hue = 1, float saturation = 1, float value = 1)
+ {
+ (float cHue, float cSaturation, float cValue) = color.GetHSV();
+ return Create(color.A, cHue / hue, cSaturation / saturation, cValue / value);
+ }
- double min = Math.Min(Math.Min(r, g), b);
- double max = Math.Max(Math.Max(r, g), b);
+ ///
+ /// Sets the specified hue value of this color.
+ ///
+ /// The color to modify.
+ /// The hue value to set.
+ /// The saturation value to set.
+ /// The value value to set.
+ /// The new color after the modification.
+ public static Color SetHSV(this in Color color, float? hue = null, float? saturation = null, float? value = null)
+ {
+ (float cHue, float cSaturation, float cValue) = color.GetHSV();
+ return Create(color.A, hue ?? cHue, saturation ?? cSaturation, value ?? cValue);
+ }
+
+ #endregion
+
+ #region Factory
+
+ ///
+ /// Creates a new instance of the struct using HSV-Values.
+ ///
+ /// The hue component value of this .
+ /// The saturation component value of this .
+ /// The value component value of this .
+ /// The color created from the values.
+ public static Color Create(float hue, float saturation, float value)
+ => Create(1.0f, hue, saturation, value);
+
+ ///
+ /// Creates a new instance of the struct using AHSV-Values.
+ ///
+ /// The alpha component value of this .
+ /// The hue component value of this .
+ /// The saturation component value of this .
+ /// The value component value of this .
+ /// The color created from the values.
+ public static Color Create(byte a, float hue, float saturation, float value)
+ => Create((float)a / byte.MaxValue, hue, saturation, value);
+
+ ///
+ /// Creates a new instance of the struct using AHSV-Values.
+ ///
+ /// The alpha component value of this .
+ /// The hue component value of this .
+ /// The saturation component value of this .
+ /// The value component value of this .
+ /// The color created from the values.
+ public static Color Create(int a, float hue, float saturation, float value)
+ => Create((float)a / byte.MaxValue, hue, saturation, value);
+
+ ///
+ /// Creates a new instance of the struct using AHSV-Values.
+ ///
+ /// The alpha component value of this .
+ /// The hue component value of this .
+ /// The saturation component value of this .
+ /// The value component value of this .
+ /// The color created from the values.
+ public static Color Create(float a, float hue, float saturation, float value)
+ {
+ (float r, float g, float b) = CalculateRGBFromHSV(hue, saturation, value);
+ return new Color(a, r, g, b);
+ }
+
+ #endregion
+
+ #region Helper
+
+ private static (float h, float s, float v) CaclulateHSVFromRGB(float r, float g, float b)
+ {
+ if (r.EqualsInTolerance(g) && g.EqualsInTolerance(b)) return (0, 0, r);
- double hue;
- if (max.EqualsInTolerance(min))
- hue = 0;
- else if (max.EqualsInTolerance(r)) // r is max
- hue = (g - b) / (max - min);
- else if (max.EqualsInTolerance(g)) // g is max
- hue = 2.0 + ((b - r) / (max - min));
- else // b is max
- hue = 4.0 + ((r - g) / (max - min));
+ float min = Math.Min(Math.Min(r, g), b);
+ float max = Math.Max(Math.Max(r, g), b);
- hue = hue * 60.0;
- hue = hue.Wrap(0, 360);
+ float hue;
+ if (max.EqualsInTolerance(min))
+ hue = 0;
+ else if (max.EqualsInTolerance(r)) // r is max
+ hue = (g - b) / (max - min);
+ else if (max.EqualsInTolerance(g)) // g is max
+ hue = 2.0f + ((b - r) / (max - min));
+ else // b is max
+ hue = 4.0f + ((r - g) / (max - min));
- double saturation = max.EqualsInTolerance(0) ? 0 : 1.0 - (min / max);
- double value = Math.Max(r, Math.Max(g, b));
+ hue *= 60.0f;
+ hue = hue.Wrap(0, 360);
- return (hue, saturation, value);
- }
+ float saturation = max.EqualsInTolerance(0) ? 0 : 1.0f - (min / max);
+ float value = Math.Max(r, Math.Max(g, b));
- private static (double r, double g, double b) CalculateRGBFromHSV(double h, double s, double v)
+ return (hue, saturation, value);
+ }
+
+ private static (float r, float g, float b) CalculateRGBFromHSV(float h, float s, float v)
+ {
+ h = h.Wrap(0, 360);
+ s = s.Clamp(0, 1);
+ v = v.Clamp(0, 1);
+
+ if (s <= 0.0)
+ return (v, v, v);
+
+ float hh = h / 60.0f;
+ int i = (int)hh;
+ float ff = hh - i;
+ float p = v * (1.0f - s);
+ float q = v * (1.0f - (s * ff));
+ float t = v * (1.0f - (s * (1.0f - ff)));
+
+ return i switch
{
- h = h.Wrap(0, 360);
- s = s.Clamp(0, 1);
- v = v.Clamp(0, 1);
-
- if (s <= 0.0)
- return (v, v, v);
-
- double hh = h / 60.0;
- int i = (int)hh;
- double ff = hh - i;
- double p = v * (1.0 - s);
- double q = v * (1.0 - (s * ff));
- double t = v * (1.0 - (s * (1.0 - ff)));
-
- switch (i)
- {
- case 0:
- return (v, t, p);
- case 1:
- return (q, v, p);
- case 2:
- return (p, v, t);
- case 3:
- return (p, q, v);
- case 4:
- return (t, p, v);
- default:
- return (v, p, q);
- }
- }
-
- #endregion
+ 0 => (v, t, p),
+ 1 => (q, v, p),
+ 2 => (p, v, t),
+ 3 => (p, q, v),
+ 4 => (t, p, v),
+ _ => (v, p, q)
+ };
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Color/HclColor.cs b/RGB.NET.Core/Color/HclColor.cs
new file mode 100644
index 00000000..4133c582
--- /dev/null
+++ b/RGB.NET.Core/Color/HclColor.cs
@@ -0,0 +1,211 @@
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable UnusedMember.Global
+using System;
+
+namespace RGB.NET.Core;
+
+///
+/// Contains helper-methods and extension for the -type to work in the Hcl color space.
+///
+public static class HclColor
+{
+ #region Getter
+
+ ///
+ /// Gets the H component value (Hcl-color space) of this in the range [0..360].
+ ///
+ /// The color to get the value from.
+ /// The H component value of the color.
+ public static float GetHclH(this in Color color) => color.GetHcl().h;
+
+ ///
+ /// Gets the c component value (Hcl-color space) of this in the range [0..1].
+ ///
+ /// The color to get the value from.
+ /// The c component value of the color.
+ public static float GetHclC(this in Color color) => color.GetHcl().c;
+
+ ///
+ /// Gets the l component value (Hcl-color space) of this in the range [0..1].
+ ///
+ /// The color to get the value from.
+ /// The l component value of the color.
+ public static float GetHclL(this in Color color) => color.GetHcl().l;
+
+ ///
+ /// Gets the H, c and l component values (Hcl-color space) of this .
+ /// H in the range [0..360].
+ /// c in the range [0..1].
+ /// l in the range [0..1].
+ ///
+ /// The color to get the value from.
+ /// A tuple containing the H, c and l component value of the color.
+ public static (float h, float c, float l) GetHcl(this in Color color)
+ => CalculateHclFromRGB(color.R, color.G, color.B);
+
+ #endregion
+
+ #region Manipulation
+
+ ///
+ /// Adds the specified Hcl values to this color.
+ ///
+ /// The color to modify.
+ /// The H value to add.
+ /// The c value to add.
+ /// The l value to add.
+ /// The new color after the modification.
+ public static Color AddHcl(this in Color color, float h = 0, float c = 0, float l = 0)
+ {
+ (float cH, float cC, float cL) = color.GetHcl();
+ return Create(color.A, cH + h, cC + c, cL + l);
+ }
+
+ ///
+ /// Subtracts the specified Hcl values to this color.
+ ///
+ /// The color to modify.
+ /// The H value to subtract.
+ /// The c value to subtract.
+ /// The l value to subtract.
+ /// The new color after the modification.
+ public static Color SubtractHcl(this in Color color, float h = 0, float c = 0, float l = 0)
+ {
+ (float cH, float cC, float cL) = color.GetHcl();
+ return Create(color.A, cH - h, cC - c, cL - l);
+ }
+
+ ///
+ /// Multiplies the specified Hcl values to this color.
+ ///
+ /// The color to modify.
+ /// The H value to multiply.
+ /// The c value to multiply.
+ /// The l value to multiply.
+ /// The new color after the modification.
+ public static Color MultiplyHcl(this in Color color, float h = 1, float c = 1, float l = 1)
+ {
+ (float cH, float cC, float cL) = color.GetHcl();
+ return Create(color.A, cH * h, cC * c, cL * l);
+ }
+
+ ///
+ /// Divides the specified Hcl values to this color.
+ ///
+ /// The color to modify.
+ /// The H value to divide.
+ /// The c value to divide.
+ /// The l value to divide.
+ /// The new color after the modification.
+ public static Color DivideHcl(this in Color color, float h = 1, float c = 1, float l = 1)
+ {
+ (float cH, float cC, float cL) = color.GetHcl();
+ return Create(color.A, cH / h, cC / c, cL / l);
+ }
+
+ ///
+ /// Sets the specified X value of this color.
+ ///
+ /// The color to modify.
+ /// The H value to set.
+ /// The c value to set.
+ /// The l value to set.
+ /// The new color after the modification.
+ public static Color SetHcl(this in Color color, float? h = null, float? c = null, float? l = null)
+ {
+ (float cH, float cC, float cL) = color.GetHcl();
+ return Create(color.A, h ?? cH, c ?? cC, l ?? cL);
+ }
+
+ #endregion
+
+ #region Factory
+
+ ///
+ /// Creates a new instance of the struct using Hcl-Values.
+ ///
+ /// The H component value of this .
+ /// The c component value of this .
+ /// The l component value of this .
+ /// The color created from the values.
+ public static Color Create(float h, float c, float l)
+ => Create(1.0f, h, c, l);
+
+ ///
+ /// Creates a new instance of the struct using alpha and Hcl-Values.
+ ///
+ /// The alphc component value of this .
+ /// The H component value of this .
+ /// The c component value of this .
+ /// The l component value of this .
+ /// The color created from the values.
+ public static Color Create(byte alpha, float h, float c, float l)
+ => Create((float)alpha / byte.MaxValue, h, c, l);
+
+ ///
+ /// Creates a new instance of the struct using alpha and Hcl-Values.
+ ///
+ /// The alphc component value of this .
+ /// The H component value of this .
+ /// The c component value of this .
+ /// The l component value of this .
+ /// The color created from the values.
+ public static Color Create(int alpha, float h, float c, float l)
+ => Create((float)alpha / byte.MaxValue, h, c, l);
+
+ ///
+ /// Creates a new instance of the struct using alpha and Hcl-Values.
+ ///
+ /// The alphc component value of this .
+ /// The H component value of this .
+ /// The c component value of this .
+ /// The l component value of this .
+ /// The color created from the values.
+ public static Color Create(float alpha, float h, float c, float l)
+ {
+ (float r, float g, float b) = CalculateRGBFromHcl(h, c, l);
+ return new Color(alpha, r, g, b);
+ }
+
+ #endregion
+
+ #region Helper
+
+ private static (float h, float c, float l) CalculateHclFromRGB(float r, float g, float b)
+ {
+ const float RADIANS_DEGREES_CONVERSION = 180.0f / MathF.PI;
+
+ // ReSharper disable once InconsistentNaming - b is used above
+ (float l, float a, float _b) = LabColor.CalculateLabFromRGB(r, g, b);
+
+ float h, c;
+ if (r.EqualsInTolerance(g) && r.EqualsInTolerance(b)) //DarthAffe 26.02.2021: The cumulated rounding errors are big enough to cause problems in that case
+ {
+ h = 0;
+ c = 0;
+ }
+ else
+ {
+ h = MathF.Atan2(_b, a);
+ if (h >= 0) h *= RADIANS_DEGREES_CONVERSION;
+ else h = 360 - (-h * RADIANS_DEGREES_CONVERSION);
+
+ c = MathF.Sqrt((a * a) + (_b * _b));
+ }
+
+ return (h, c, l);
+ }
+
+ private static (float r, float g, float b) CalculateRGBFromHcl(float h, float c, float l)
+ {
+ const float DEGREES_RADIANS_CONVERSION = MathF.PI / 180.0f;
+
+ h *= DEGREES_RADIANS_CONVERSION;
+ float a = c * MathF.Cos(h);
+ float b = c * MathF.Sin(h);
+
+ return LabColor.CalculateRGBFromLab(l, a, b);
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Color/LabColor.cs b/RGB.NET.Core/Color/LabColor.cs
new file mode 100644
index 00000000..7be06502
--- /dev/null
+++ b/RGB.NET.Core/Color/LabColor.cs
@@ -0,0 +1,227 @@
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable UnusedMember.Global
+using System;
+
+namespace RGB.NET.Core;
+
+///
+/// Contains helper-methods and extension for the -type to work in the Lab color space.
+///
+public static class LabColor
+{
+ #region Getter
+
+ ///
+ /// Gets the L component value (Lab-color space) of this in the range [0..100].
+ ///
+ /// The color to get the value from.
+ /// The L component value of the color.
+ public static float GetLabL(this in Color color) => color.GetLab().l;
+
+ ///
+ /// Gets the a component value (Lab-color space) of this in the range [0..1].
+ ///
+ /// The color to get the value from.
+ /// The a component value of the color.
+ public static float GetLabA(this in Color color) => color.GetLab().a;
+
+ ///
+ /// Gets the b component value (Lab-color space) of this in the range [0..1].
+ ///
+ /// The color to get the value from.
+ /// The b component value of the color.
+ public static float GetLabB(this in Color color) => color.GetLab().b;
+
+ ///
+ /// Gets the L, a and b component values (Lab-color space) of this .
+ /// L in the range [0..100].
+ /// a in the range [0..1].
+ /// b in the range [0..1].
+ ///
+ /// The color to get the value from.
+ /// A tuple containing the L, a and b component value of the color.
+ public static (float l, float a, float b) GetLab(this in Color color)
+ => CalculateLabFromRGB(color.R, color.G, color.B);
+
+ #endregion
+
+ #region Manipulation
+
+ ///
+ /// Adds the specified Lab values to this color.
+ ///
+ /// The color to modify.
+ /// The L value to add.
+ /// The a value to add.
+ /// The b value to add.
+ /// The new color after the modification.
+ public static Color AddLab(this in Color color, float l = 0, float a = 0, float b = 0)
+ {
+ (float cL, float cA, float cB) = color.GetLab();
+ return Create(color.A, cL + l, cA + a, cB + b);
+ }
+
+ ///
+ /// Subtracts the specified Lab values to this color.
+ ///
+ /// The color to modify.
+ /// The L value to subtract.
+ /// The a value to subtract.
+ /// The b value to subtract.
+ /// The new color after the modification.
+ public static Color SubtractLab(this in Color color, float l = 0, float a = 0, float b = 0)
+ {
+ (float cL, float cA, float cB) = color.GetLab();
+ return Create(color.A, cL - l, cA - a, cB - b);
+ }
+
+ ///
+ /// Multiplies the specified Lab values to this color.
+ ///
+ /// The color to modify.
+ /// The L value to multiply.
+ /// The a value to multiply.
+ /// The b value to multiply.
+ /// The new color after the modification.
+ public static Color MultiplyLab(this in Color color, float l = 1, float a = 1, float b = 1)
+ {
+ (float cL, float cA, float cB) = color.GetLab();
+ return Create(color.A, cL * l, cA * a, cB * b);
+ }
+
+ ///
+ /// Divides the specified Lab values to this color.
+ ///
+ /// The color to modify.
+ /// The L value to divide.
+ /// The a value to divide.
+ /// The b value to divide.
+ /// The new color after the modification.
+ public static Color DivideLab(this in Color color, float l = 1, float a = 1, float b = 1)
+ {
+ (float cL, float cA, float cB) = color.GetLab();
+ return Create(color.A, cL / l, cA / a, cB / b);
+ }
+
+ ///
+ /// Sets the specified X valueof this color.
+ ///
+ /// The color to modify.
+ /// The L value to set.
+ /// The a value to set.
+ /// The b value to set.
+ /// The new color after the modification.
+ public static Color SetLab(this in Color color, float? l = null, float? a = null, float? b = null)
+ {
+ (float cL, float cA, float cB) = color.GetLab();
+ return Create(color.A, l ?? cL, a ?? cA, b ?? cB);
+ }
+
+ #endregion
+
+ #region Factory
+
+ ///
+ /// Creates a new instance of the struct using Lab-Values.
+ ///
+ /// The L component value of this .
+ /// The a component value of this .
+ /// The b component value of this .
+ /// The color created from the values.
+ public static Color Create(float l, float a, float b)
+ => Create(1.0f, l, a, b);
+
+ ///
+ /// Creates a new instance of the struct using alpha and Lab-Values.
+ ///
+ /// The alpha component value of this .
+ /// The L component value of this .
+ /// The a component value of this .
+ /// The b component value of this .
+ /// The color created from the values.
+ public static Color Create(byte alpha, float l, float a, float b)
+ => Create((float)alpha / byte.MaxValue, l, a, b);
+
+ ///
+ /// Creates a new instance of the struct using alpha and Lab-Values.
+ ///
+ /// The alpha component value of this .
+ /// The L component value of this .
+ /// The a component value of this .
+ /// The b component value of this .
+ /// The color created from the values.
+ public static Color Create(int alpha, float l, float a, float b)
+ => Create((float)alpha / byte.MaxValue, l, a, b);
+
+ ///
+ /// Creates a new instance of the struct using alpha and Lab-Values.
+ ///
+ /// The alpha component value of this .
+ /// The L component value of this .
+ /// The a component value of this .
+ /// The b component value of this .
+ /// The color created from the values.
+ public static Color Create(float alpha, float l, float a, float b)
+ {
+ // ReSharper disable once InconsistentNaming - b is used above
+ (float r, float g, float _b) = CalculateRGBFromLab(l, a, b);
+ return new Color(alpha, r, g, _b);
+ }
+
+ #endregion
+
+ #region Helper
+
+ internal static (float l, float a, float b) CalculateLabFromRGB(float r, float g, float b)
+ {
+ (float x, float y, float z) = XYZColor.CaclulateXYZFromRGB(r, g, b);
+ return CaclulateLabFromXYZ(x, y, z);
+ }
+
+ internal static (float r, float g, float b) CalculateRGBFromLab(float l, float a, float b)
+ {
+ (float x, float y, float z) = CalculateXYZFromLab(l, a, b);
+ return XYZColor.CalculateRGBFromXYZ(x, y, z);
+ }
+
+ private static (float l, float a, float b) CaclulateLabFromXYZ(float x, float y, float z)
+ {
+ const float ONETHRID = 1.0f / 3.0f;
+ const float FACTOR2 = 16.0f / 116.0f;
+
+ x /= 95.047f;
+ y /= 100.0f;
+ z /= 108.883f;
+
+ x = ((x > 0.008856f) ? (MathF.Pow(x, ONETHRID)) : ((7.787f * x) + FACTOR2));
+ y = ((y > 0.008856f) ? (MathF.Pow(y, ONETHRID)) : ((7.787f * y) + FACTOR2));
+ z = ((z > 0.008856f) ? (MathF.Pow(z, ONETHRID)) : ((7.787f * z) + FACTOR2));
+
+ float l = (116.0f * y) - 16.0f;
+ float a = 500.0f * (x - y);
+ float b = 200.0f * (y - z);
+
+ return (l, a, b);
+ }
+
+ private static (float x, float y, float z) CalculateXYZFromLab(float l, float a, float b)
+ {
+ const float FACTOR2 = 16.0f / 116.0f;
+
+ float y = (l + 16.0f) / 116.0f;
+ float x = (a / 500.0f) + y;
+ float z = y - (b / 200.0f);
+
+ float powX = MathF.Pow(x, 3.0f);
+ float powY = MathF.Pow(y, 3.0f);
+ float powZ = MathF.Pow(z, 3.0f);
+
+ x = ((powX > 0.008856f) ? (powX) : ((x - FACTOR2) / 7.787f));
+ y = ((powY > 0.008856f) ? (powY) : ((y - FACTOR2) / 7.787f));
+ z = ((powZ > 0.008856f) ? (powZ) : ((z - FACTOR2) / 7.787f));
+
+ return (x * 95.047f, y * 100.0f, z * 108.883f);
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Color/RGBColor.cs b/RGB.NET.Core/Color/RGBColor.cs
index b1960767..9ffa528d 100644
--- a/RGB.NET.Core/Color/RGBColor.cs
+++ b/RGB.NET.Core/Color/RGBColor.cs
@@ -2,274 +2,294 @@
// ReSharper disable UnusedMember.Global
using System;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Contains helper-methods and extension for the -type to work in the RGB color space.
+///
+public static class RGBColor
{
- public static class RGBColor
+ #region Getter
+
+ ///
+ /// Gets the A component value of this as byte in the range [0..255].
+ ///
+ /// The color to get the value from.
+ /// The A component value of the color.
+ public static byte GetA(this in Color color) => color.A.GetByteValueFromPercentage();
+
+ ///
+ /// Gets the R component value of this as byte in the range [0..255].
+ ///
+ /// The color to get the value from.
+ /// The R component value of the color.
+ public static byte GetR(this in Color color) => color.R.GetByteValueFromPercentage();
+
+ ///
+ /// Gets the G component value of this as byte in the range [0..255].
+ ///
+ /// The color to get the value from.
+ /// The G component value of the color.
+ public static byte GetG(this in Color color) => color.G.GetByteValueFromPercentage();
+
+ ///
+ /// Gets the B component value of this as byte in the range [0..255].
+ ///
+ /// The color to get the value from.
+ /// The B component value of the color.
+ public static byte GetB(this in Color color) => color.B.GetByteValueFromPercentage();
+
+ ///
+ /// Gets the A, R, G and B component value of this as byte in the range [0..255].
+ ///
+ /// The color to get the value from.
+ /// A tuple containing the A, R, G and B component value of the color.
+ public static (byte a, byte r, byte g, byte b) GetRGBBytes(this in Color color)
+ => (color.GetA(), color.GetR(), color.GetG(), color.GetB());
+
+ ///
+ /// Gets the A, R, G and B component value of this as percentage in the range [0..1].
+ ///
+ /// The color to get the value from.
+ /// A tuple containing the A, R, G and B component value of the color.
+ public static (float a, float r, float g, float b) GetRGB(this in Color color)
+ => (color.A, color.R, color.G, color.B);
+
+ #endregion
+
+ #region Manipulation
+
+ #region Add
+
+ ///
+ /// Adds the specified RGB values to this color.
+ ///
+ /// The color to modify.
+ /// The red value to add.
+ /// The green value to add.
+ /// The blue value to add.
+ /// The new color after the modification.
+ public static Color AddRGB(this in Color color, int r = 0, int g = 0, int b = 0)
+ => new(color.A, color.GetR() + r, color.GetG() + g, color.GetB() + b);
+
+ ///
+ /// Adds the specified RGB-percent values to this color.
+ ///
+ /// The color to modify.
+ /// The red value to add.
+ /// The green value to add.
+ /// The blue value to add.
+ /// The new color after the modification.
+ public static Color AddRGB(this in Color color, float r = 0, float g = 0, float b = 0)
+ => new(color.A, color.R + r, color.G + g, color.B + b);
+
+ ///
+ /// Adds the specified alpha value to this color.
+ ///
+ /// The color to modify.
+ /// The alpha value to add.
+ /// The new color after the modification.
+ public static Color AddA(this in Color color, int a)
+ => new(color.GetA() + a, color.R, color.G, color.B);
+
+ ///
+ /// Adds the specified alpha-percent value to this color.
+ ///
+ /// The color to modify.
+ /// The alpha value to add.
+ /// The new color after the modification.
+ public static Color AddA(this in Color color, float a)
+ => new(color.A + a, color.R, color.G, color.B);
+
+ #endregion
+
+ #region Subtract
+
+ ///
+ /// Subtracts the specified RGB values to this color.
+ ///
+ /// The color to modify.
+ /// The red value to subtract.
+ /// The green value to subtract.
+ /// The blue value to subtract.
+ /// The new color after the modification.
+ public static Color SubtractRGB(this in Color color, int r = 0, int g = 0, int b = 0)
+ => new(color.A, color.GetR() - r, color.GetG() - g, color.GetB() - b);
+
+ ///
+ /// Subtracts the specified RGB values to this color.
+ ///
+ /// The color to modify.
+ /// The red value to subtract.
+ /// The green value to subtract.
+ /// The blue value to subtract.
+ /// The new color after the modification.
+ public static Color SubtractRGB(this in Color color, float r = 0, float g = 0, float b = 0)
+ => new(color.A, color.R - r, color.G - g, color.B - b);
+
+ ///
+ /// Subtracts the specified alpha value to this color.
+ ///
+ /// The color to modify.
+ /// The alpha value to subtract.
+ /// The new color after the modification.
+ public static Color SubtractA(this in Color color, int a)
+ => new(color.GetA() - a, color.R, color.G, color.B);
+
+ ///
+ /// Subtracts the specified alpha-percent value to this color.
+ ///
+ /// The color to modify.
+ /// The alpha value to subtract.
+ /// The new color after the modification.
+ public static Color SubtractA(this in Color color, float aPercent)
+ => new(color.A - aPercent, color.R, color.G, color.B);
+
+ #endregion
+
+ #region Multiply
+
+ ///
+ /// Multiplies the specified RGB values to this color.
+ ///
+ /// The color to modify.
+ /// The red value to multiply.
+ /// The green value to multiply.
+ /// The blue value to multiply.
+ /// The new color after the modification.
+ public static Color MultiplyRGB(this in Color color, float r = 1, float g = 1, float b = 1)
+ => new(color.A, color.R * r, color.G * g, color.B * b);
+
+ ///
+ /// Multiplies the specified alpha value to this color.
+ ///
+ /// The color to modify.
+ /// The alpha value to multiply.
+ /// The new color after the modification.
+ public static Color MultiplyA(this in Color color, float a)
+ => new(color.A * a, color.R, color.G, color.B);
+
+ #endregion
+
+ #region Divide
+
+ ///
+ /// Divides the specified RGB values to this color.
+ ///
+ /// The color to modify.
+ /// The red value to divide.
+ /// The green value to divide.
+ /// The blue value to divide.
+ /// The new color after the modification.
+ public static Color DivideRGB(this in Color color, float r = 1, float g = 1, float b = 1)
+ => new(color.A, color.R / r, color.G / g, color.B / b);
+
+ ///
+ /// Divides the specified alpha value to this color.
+ ///
+ /// The color to modify.
+ /// The alpha value to divide.
+ /// The new color after the modification.
+ public static Color DivideA(this in Color color, float a)
+ => new(color.A / a, color.R, color.G, color.B);
+
+ #endregion
+
+ #region Set
+
+ ///
+ /// Sets the specified RGB value of this color.
+ ///
+ /// The color to modify.
+ /// The red value to set.
+ /// The green value to set.
+ /// The blue value to set.
+ /// The new color after the modification.
+ public static Color SetRGB(this in Color color, byte? r = null, byte? g = null, byte? b = null)
+ => new(color.A, r ?? color.GetR(), g ?? color.GetG(), b ?? color.GetB());
+
+ ///
+ /// Sets the specified RGB value of this color.
+ ///
+ /// The color to modify.
+ /// The red value to set.
+ /// The green value to set.
+ /// The blue value to set.
+ /// The new color after the modification.
+ public static Color SetRGB(this in Color color, int? r = null, int? g = null, int? b = null)
+ => new(color.A, r ?? color.GetR(), g ?? color.GetG(), b ?? color.GetB());
+
+ ///
+ /// Sets the specified RGB value of this color.
+ ///
+ /// The color to modify.
+ /// The red value to set.
+ /// The green value to set.
+ /// The blue value to set.
+ /// The new color after the modification.
+ public static Color SetRGB(this in Color color, float? r = null, float? g = null, float? b = null)
+ => new(color.A, r ?? color.R, g ?? color.G, b ?? color.B);
+
+ ///
+ /// Sets the specified alpha value of this color.
+ ///
+ /// The color to modify.
+ /// The alpha value to set.
+ /// The new color after the modification.
+ public static Color SetA(this in Color color, int a) => new(a, color.R, color.G, color.B);
+
+ ///
+ /// Sets the specified alpha value of this color.
+ ///
+ /// The color to modify.
+ /// The alpha value to set.
+ /// The new color after the modification.
+ public static Color SetA(this in Color color, float a) => new(a, color.R, color.G, color.B);
+
+ #endregion
+
+ #endregion
+
+ #region Conversion
+
+ ///
+ /// Gets the current color as a RGB-HEX-string.
+ ///
+ /// The RGB-HEX-string.
+ public static string AsRGBHexString(this in Color color, bool leadingHash = true) => (leadingHash ? "#" : "") + ConversionHelper.ToHex(color.GetR(), color.GetG(), color.GetB());
+
+ ///
+ /// Gets the current color as a ARGB-HEX-string.
+ ///
+ /// The ARGB-HEX-string.
+ public static string AsARGBHexString(this in Color color, bool leadingHash = true) => (leadingHash ? "#" : "") + ConversionHelper.ToHex(color.GetA(), color.GetR(), color.GetG(), color.GetB());
+
+ #endregion
+
+ #region Factory
+
+ ///
+ /// Creates a new instance of the struct using a HEX-string.
+ ///
+ /// The HEX-representation of the color.
+ /// The color created from the HEX-string.
+ public static Color FromHexString(string hexString)
{
- #region Getter
-
- ///
- /// Gets the A component value of this as byte in the range [0..255].
- ///
- ///
- ///
- public static byte GetA(this Color color) => color.A.GetByteValueFromPercentage();
-
- ///
- /// Gets the R component value of this as byte in the range [0..255].
- ///
- ///
- ///
- public static byte GetR(this Color color) => color.R.GetByteValueFromPercentage();
-
- ///
- /// Gets the G component value of this as byte in the range [0..255].
- ///
- ///
- ///
- public static byte GetG(this Color color) => color.G.GetByteValueFromPercentage();
-
- ///
- /// Gets the B component value of this as byte in the range [0..255].
- ///
- ///
- ///
- public static byte GetB(this Color color) => color.B.GetByteValueFromPercentage();
-
- ///
- /// Gets the A, R, G and B component value of this as byte in the range [0..255].
- ///
- ///
- ///
- public static (byte a, byte r, byte g, byte b) GetRGBBytes(this Color color)
- => (color.GetA(), color.GetR(), color.GetG(), color.GetB());
-
- ///
- /// Gets the A, R, G and B component value of this as percentage in the range [0..1].
- ///
- ///
- ///
- public static (double a, double r, double g, double b) GetRGB(this Color color)
- => (color.A, color.R, color.G, color.B);
-
- #endregion
-
- #region Manipulation
-
- #region Add
-
- ///
- /// Adds the given RGB values to this color.
- ///
- /// The red value to add.
- /// The green value to add.
- /// The blue value to add.
- /// The new color after the modification.
- public static Color AddRGB(this Color color, int r = 0, int g = 0, int b = 0)
- => new Color(color.A, color.GetR() + r, color.GetG() + g, color.GetB() + b);
-
- ///
- /// Adds the given RGB-percent values to this color.
- ///
- /// The red value to add.
- /// The green value to add.
- /// The blue value to add.
- /// The new color after the modification.
- public static Color AddRGB(this Color color, double r = 0, double g = 0, double b = 0)
- => new Color(color.A, color.R + r, color.G + g, color.B + b);
-
- ///
- /// Adds the given alpha value to this color.
- ///
- /// The alpha value to add.
- /// The new color after the modification.
- public static Color AddA(this Color color, int a)
- => new Color(color.GetA() + a, color.R, color.G, color.B);
-
- ///
- /// Adds the given alpha-percent value to this color.
- ///
- /// The alpha value to add.
- /// The new color after the modification.
- public static Color AddA(this Color color, double a)
- => new Color(color.A + a, color.R, color.G, color.B);
-
- #endregion
-
- #region Subtract
-
- ///
- /// Subtracts the given RGB values to this color.
- ///
- /// The red value to subtract.
- /// The green value to subtract.
- /// The blue value to subtract.
- /// The new color after the modification.
- public static Color SubtractRGB(this Color color, int r = 0, int g = 0, int b = 0)
- => new Color(color.A, color.GetR() - r, color.GetG() - g, color.GetB() - b);
-
- ///
- /// Subtracts the given RGB values to this color.
- ///
- /// The red value to subtract.
- /// The green value to subtract.
- /// The blue value to subtract.
- /// The new color after the modification.
- public static Color SubtractRGB(this Color color, double r = 0, double g = 0, double b = 0)
- => new Color(color.A, color.R - r, color.G - g, color.B - b);
-
- ///
- /// Subtracts the given alpha value to this color.
- ///
- /// The alpha value to subtract.
- /// The new color after the modification.
- public static Color SubtractA(this Color color, int a)
- => new Color(color.GetA() - a, color.R, color.G, color.B);
-
- ///
- /// Subtracts the given alpha-percent value to this color.
- ///
- /// The alpha value to subtract.
- /// The new color after the modification.
- public static Color SubtractA(this Color color, double aPercent)
- => new Color(color.A - aPercent, color.R, color.G, color.B);
-
- #endregion
-
- #region Multiply
-
- ///
- /// Multiplies the given RGB values to this color.
- ///
- /// The red value to multiply.
- /// The green value to multiply.
- /// The blue value to multiply.
- /// The new color after the modification.
- public static Color MultiplyRGB(this Color color, double r = 1, double g = 1, double b = 1)
- => new Color(color.A, color.R * r, color.G * g, color.B * b);
-
- ///
- /// Multiplies the given alpha value to this color.
- ///
- /// The alpha value to multiply.
- /// The new color after the modification.
- public static Color MultiplyA(this Color color, double a)
- => new Color(color.A * a, color.R, color.G, color.B);
-
- #endregion
-
- #region Divide
-
- ///
- /// Divides the given RGB values to this color.
- ///
- /// The red value to divide.
- /// The green value to divide.
- /// The blue value to divide.
- /// The new color after the modification.
- public static Color DivideRGB(this Color color, double r = 1, double g = 1, double b = 1)
- => new Color(color.A, color.R / r, color.G / g, color.B / b);
-
- ///
- /// Divides the given alpha value to this color.
- ///
- /// The alpha value to divide.
- /// The new color after the modification.
- public static Color DivideA(this Color color, double a)
- => new Color(color.A / a, color.R, color.G, color.B);
-
- #endregion
-
- #region Set
-
- ///
- /// Sets the given RGB value of this color.
- ///
- /// The red value to set.
- /// The green value to set.
- /// The blue value to set.
- /// The new color after the modification.
- public static Color SetRGB(this Color color, byte? r = null, byte? g = null, byte? b = null)
- => new Color(color.A, r ?? color.GetR(), g ?? color.GetG(), b ?? color.GetB());
-
- ///
- /// Sets the given RGB value of this color.
- ///
- /// The red value to set.
- /// The green value to set.
- /// The blue value to set.
- /// The new color after the modification.
- public static Color SetRGB(this Color color, int? r = null, int? g = null, int? b = null)
- => new Color(color.A, r ?? color.GetR(), g ?? color.GetG(), b ?? color.GetB());
-
- ///
- /// Sets the given RGB value of this color.
- ///
- /// The red value to set.
- /// The green value to set.
- /// The blue value to set.
- /// The new color after the modification.
- public static Color SetRGB(this Color color, double? r = null, double? g = null, double? b = null)
- => new Color(color.A, r ?? color.R, g ?? color.G, b ?? color.B);
-
- ///
- /// Sets the given alpha value of this color.
- ///
- /// The alpha value to set.
- /// The new color after the modification.
- public static Color SetA(this Color color, int a) => new Color(a, color.R, color.G, color.B);
-
- ///
- /// Sets the given alpha value of this color.
- ///
- /// The alpha value to set.
- /// The new color after the modification.
- public static Color SetA(this Color color, double a) => new Color(a, color.R, color.G, color.B);
-
- #endregion
-
- #endregion
-
- #region Conversion
-
- ///
- /// Gets the current color as a RGB-HEX-string.
- ///
- /// The RGB-HEX-string.
- public static string AsRGBHexString(this Color color, bool leadingHash = true) => (leadingHash ? "#" : "") + ConversionHelper.ToHex(color.GetR(), color.GetG(), color.GetB());
-
- ///
- /// Gets the current color as a ARGB-HEX-string.
- ///
- /// The ARGB-HEX-string.
- public static string AsARGBHexString(this Color color, bool leadingHash = true) => (leadingHash ? "#" : "") + ConversionHelper.ToHex(color.GetA(), color.GetR(), color.GetG(), color.GetB());
-
- #endregion
-
- #region Factory
-
- ///
- /// Creates a new instance of the struct using a HEX-string.
- ///
- /// The HEX-representation of the color.
- /// The color created from the HEX-string.
- public static Color FromHexString(string hexString)
- {
- if ((hexString == null) || (hexString.Length < 6))
- throw new ArgumentException("Invalid hex string", nameof(hexString));
-
- if (hexString[0] == '#')
- hexString = hexString.Substring(1);
-
- byte[] data = ConversionHelper.HexToBytes(hexString);
- if (data.Length == 3)
- return new Color(data[0], data[1], data[2]);
- if (data.Length == 4)
- return new Color(data[0], data[1], data[2], data[3]);
-
+ if ((hexString == null) || (hexString.Length < 6))
throw new ArgumentException("Invalid hex string", nameof(hexString));
- }
- #endregion
+ ReadOnlySpan span = hexString.AsSpan();
+ if (span[0] == '#')
+ span = span[1..];
+
+ byte[] data = ConversionHelper.HexToBytes(span);
+ return data.Length switch
+ {
+ 3 => new Color(data[0], data[1], data[2]),
+ 4 => new Color(data[0], data[1], data[2], data[3]),
+ _ => throw new ArgumentException($"Invalid hex string '{hexString}'", nameof(hexString))
+ };
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Color/XYZColor.cs b/RGB.NET.Core/Color/XYZColor.cs
new file mode 100644
index 00000000..168d4f73
--- /dev/null
+++ b/RGB.NET.Core/Color/XYZColor.cs
@@ -0,0 +1,207 @@
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable UnusedMember.Global
+using System;
+
+namespace RGB.NET.Core;
+
+///
+/// Contains helper-methods and extension for the -type to work in the XYZ color space.
+///
+public static class XYZColor
+{
+ #region Getter
+
+ ///
+ /// Gets the X component value (XYZ-color space) of this in the range [0..95.047].
+ ///
+ /// The color to get the value from.
+ /// The X component value of the color.
+ public static float GetX(this in Color color) => color.GetXYZ().x;
+
+ ///
+ /// Gets the Y component value (XYZ-color space) of this in the range [0..100].
+ ///
+ /// The color to get the value from.
+ /// The Y component value of the color.
+ public static float GetY(this in Color color) => color.GetXYZ().y;
+
+ ///
+ /// Gets the Z component value (XYZ-color space) of this in the range [0..108.883].
+ ///
+ /// The color to get the value from.
+ /// The Z component value of the color.
+ public static float GetZ(this in Color color) => color.GetXYZ().z;
+
+ ///
+ /// Gets the X, Y and Z component values (XYZ-color space) of this .
+ /// X in the range [0..95.047].
+ /// Y in the range [0..100].
+ /// Z in the range [0..108.883].
+ ///
+ /// The color to get the value from.
+ /// A tuple containing the X, Y and Z component value of the color.
+ public static (float x, float y, float z) GetXYZ(this in Color color)
+ => CaclulateXYZFromRGB(color.R, color.G, color.B);
+
+ #endregion
+
+ #region Manipulation
+
+ ///
+ /// Adds the specified XYZ values to this color.
+ ///
+ /// The color to modify.
+ /// The X value to add.
+ /// The Y value to add.
+ /// The Z value to add.
+ /// The new color after the modification.
+ public static Color AddXYZ(this in Color color, float x = 0, float y = 0, float z = 0)
+ {
+ (float cX, float cY, float cZ) = color.GetXYZ();
+ return Create(color.A, cX + x, cY + y, cZ + z);
+ }
+
+ ///
+ /// Subtracts the specified XYZ values to this color.
+ ///
+ /// The color to modify.
+ /// The X value to subtract.
+ /// The Y value to subtract.
+ /// The Z value to subtract.
+ /// The new color after the modification.
+ public static Color SubtractXYZ(this in Color color, float x = 0, float y = 0, float z = 0)
+ {
+ (float cX, float cY, float cZ) = color.GetXYZ();
+ return Create(color.A, cX - x, cY - y, cZ - z);
+ }
+
+ ///
+ /// Multiplies the specified XYZ values to this color.
+ ///
+ /// The color to modify.
+ /// The X value to multiply.
+ /// The Y value to multiply.
+ /// The Z value to multiply.
+ /// The new color after the modification.
+ public static Color MultiplyXYZ(this in Color color, float x = 1, float y = 1, float z = 1)
+ {
+ (float cX, float cY, float cZ) = color.GetXYZ();
+ return Create(color.A, cX * x, cY * y, cZ * z);
+ }
+
+ ///
+ /// Divides the specified XYZ values to this color.
+ ///
+ /// The color to modify.
+ /// The X value to divide.
+ /// The Y value to divide.
+ /// The Z value to divide.
+ /// The new color after the modification.
+ public static Color DivideXYZ(this in Color color, float x = 1, float y = 1, float z = 1)
+ {
+ (float cX, float cY, float cZ) = color.GetXYZ();
+ return Create(color.A, cX / x, cY / y, cZ / z);
+ }
+
+ ///
+ /// Sets the specified X valueof this color.
+ ///
+ /// The color to modify.
+ /// The X value to set.
+ /// The Y value to set.
+ /// The Z value to set.
+ /// The new color after the modification.
+ public static Color SetXYZ(this in Color color, float? x = null, float? y = null, float? z = null)
+ {
+ (float cX, float cY, float cZ) = color.GetXYZ();
+ return Create(color.A, x ?? cX, y ?? cY, z ?? cZ);
+ }
+
+ #endregion
+
+ #region Factory
+
+ ///
+ /// Creates a new instance of the struct using XYZ-Values.
+ ///
+ /// The X component value of this .
+ /// The Y component value of this .
+ /// The Z component value of this .
+ /// The color created from the values.
+ public static Color Create(float x, float y, float z)
+ => Create(1.0f, x, y, z);
+
+ ///
+ /// Creates a new instance of the struct using alpha and XYZ-Values.
+ ///
+ /// The alpha component value of this .
+ /// The X component value of this .
+ /// The Y component value of this .
+ /// The Z component value of this .
+ /// The color created from the values.
+ public static Color Create(byte a, float x, float y, float z)
+ => Create((float)a / byte.MaxValue, x, y, z);
+
+ ///
+ /// Creates a new instance of the struct using alpha and XYZ-Values.
+ ///
+ /// The alpha component value of this .
+ /// The X component value of this .
+ /// The Y component value of this .
+ /// The Z component value of this .
+ /// The color created from the values.
+ public static Color Create(int a, float x, float y, float z)
+ => Create((float)a / byte.MaxValue, x, y, z);
+
+ ///
+ /// Creates a new instance of the struct using alpha and XYZ-Values.
+ ///
+ /// The alpha component value of this .
+ /// The X component value of this .
+ /// The Y component value of this .
+ /// The Z component value of this .
+ /// The color created from the values.
+ public static Color Create(float a, float x, float y, float z)
+ {
+ (float r, float g, float b) = CalculateRGBFromXYZ(x, y, z);
+ return new Color(a, r, g, b);
+ }
+
+ #endregion
+
+ #region Helper
+
+ internal static (float x, float y, float z) CaclulateXYZFromRGB(float r, float g, float b)
+ {
+ r = ((r > 0.04045f) ? MathF.Pow(((r + 0.055f) / 1.055f), 2.4f) : (r / 12.92f)) * 100.0f;
+ g = ((g > 0.04045f) ? MathF.Pow(((g + 0.055f) / 1.055f), 2.4f) : (g / 12.92f)) * 100.0f;
+ b = ((b > 0.04045f) ? MathF.Pow(((b + 0.055f) / 1.055f), 2.4f) : (b / 12.92f)) * 100.0f;
+
+ float x = (r * 0.4124f) + (g * 0.3576f) + (b * 0.1805f);
+ float y = (r * 0.2126f) + (g * 0.7152f) + (b * 0.0722f);
+ float z = (r * 0.0193f) + (g * 0.1192f) + (b * 0.9505f);
+
+ return (x, y, z);
+ }
+
+ internal static (float r, float g, float b) CalculateRGBFromXYZ(float x, float y, float z)
+ {
+ const float INVERSE_EXPONENT = 1.0f / 2.4f;
+
+ x /= 100.0f;
+ y /= 100.0f;
+ z /= 100.0f;
+
+ float r = (x * 3.2406f) + (y * -1.5372f) + (z * -0.4986f);
+ float g = (x * -0.9689f) + (y * 1.8758f) + (z * 0.0415f);
+ float b = (x * 0.0557f) + (y * -0.2040f) + (z * 1.0570f);
+
+ r = ((r > 0.0031308f) ? ((1.055f * (MathF.Pow(r, INVERSE_EXPONENT))) - 0.055f) : (12.92f * r));
+ g = ((g > 0.0031308f) ? ((1.055f * (MathF.Pow(g, INVERSE_EXPONENT))) - 0.055f) : (12.92f * g));
+ b = ((b > 0.0031308f) ? ((1.055f * (MathF.Pow(b, INVERSE_EXPONENT))) - 0.055f) : (12.92f * b));
+
+ return (r, g, b);
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/ColorCorrection/IColorCorrection.cs b/RGB.NET.Core/ColorCorrection/IColorCorrection.cs
index e3e417a2..25a6be85 100644
--- a/RGB.NET.Core/ColorCorrection/IColorCorrection.cs
+++ b/RGB.NET.Core/ColorCorrection/IColorCorrection.cs
@@ -1,16 +1,15 @@
// ReSharper disable UnusedMember.Global
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a generic color-correction.
+///
+public interface IColorCorrection
{
///
- /// Represents a generic color-correction.
+ /// Applies the to the specified .
///
- public interface IColorCorrection
- {
- ///
- /// Applies the to the given .
- ///
- /// The to correct.
- Color ApplyTo(Color color);
- }
-}
+ /// The to correct.
+ void ApplyTo(ref Color color);
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Decorators/AbstractDecorateable.cs b/RGB.NET.Core/Decorators/AbstractDecorateable.cs
index d12afcd3..5312eab6 100644
--- a/RGB.NET.Core/Decorators/AbstractDecorateable.cs
+++ b/RGB.NET.Core/Decorators/AbstractDecorateable.cs
@@ -2,64 +2,68 @@
using System.Collections.ObjectModel;
using System.Linq;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+public abstract class AbstractDecoratable : AbstractBindable, IDecoratable
+ where T : IDecorator
{
- ///
- ///
- public abstract class AbstractDecoratable : AbstractBindable, IDecoratable
- where T : IDecorator
- {
- #region Properties & Fields
+ #region Properties & Fields
- private readonly List _decorators = new List();
+ private readonly List _decorators = new();
- ///
- public IReadOnlyCollection Decorators
- {
- get
- {
- lock (_decorators)
- return new ReadOnlyCollection(_decorators);
- }
- }
+ ///
+ public IReadOnlyList Decorators { get; }
- #endregion
+ #endregion
- #region Methods
+ #region Constructors
- ///
- public void AddDecorator(T decorator)
- {
- lock (Decorators)
- {
- _decorators.Add(decorator);
- _decorators.Sort((d1, d2) => d1.Order.CompareTo(d2.Order));
- }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ protected AbstractDecoratable()
+ {
+ Decorators = new ReadOnlyCollection(_decorators);
+ }
- decorator.OnAttached(this);
- }
+ #endregion
- ///
- public void RemoveDecorator(T decorator)
- {
- lock (Decorators)
- _decorators.Remove(decorator);
+ #region Methods
- decorator.OnDetached(this);
+ ///
+ public void AddDecorator(T decorator)
+ {
+ lock (Decorators)
+ {
+ _decorators.Add(decorator);
+ _decorators.Sort((d1, d2) => d1.Order.CompareTo(d2.Order));
}
- ///
- public void RemoveAllDecorators()
- {
- IEnumerable decorators;
+ decorator.OnAttached(this);
+ }
- lock (Decorators)
- decorators = Decorators.ToList();
+ ///
+ public void RemoveDecorator(T decorator)
+ {
+ lock (Decorators)
+ _decorators.Remove(decorator);
- foreach (T decorator in decorators)
- RemoveDecorator(decorator);
- }
+ decorator.OnDetached(this);
+ }
+
+ ///
+ public void RemoveAllDecorators()
+ {
+ IEnumerable decorators;
- #endregion
+ lock (Decorators)
+ decorators = Decorators.ToList();
+
+ foreach (T decorator in decorators)
+ RemoveDecorator(decorator);
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Decorators/AbstractDecorator.cs b/RGB.NET.Core/Decorators/AbstractDecorator.cs
index 50e007c6..159fb4b2 100644
--- a/RGB.NET.Core/Decorators/AbstractDecorator.cs
+++ b/RGB.NET.Core/Decorators/AbstractDecorator.cs
@@ -2,61 +2,60 @@
using System.Collections.Generic;
using System.Linq;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+public abstract class AbstractDecorator : AbstractBindable, IDecorator
{
- ///
- ///
- public abstract class AbstractDecorator : AbstractBindable, IDecorator
- {
- #region Properties & Fields
+ #region Properties & Fields
- private bool _isEnabled = true;
- ///
- public bool IsEnabled
- {
- get => _isEnabled;
- set => SetProperty(ref _isEnabled, value);
- }
+ private bool _isEnabled = true;
+ ///
+ public bool IsEnabled
+ {
+ get => _isEnabled;
+ set => SetProperty(ref _isEnabled, value);
+ }
- private int _order;
- ///
- public int Order
- {
- get => _order;
- set => SetProperty(ref _order, value);
- }
+ private int _order;
+ ///
+ public int Order
+ {
+ get => _order;
+ set => SetProperty(ref _order, value);
+ }
- ///
- /// Gets a readonly-list of all this decorator is attached to.
- ///
- protected List DecoratedObjects { get; } = new List();
+ ///
+ /// Gets a readonly-list of all this decorator is attached to.
+ ///
+ protected List DecoratedObjects { get; } = new();
- #endregion
+ #endregion
- #region Methods
+ #region Methods
- ///
- public virtual void OnAttached(IDecoratable decoratable) => DecoratedObjects.Add(decoratable);
+ ///
+ public virtual void OnAttached(IDecoratable decoratable) => DecoratedObjects.Add(decoratable);
- ///
- public virtual void OnDetached(IDecoratable decoratable) => DecoratedObjects.Remove(decoratable);
+ ///
+ public virtual void OnDetached(IDecoratable decoratable) => DecoratedObjects.Remove(decoratable);
- ///
- /// Detaches the decorator from all it is currently attached to.
- ///
- protected virtual void Detach()
+ ///
+ /// Detaches the decorator from all it is currently attached to.
+ ///
+ protected virtual void Detach()
+ {
+ List decoratables = new(DecoratedObjects);
+ foreach (IDecoratable decoratable in decoratables)
{
- List decoratables = new List(DecoratedObjects);
- foreach (IDecoratable decoratable in decoratables)
- {
- IEnumerable types = decoratable.GetType().GetInterfaces().Where(t => t.IsGenericType
- && (t.Name == typeof(IDecoratable<>).Name)
- && t.GenericTypeArguments[0].IsInstanceOfType(this));
- foreach (Type decoratableType in types)
- decoratableType.GetMethod(nameof(IDecoratable.RemoveDecorator))?.Invoke(decoratable, new object[] { this });
- }
+ IEnumerable types = decoratable.GetType().GetInterfaces().Where(t => t.IsGenericType
+ && (t.Name == typeof(IDecoratable<>).Name)
+ && t.GenericTypeArguments[0].IsInstanceOfType(this));
+ foreach (Type decoratableType in types)
+ decoratableType.GetMethod(nameof(IDecoratable.RemoveDecorator))?.Invoke(decoratable, new object[] { this });
}
-
- #endregion
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Decorators/AbstractUpdateAwareDecorator.cs b/RGB.NET.Core/Decorators/AbstractUpdateAwareDecorator.cs
index 98e64b2b..7a1b32a3 100644
--- a/RGB.NET.Core/Decorators/AbstractUpdateAwareDecorator.cs
+++ b/RGB.NET.Core/Decorators/AbstractUpdateAwareDecorator.cs
@@ -1,65 +1,71 @@
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents a basic decorator which is aware of the event.
+///
+public abstract class AbstractUpdateAwareDecorator : AbstractDecorator
{
- ///
+ #region Properties & Fields
+
///
- /// Represents a basic decorator which is aware of the event.
+ /// Gets the surface this decorator is attached to.
///
- public abstract class AbstractUpdateAwareDecorator : AbstractDecorator
- {
- #region Properties & Fields
+ protected RGBSurface Surface { get; }
- ///
- /// Gets or sets if the should call even if the Decorator is disabled.
- ///
- protected bool UpdateIfDisabled { get; set; }
+ ///
+ /// Gets or sets if the should call even if the Decorator is disabled.
+ ///
+ protected bool UpdateIfDisabled { get; set; }
- #endregion
+ #endregion
- #region Constructors
+ #region Constructors
- ///
- /// Initializes a new instance of the class.
- ///
- /// Bool indicating if the should call even if the Decorator is disabled.
- protected AbstractUpdateAwareDecorator(bool updateIfDisabled = false)
- {
- this.UpdateIfDisabled = updateIfDisabled;
- }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The surface this decorator is attached to.
+ /// Bool indicating if the should call even if the Decorator is disabled.
+ protected AbstractUpdateAwareDecorator(RGBSurface surface, bool updateIfDisabled = false)
+ {
+ this.Surface = surface;
+ this.UpdateIfDisabled = updateIfDisabled;
+ }
- #endregion
+ #endregion
- #region Methods
+ #region Methods
- ///
- public override void OnAttached(IDecoratable decoratable)
- {
- if (DecoratedObjects.Count == 0)
- RGBSurface.Instance.Updating += OnSurfaceUpdating;
+ ///
+ public override void OnAttached(IDecoratable decoratable)
+ {
+ if (DecoratedObjects.Count == 0)
+ Surface.Updating += OnSurfaceUpdating;
- base.OnAttached(decoratable);
- }
+ base.OnAttached(decoratable);
+ }
- ///
- public override void OnDetached(IDecoratable decoratable)
- {
- base.OnDetached(decoratable);
+ ///
+ public override void OnDetached(IDecoratable decoratable)
+ {
+ base.OnDetached(decoratable);
- if (DecoratedObjects.Count == 0)
- RGBSurface.Instance.Updating -= OnSurfaceUpdating;
- }
+ if (DecoratedObjects.Count == 0)
+ Surface.Updating -= OnSurfaceUpdating;
+ }
- private void OnSurfaceUpdating(UpdatingEventArgs args)
- {
- if (IsEnabled || UpdateIfDisabled)
- Update(args.DeltaTime);
- }
+ private void OnSurfaceUpdating(UpdatingEventArgs args)
+ {
+ if (IsEnabled || UpdateIfDisabled)
+ Update(args.DeltaTime);
+ }
- ///
- /// Updates this .
- ///
- /// The elapsed time (in seconds) since the last update.
- protected abstract void Update(double deltaTime);
+ ///
+ /// Updates this .
+ ///
+ /// The elapsed time (in seconds) since the last update.
+ protected abstract void Update(double deltaTime);
- #endregion
- }
-}
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Decorators/IBrushDecorator.cs b/RGB.NET.Core/Decorators/IBrushDecorator.cs
index 812af246..ec1c4325 100644
--- a/RGB.NET.Core/Decorators/IBrushDecorator.cs
+++ b/RGB.NET.Core/Decorators/IBrushDecorator.cs
@@ -1,17 +1,16 @@
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents a decorating a .
+///
+public interface IBrushDecorator : IDecorator
{
- ///
///
- /// Represents a decorating a .
+ /// Decorator-Method called by the .
///
- public interface IBrushDecorator : IDecorator
- {
- ///
- /// Decorator-Method called by the .
- ///
- /// The rectangle in which the should be drawn.
- /// The target (key/point) from which the should be taken.
- /// The to be modified.
- Color ManipulateColor(Rectangle rectangle, BrushRenderTarget renderTarget, Color color);
- }
-}
+ /// The rectangle in which the should be drawn.
+ /// The target (key/point) from which the should be taken.
+ /// The to be modified.
+ void ManipulateColor(in Rectangle rectangle, in RenderTarget renderTarget, ref Color color);
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Decorators/IDecoratable.cs b/RGB.NET.Core/Decorators/IDecoratable.cs
index 781d9f10..5fddf47a 100644
--- a/RGB.NET.Core/Decorators/IDecoratable.cs
+++ b/RGB.NET.Core/Decorators/IDecoratable.cs
@@ -1,42 +1,41 @@
using System.Collections.Generic;
using System.ComponentModel;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a basic decoratable.
+///
+public interface IDecoratable : INotifyPropertyChanged
+{ }
+
+///
+///
+/// Represents a basic decoratable for a specific type of
+///
+/// The type of decorators this decoratable can be decorated with.
+public interface IDecoratable : IDecoratable
+ where T : IDecorator
{
///
- /// Represents a basic decoratable.
+ /// Gets a readonly-list of all attached to this .
///
- public interface IDecoratable : INotifyPropertyChanged
- { }
+ IReadOnlyList Decorators { get; }
- ///
///
- /// Represents a basic decoratable for a specific type of
+ /// Adds an to the .
///
- ///
- public interface IDecoratable : IDecoratable
- where T : IDecorator
- {
- ///
- /// Gets a readonly-list of all attached to this .
- ///
- IReadOnlyCollection Decorators { get; }
+ /// The to be added.
+ void AddDecorator(T decorator);
- ///
- /// Adds an to the .
- ///
- /// The to be added.
- void AddDecorator(T decorator);
-
- ///
- /// Removes an from the .
- ///
- /// The to be removed.
- void RemoveDecorator(T decorator);
+ ///
+ /// Removes an from the .
+ ///
+ /// The to be removed.
+ void RemoveDecorator(T decorator);
- ///
- /// Removes all from the .
- ///
- void RemoveAllDecorators();
- }
-}
+ ///
+ /// Removes all from the .
+ ///
+ void RemoveAllDecorators();
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Decorators/IDecorator.cs b/RGB.NET.Core/Decorators/IDecorator.cs
index 1e9acddc..0a77a0e4 100644
--- a/RGB.NET.Core/Decorators/IDecorator.cs
+++ b/RGB.NET.Core/Decorators/IDecorator.cs
@@ -1,39 +1,38 @@
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a basic decorator.
+///
+public interface IDecorator
{
+ #region Properties & Fields
+
+ ///
+ /// Gets or sets if the is enabled and will be used.
+ ///
+ bool IsEnabled { get; set; }
+
+ ///
+ /// Gets or sets the order in which multiple decorators should be applied on the same object.
+ /// Higher orders are processed first.
+ ///
+ int Order { get; set; }
+
+ #endregion
+
+ #region Methods
+
///
- /// Represents a basic decorator.
+ /// Attaches this to the specified target.
///
- public interface IDecorator
- {
- #region Properties & Fields
-
- ///
- /// Gets or sets if the is enabled and will be used.
- ///
- bool IsEnabled { get; set; }
-
- ///
- /// Gets or sets the order in which multiple decorators should be applied on the same object.
- /// Higher orders are processed first.
- ///
- int Order { get; set; }
-
- #endregion
-
- #region Methods
-
- ///
- /// Attaches this to the given target.
- ///
- /// The object this should be attached to.
- void OnAttached(IDecoratable decoratable);
-
- ///
- /// Detaches this from the given target.
- ///
- /// The object this should be detached from.
- void OnDetached(IDecoratable decoratable);
-
- #endregion
- }
-}
+ /// The object this should be attached to.
+ void OnAttached(IDecoratable decoratable);
+
+ ///
+ /// Detaches this from the specified target.
+ ///
+ /// The object this should be detached from.
+ void OnDetached(IDecoratable decoratable);
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Decorators/ILedGroupDecorator.cs b/RGB.NET.Core/Decorators/ILedGroupDecorator.cs
index e893de75..051ca9d8 100644
--- a/RGB.NET.Core/Decorators/ILedGroupDecorator.cs
+++ b/RGB.NET.Core/Decorators/ILedGroupDecorator.cs
@@ -1,9 +1,8 @@
-namespace RGB.NET.Core
-{
- ///
- ///
- /// Represents a basic decorator decorating a .
- ///
- public interface ILedGroupDecorator : IDecorator
- { }
-}
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents a basic decorator decorating a .
+///
+public interface ILedGroupDecorator : IDecorator
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/AbstractRGBDevice.cs b/RGB.NET.Core/Devices/AbstractRGBDevice.cs
index a737f29c..1457e0a0 100644
--- a/RGB.NET.Core/Devices/AbstractRGBDevice.cs
+++ b/RGB.NET.Core/Devices/AbstractRGBDevice.cs
@@ -2,297 +2,237 @@
// ReSharper disable UnusedMember.Global
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
-using System;
using System.Collections;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
-using RGB.NET.Core.Layout;
-namespace RGB.NET.Core
-{
- ///
- ///
- ///
- /// Represents a generic RGB-device.
- ///
- public abstract class AbstractRGBDevice : AbstractBindable, IRGBDevice
- where TDeviceInfo : class, IRGBDeviceInfo
- {
- #region Properties & Fields
+namespace RGB.NET.Core;
- ///
- public abstract TDeviceInfo DeviceInfo { get; }
+///
+///
+///
+/// Represents a generic RGB-device.
+///
+public abstract class AbstractRGBDevice : Placeable, IRGBDevice
+ where TDeviceInfo : class, IRGBDeviceInfo
+{
+ private RGBSurface? _surface;
- ///
- IRGBDeviceInfo IRGBDevice.DeviceInfo => DeviceInfo;
+ #region Properties & Fields
- private Point _location = new Point(0, 0);
- ///
- public Point Location
+ RGBSurface? IRGBDevice.Surface
+ {
+ get => _surface;
+ set
{
- get => _location;
- set
+ if (SetProperty(ref _surface, value))
{
- if (SetProperty(ref _location, value))
- UpdateActualData();
+ if (value == null) OnDetached();
+ else OnAttached();
}
}
+ }
- private Size _size = Size.Invalid;
- ///
- public Size Size
- {
- get => _size;
- protected set
- {
- if (SetProperty(ref _size, value))
- UpdateActualData();
- }
- }
+ ///
+ public TDeviceInfo DeviceInfo { get; }
- private Size _actualSize;
- ///
- public Size ActualSize
- {
- get => _actualSize;
- private set => SetProperty(ref _actualSize, value);
- }
+ ///
+ IRGBDeviceInfo IRGBDevice.DeviceInfo => DeviceInfo;
- private Rectangle _deviceRectangle;
- ///
- public Rectangle DeviceRectangle
- {
- get => _deviceRectangle;
- private set => SetProperty(ref _deviceRectangle, value);
- }
+ ///
+ public IList ColorCorrections { get; } = new List();
- private Scale _scale = new Scale(1);
- ///
- public Scale Scale
- {
- get => _scale;
- set
- {
- if (SetProperty(ref _scale, value))
- UpdateActualData();
- }
- }
-
- private Rotation _rotation = new Rotation(0);
- ///
- public Rotation Rotation
- {
- get => _rotation;
- set
- {
- if (SetProperty(ref _rotation, value))
- UpdateActualData();
- }
- }
+ ///
+ /// Gets or sets if the device needs to be flushed on every update.
+ ///
+ protected bool RequiresFlush { get; set; } = false;
- ///
- /// Gets or sets if the device needs to be flushed on every update.
- ///
- protected bool RequiresFlush { get; set; } = false;
+ ///
+ /// Gets a dictionary containing all of the .
+ ///
+ protected Dictionary LedMapping { get; } = new();
- ///
- public DeviceUpdateMode UpdateMode { get; set; } = DeviceUpdateMode.Sync;
+ ///
+ /// Gets the update queue used to update this device.
+ ///
+ protected IUpdateQueue UpdateQueue { get; }
- ///
- /// Gets a dictionary containing all of the .
- ///
- protected Dictionary LedMapping { get; } = new Dictionary();
+ #region Indexer
- ///
- /// Gets a dictionary containing all associated with this .
- ///
- protected Dictionary SpecialDeviceParts { get; } = new Dictionary();
+ ///
+ Led? IRGBDevice.this[LedId ledId] => LedMapping.TryGetValue(ledId, out Led? led) ? led : null;
- #region Indexer
+ ///
+ Led? IRGBDevice.this[Point location] => LedMapping.Values.FirstOrDefault(x => x.Boundary.Contains(location));
- ///
- Led IRGBDevice.this[LedId ledId] => LedMapping.TryGetValue(ledId, out Led led) ? led : null;
+ ///
+ IEnumerable IRGBDevice.this[Rectangle referenceRect, double minOverlayPercentage]
+ => LedMapping.Values.Where(x => referenceRect.CalculateIntersectPercentage(x.Boundary) >= minOverlayPercentage);
- ///
- Led IRGBDevice.this[Point location] => LedMapping.Values.FirstOrDefault(x => x.LedRectangle.Contains(location));
+ #endregion
- ///
- IEnumerable IRGBDevice.this[Rectangle referenceRect, double minOverlayPercentage]
- => LedMapping.Values.Where(x => referenceRect.CalculateIntersectPercentage(x.LedRectangle) >= minOverlayPercentage);
+ #endregion
- #endregion
+ #region Constructors
- #endregion
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The device info of this device.
+ /// The queue used to update this device.
+ protected AbstractRGBDevice(TDeviceInfo deviceInfo, IUpdateQueue updateQueue)
+ {
+ this.DeviceInfo = deviceInfo;
+ this.UpdateQueue = updateQueue;
+ }
- #region Methods
+ #endregion
- private void UpdateActualData()
- {
- ActualSize = Size * Scale;
- DeviceRectangle = new Rectangle(Location, new Rectangle(new Rectangle(Location, ActualSize).Rotate(Rotation)).Size);
- }
+ #region Methods
- ///
- public virtual void Update(bool flushLeds = false)
- {
- // Device-specific updates
- DeviceUpdate();
+ ///
+ public virtual void Update(bool flushLeds = false)
+ {
+ // Device-specific updates
+ DeviceUpdate();
- // Send LEDs to SDK
- List ledsToUpdate = GetLedsToUpdate(flushLeds)?.ToList() ?? new List();
- foreach (Led ledToUpdate in ledsToUpdate)
- ledToUpdate.Update();
+ // Send LEDs to SDK
+ List ledsToUpdate = GetLedsToUpdate(flushLeds).ToList();
- if (UpdateMode.HasFlag(DeviceUpdateMode.Sync))
- UpdateLeds(ledsToUpdate);
- }
+ foreach (Led led in ledsToUpdate)
+ led.Update();
- protected virtual IEnumerable GetLedsToUpdate(bool flushLeds) => ((RequiresFlush || flushLeds) ? LedMapping.Values : LedMapping.Values.Where(x => x.IsDirty));
+ UpdateLeds(ledsToUpdate);
+ }
- ///
- public virtual void SyncBack()
- { }
+ ///
+ /// Gets an enumerable of LEDs that are changed and requires an update.
+ ///
+ /// Forces all LEDs to be treated as dirty.
+ /// The collection LEDs to update.
+ protected virtual IEnumerable GetLedsToUpdate(bool flushLeds) => ((RequiresFlush || flushLeds) ? LedMapping.Values : LedMapping.Values.Where(x => x.IsDirty)).Where(led => led.RequestedColor?.A > 0);
- ///
- public virtual void Dispose()
+ ///
+ /// Gets an enumerable of a custom data and color tuple for the specified leds.
+ ///
+ ///
+ /// Applies all .
+ /// if no ist specified the is used.
+ ///
+ /// The enumerable of leds to convert.
+ /// The enumerable of custom data and color tuples for the specified leds.
+ protected virtual IEnumerable<(object key, Color color)> GetUpdateData(IEnumerable leds)
+ {
+ if (ColorCorrections.Count > 0)
{
- try
+ foreach (Led led in leds)
{
- SpecialDeviceParts.Clear();
- LedMapping.Clear();
+ Color color = led.Color;
+ object key = led.CustomData ?? led.Id;
+
+ foreach (IColorCorrection colorCorrection in ColorCorrections)
+ colorCorrection.ApplyTo(ref color);
+
+ yield return (key, color);
}
- catch { /* this really shouldn't happen */ }
}
-
- ///
- /// Performs device specific updates.
- ///
- protected virtual void DeviceUpdate()
- { }
-
- ///
- /// Sends all the updated to the device.
- ///
- protected abstract void UpdateLeds(IEnumerable ledsToUpdate);
-
- ///
- /// Initializes the with the specified id.
- ///
- /// The to initialize.
- /// The representing the position of the to initialize.
- ///
- [Obsolete("Use InitializeLed(LedId ledId, Point location, Size size) instead.")]
- protected virtual Led InitializeLed(LedId ledId, Rectangle rectangle) => InitializeLed(ledId, rectangle.Location, rectangle.Size);
-
- ///
- /// Initializes the with the specified id.
- ///
- /// The to initialize.
- /// The location of the to initialize.
- /// The size of the to initialize.
- /// The initialized led.
- protected virtual Led InitializeLed(LedId ledId, Point location, Size size)
+ else
{
- if ((ledId == LedId.Invalid) || LedMapping.ContainsKey(ledId)) return null;
+ foreach (Led led in leds)
+ {
+ Color color = led.Color;
+ object key = led.CustomData ?? led.Id;
- Led led = new Led(this, ledId, location, size, CreateLedCustomData(ledId));
- LedMapping.Add(ledId, led);
- return led;
+ yield return (key, color);
+ }
}
+ }
- ///
- /// Applies the give to the ignoring internal workflows regarding locks and update-requests.
- /// This should be only used for syncbacks!
- ///
- /// The the should be aplied to.
- /// The to apply.
- protected virtual void SetLedColorWithoutRequest(Led led, Color color)
- {
- if (led == null) return;
+ ///
+ /// Sends all the updated to the device.
+ ///
+ protected virtual void UpdateLeds(IEnumerable ledsToUpdate) => UpdateQueue.SetData(GetUpdateData(ledsToUpdate));
- led.InternalColor = color;
- }
+ ///
+ public virtual void Dispose()
+ {
+ try { UpdateQueue.Dispose(); } catch { /* :( */ }
+ try { LedMapping.Clear(); } catch { /* this really shouldn't happen */ }
- ///
- /// Applies the given layout.
- ///
- /// The file containing the layout.
- /// The name of the layout used to get the images of the leds.
- /// If set to true a new led is initialized for every id in the layout if it doesn't already exist.
- protected virtual DeviceLayout ApplyLayoutFromFile(string layoutPath, string imageLayout, bool createMissingLeds = false)
- {
- DeviceLayout layout = DeviceLayout.Load(layoutPath);
- if (layout != null)
- {
- string imageBasePath = string.IsNullOrWhiteSpace(layout.ImageBasePath) ? null : PathHelper.GetAbsolutePath(this, layout.ImageBasePath);
- if ((imageBasePath != null) && !string.IsNullOrWhiteSpace(layout.DeviceImage) && (DeviceInfo != null))
- DeviceInfo.Image = new Uri(Path.Combine(imageBasePath, layout.DeviceImage), UriKind.Absolute);
-
- LedImageLayout ledImageLayout = layout.LedImageLayouts.FirstOrDefault(x => string.Equals(x.Layout, imageLayout, StringComparison.OrdinalIgnoreCase));
-
- Size = new Size(layout.Width, layout.Height);
-
- if (layout.Leds != null)
- foreach (LedLayout layoutLed in layout.Leds)
- {
- if (Enum.TryParse(layoutLed.Id, true, out LedId ledId))
- {
- if (!LedMapping.TryGetValue(ledId, out Led led) && createMissingLeds)
- led = InitializeLed(ledId, new Point(), new Size());
-
- if (led != null)
- {
- led.Location = new Point(layoutLed.X, layoutLed.Y);
- led.Size = new Size(layoutLed.Width, layoutLed.Height);
- led.Shape = layoutLed.Shape;
- led.ShapeData = layoutLed.ShapeData;
-
- LedImage image = ledImageLayout?.LedImages.FirstOrDefault(x => x.Id == layoutLed.Id);
- if ((imageBasePath != null) && !string.IsNullOrEmpty(image?.Image))
- led.Image = new Uri(Path.Combine(imageBasePath, image.Image), UriKind.Absolute);
- }
- }
- }
- }
+ IdGenerator.ResetCounter(GetType().Assembly);
+ }
- return layout;
- }
+ ///
+ /// Performs device specific updates.
+ ///
+ protected virtual void DeviceUpdate()
+ { }
+
+ ///
+ public virtual Led? AddLed(LedId ledId, in Point location, in Size size, object? customData = null)
+ {
+ if ((ledId == LedId.Invalid) || LedMapping.ContainsKey(ledId)) return null;
+
+ Led led = new(this, ledId, location, size, customData ?? GetLedCustomData(ledId));
+ LedMapping.Add(ledId, led);
+ return led;
+ }
+
+ ///
+ public virtual Led? RemoveLed(LedId ledId)
+ {
+ if (ledId == LedId.Invalid) return null;
+ if (!LedMapping.TryGetValue(ledId, out Led? led)) return null;
- ///
- /// Creates provider-specific data associated with this .
- ///
- /// The .
- protected virtual object CreateLedCustomData(LedId ledId) => null;
-
- ///
- public void AddSpecialDevicePart(T specialDevicePart)
- where T : class, IRGBDeviceSpecialPart
- => SpecialDeviceParts[typeof(T)] = specialDevicePart;
-
- ///
- public T GetSpecialDevicePart()
- where T : class, IRGBDeviceSpecialPart
- => SpecialDeviceParts.TryGetValue(typeof(T), out IRGBDeviceSpecialPart devicePart) ? (T)devicePart : default;
-
- #region Enumerator
-
- ///
- ///
- /// Returns an enumerator that iterates over all of the .
- ///
- /// An enumerator for all of the .
- public IEnumerator GetEnumerator() => LedMapping.Values.GetEnumerator();
-
- ///
- ///
- /// Returns an enumerator that iterates over all of the .
- ///
- /// An enumerator for all of the .
- IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
-
- #endregion
-
- #endregion
+ LedMapping.Remove(ledId);
+ return led;
}
-}
+
+ ///
+ /// Gets the custom data associated with the specified LED.
+ ///
+ /// The id of the led.
+ /// The custom data for the specified LED.
+ protected virtual object? GetLedCustomData(LedId ledId) => null;
+
+ ///
+ /// Called when the device is attached to a surface.
+ ///
+ ///
+ /// When overriden base should be called to validate boundries.
+ ///
+ protected virtual void OnAttached()
+ {
+ if (Location == Point.Invalid) Location = new Point(0, 0);
+ if (Size == Size.Invalid)
+ {
+ Rectangle ledRectangle = new(this.Select(x => x.Boundary));
+ Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y);
+ }
+ }
+
+ ///
+ /// Called when the device is detached from a surface.
+ ///
+ protected virtual void OnDetached() { }
+
+ #region Enumerator
+
+ ///
+ ///
+ /// Returns an enumerator that iterates over all of the .
+ ///
+ /// An enumerator for all of the .
+ public IEnumerator GetEnumerator() => LedMapping.Values.GetEnumerator();
+
+ ///
+ ///
+ /// Returns an enumerator that iterates over all of the .
+ ///
+ /// An enumerator for all of the .
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+
+ #endregion
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/AbstractRGBDeviceProvider.cs b/RGB.NET.Core/Devices/AbstractRGBDeviceProvider.cs
new file mode 100644
index 00000000..ae66ca00
--- /dev/null
+++ b/RGB.NET.Core/Devices/AbstractRGBDeviceProvider.cs
@@ -0,0 +1,205 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+
+namespace RGB.NET.Core;
+
+///
+/// Represents the abstract base implementation for a .
+///
+public abstract class AbstractRGBDeviceProvider : IRGBDeviceProvider
+{
+ #region Properties & Fields
+
+ private readonly double _defaultUpdateRateHardLimit;
+
+ ///
+ public bool IsInitialized { get; protected set; }
+
+ ///
+ public bool ThrowsExceptions { get; protected set; }
+
+ ///
+ public virtual IEnumerable Devices { get; protected set; } = Enumerable.Empty();
+
+ ///
+ /// Gets the dictionary containing the registered update triggers.
+ /// Normally should be used to access them.
+ ///
+ protected Dictionary UpdateTriggerMapping { get; } = new();
+
+ ///
+ public IReadOnlyList<(int id, IDeviceUpdateTrigger trigger)> UpdateTriggers => new ReadOnlyCollection<(int id, IDeviceUpdateTrigger trigger)>(UpdateTriggerMapping.Select(x => (x.Key, x.Value)).ToList());
+
+ #endregion
+
+ #region Events
+
+ ///
+ public event EventHandler? Exception;
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The update rate hard limit all update triggers for this device provider are initialized with.
+ protected AbstractRGBDeviceProvider(double defaultUpdateRateHardLimit = 0)
+ {
+ this._defaultUpdateRateHardLimit = defaultUpdateRateHardLimit;
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ public bool Initialize(RGBDeviceType loadFilter = RGBDeviceType.All, bool throwExceptions = false)
+ {
+ ThrowsExceptions = throwExceptions;
+
+ try
+ {
+ Reset();
+
+ InitializeSDK();
+
+ Devices = new ReadOnlyCollection(GetLoadedDevices(loadFilter).ToList());
+
+ foreach (IDeviceUpdateTrigger updateTrigger in UpdateTriggerMapping.Values)
+ updateTrigger.Start();
+
+ IsInitialized = true;
+ }
+ catch (DeviceProviderException)
+ {
+ Reset();
+ throw;
+ }
+ catch (Exception ex)
+ {
+ Reset();
+ Throw(ex, true);
+ return false;
+ }
+
+ return true;
+ }
+
+ ///
+ /// Loads devices and returns a filtered list of them.
+ ///
+ ///
+ /// The underlying loading of the devices happens in .
+ ///
+ /// -flags to filter the device with.
+ /// The filtered collection of loaded devices.
+ protected virtual IEnumerable GetLoadedDevices(RGBDeviceType loadFilter)
+ {
+ List devices = new();
+ foreach (IRGBDevice device in LoadDevices())
+ {
+ try
+ {
+ if (loadFilter.HasFlag(device.DeviceInfo.DeviceType))
+ devices.Add(device);
+ else
+ device.Dispose();
+ }
+ catch (Exception ex)
+ {
+ Throw(ex);
+ }
+ }
+
+ return devices;
+ }
+
+ ///
+ /// Initializes the underlying SDK.
+ ///
+ protected abstract void InitializeSDK();
+
+ ///
+ /// Loads all devices this device provider is capable of loading.
+ ///
+ ///
+ /// Filtering happens in .
+ ///
+ /// A collection of loaded devices.
+ protected abstract IEnumerable LoadDevices();
+
+ ///
+ /// Gets the mapped to the specified id or a new one if the id wasn't requested before.
+ ///
+ ///
+ /// The creation of the update trigger happens in .
+ ///
+ /// The id of the update trigger.
+ /// The update rate hard limit to be set in the update trigger.
+ /// The update trigger mapped to the specified id.
+ protected virtual IDeviceUpdateTrigger GetUpdateTrigger(int id = -1, double? updateRateHardLimit = null)
+ {
+ if (!UpdateTriggerMapping.TryGetValue(id, out IDeviceUpdateTrigger? updaeTrigger))
+ UpdateTriggerMapping[id] = (updaeTrigger = CreateUpdateTrigger(id, updateRateHardLimit ?? _defaultUpdateRateHardLimit));
+
+ return updaeTrigger;
+ }
+
+ ///
+ /// Creates a update trigger with the specified id and the specified update rate hard limit.
+ ///
+ /// The id of the update trigger.
+ /// The update rate hard limit tobe set in the update trigger.
+ /// The newly created update trigger.
+ protected virtual IDeviceUpdateTrigger CreateUpdateTrigger(int id, double updateRateHardLimit) => new DeviceUpdateTrigger(updateRateHardLimit);
+
+ ///
+ /// Resets the device provider and disposes all devices and update triggers.
+ ///
+ protected virtual void Reset()
+ {
+ foreach (IDeviceUpdateTrigger updateTrigger in UpdateTriggerMapping.Values)
+ updateTrigger.Dispose();
+
+ foreach (IRGBDevice device in Devices)
+ device.Dispose();
+
+ Devices = Enumerable.Empty();
+ UpdateTriggerMapping.Clear();
+ IsInitialized = false;
+ }
+
+ ///
+ /// Triggers the -event and throws the specified exception if is true and it is not overriden in the event.
+ ///
+ /// The exception to throw.
+ /// Indicates if the exception is critical for device provider to work correctly.
+ protected virtual void Throw(Exception ex, bool isCritical = false)
+ {
+ ExceptionEventArgs args = new(ex, isCritical, ThrowsExceptions);
+ try { OnException(args); } catch { /* we don't want to throw due to bad event handlers */ }
+
+ if (args.Throw)
+ throw new DeviceProviderException(ex, isCritical);
+ }
+
+ ///
+ /// Throws the event.
+ ///
+ /// The parameters passed to the event.
+ protected virtual void OnException(ExceptionEventArgs args) => Exception?.Invoke(this, args);
+
+ ///
+ public virtual void Dispose()
+ {
+ Reset();
+
+ GC.SuppressFinalize(this);
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/DeviceUpdateMode.cs b/RGB.NET.Core/Devices/DeviceUpdateMode.cs
deleted file mode 100644
index b6e27d9d..00000000
--- a/RGB.NET.Core/Devices/DeviceUpdateMode.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System;
-
-namespace RGB.NET.Core
-{
- ///
- /// Contains a list of different device device update modes.
- ///
- [Flags]
- public enum DeviceUpdateMode
- {
- ///
- /// Represents nothing.
- ///
- None = 0,
-
- ///
- /// Represents a mode which updates the leds of the device.
- ///
- Sync = 1 << 0,
-
- ///
- /// Represents a mode which reads the color of the leds of the device.
- /// This isn't supported by all devices!
- ///
- SyncBack = 1 << 1,
-
- ///
- /// Represents all update modes.
- ///
- NoUpdate = 1 << 0xFF
- }
-}
diff --git a/RGB.NET.Core/Devices/IRGBDevice.cs b/RGB.NET.Core/Devices/IRGBDevice.cs
index 23278ba3..6e79fb3f 100644
--- a/RGB.NET.Core/Devices/IRGBDevice.cs
+++ b/RGB.NET.Core/Devices/IRGBDevice.cs
@@ -1,129 +1,98 @@
using System;
using System.Collections.Generic;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+///
+///
+/// Represents a generic RGB-device.
+///
+public interface IRGBDevice : IEnumerable, IPlaceable, IBindable, IDisposable
{
- ///
- ///
- ///
+ #region Properties
+
+ ///
+ /// Gets the surface this device is attached to.
+ ///
+ RGBSurface? Surface { get; internal set; }
+
+ ///
+ /// Gets generic information about the .
+ ///
+ IRGBDeviceInfo DeviceInfo { get; }
+
+ ///
+ /// Gets a list of color corrections applied to this device.
+ ///
+ IList ColorCorrections { get; }
+
+ #endregion
+
+ #region Indexer
+
+ ///
+ /// Gets the with the specified .
+ ///
+ /// The of the to get.
+ /// The with the specified or null if no is found.
+ Led? this[LedId ledId] { get; }
+
+ ///
+ /// Gets the at the specified physical location.
+ ///
+ /// The to get the location from.
+ /// The at the specified or null if no location is found.
+ Led? this[Point location] { get; }
+
+ ///
+ /// Gets a list of inside the specified .
+ ///
+ /// The to check.
+ /// The minimal percentage overlay a must have with the to be taken into the list.
+ /// A enumerable of leds inside the specified rectangle.
+ IEnumerable this[Rectangle referenceRect, double minOverlayPercentage = 0.5] { get; }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Perform an update for all dirty , or all if flushLeds is set to true.
+ ///
+ /// Specifies whether all (including clean ones) should be updated.
+ void Update(bool flushLeds = false);
+
///
- /// Represents a generic RGB-device.
+ /// Adds a led to the device.
///
- public interface IRGBDevice : IEnumerable, IBindable, IDisposable
- {
- #region Properties
-
- ///
- /// Gets generic information about the .
- ///
- IRGBDeviceInfo DeviceInfo { get; }
-
- ///
- /// Gets or sets the location of the .
- ///
- Point Location { get; set; }
-
- ///
- /// Gets the of the .
- ///
- Size Size { get; }
-
- ///
- /// Gets the actual of the .
- /// This includes the .
- ///
- Size ActualSize { get; }
-
- ///
- /// Gets a representing the logical location of the relative to the .
- ///
- Rectangle DeviceRectangle { get; }
-
- ///
- /// Gets or sets the scale of the .
- ///
- Scale Scale { get; set; }
-
- ///
- /// Gets or sets the rotation of the .
- ///
- Rotation Rotation { get; set; }
-
- ///
- /// Gets or sets the of the .
- ///
- DeviceUpdateMode UpdateMode { get; set; }
-
- #endregion
-
- #region Indexer
-
- ///
- /// Gets the with the specified .
- ///
- /// The of the to get.
- /// The with the specified or null if no is found.
- Led this[LedId ledId] { get; }
-
- ///
- /// Gets the at the given physical location.
- ///
- /// The to get the location from.
- /// The at the given or null if no location is found.
- Led this[Point location] { get; }
-
- ///
- /// Gets a list of inside the given .
- ///
- /// The to check.
- /// The minimal percentage overlay a must have with the to be taken into the list.
- ///
- IEnumerable this[Rectangle referenceRect, double minOverlayPercentage = 0.5] { get; }
-
- #endregion
-
- #region Methods
-
- ///
- /// Perform an update for all dirty , or all if flushLeds is set to true.
- ///
- /// Specifies whether all (including clean ones) should be updated.
- void Update(bool flushLeds = false);
-
- ///
- /// Synchronizes the internal state of the device to the real (physical) state.
- /// This isn't supported by all devices! Check to see if it's supported or not.
- ///
- void SyncBack();
-
- ///
- /// Adds the given to the device.
- /// This will override existing of the same type.
- ///
- /// The to add.
- /// The generic typeof of the to add.
- void AddSpecialDevicePart(T specialDevicePart) where T : class, IRGBDeviceSpecialPart;
-
- ///
- /// Gets the requested if available on this .
- ///
- /// The generic type of the requested .
- /// The requested or null if not available in this .
- T GetSpecialDevicePart() where T : class, IRGBDeviceSpecialPart;
-
- #endregion
- }
-
- ///
+ /// The id of the led.
+ /// The location of the led on the device.
+ /// The size of the led.
+ /// Custom data saved on the led.
+ /// The newly added led or null if a led with this id is already added.
+ Led? AddLed(LedId ledId, in Point location, in Size size, object? customData = null);
+
///
- /// Represents a generic RGB-device with an known device-info type.
+ /// Removes the led with the specified id from the device.
///
- public interface IRGBDevice : IRGBDevice
- where TDeviceInfo : IRGBDeviceInfo
- {
- ///
- /// Gets generic information about the .
- ///
- new TDeviceInfo DeviceInfo { get; }
- }
+ /// The id of the led to remove.
+ /// The removed led or null if there was no led with the specified id.
+ Led? RemoveLed(LedId ledId);
+
+ #endregion
}
+
+///
+///
+/// Represents a generic RGB-device with an known device-info type.
+///
+public interface IRGBDevice : IRGBDevice
+ where TDeviceInfo : IRGBDeviceInfo
+{
+ ///
+ /// Gets generic information about the .
+ ///
+ new TDeviceInfo DeviceInfo { get; }
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/IRGBDeviceInfo.cs b/RGB.NET.Core/Devices/IRGBDeviceInfo.cs
index 68bb9dc0..f255eb8d 100644
--- a/RGB.NET.Core/Devices/IRGBDeviceInfo.cs
+++ b/RGB.NET.Core/Devices/IRGBDeviceInfo.cs
@@ -1,49 +1,36 @@
-using System;
+namespace RGB.NET.Core;
-namespace RGB.NET.Core
+///
+/// Represents a generic information for a
+///
+public interface IRGBDeviceInfo
{
+ #region Properties & Fields
+
///
- /// Represents a generic information for a
+ /// Gets the of the .
///
- public interface IRGBDeviceInfo
- {
- #region Properties & Fields
-
- ///
- /// Gets the of the .
- ///
- RGBDeviceType DeviceType { get; }
-
- ///
- /// Unique name of the .
- ///
- string DeviceName { get; }
+ RGBDeviceType DeviceType { get; }
- ///
- /// Gets the manufacturer-name of the .
- ///
- string Manufacturer { get; }
-
- ///
- /// Gets the model-name of the .
- ///
- string Model { get; }
+ ///
+ /// Unique name of the .
+ ///
+ string DeviceName { get; }
- ///
- /// Gets the lighting capability of the
- ///
- RGBDeviceLighting Lighting { get; }
+ ///
+ /// Gets the manufacturer-name of the .
+ ///
+ string Manufacturer { get; }
- ///
- /// Gets a bool indicating, if the supports SynBacks or not.
- ///
- bool SupportsSyncBack { get; }
+ ///
+ /// Gets the model-name of the .
+ ///
+ string Model { get; }
- ///
- /// Gets the URI of an image of the or null if there is no image.
- ///
- Uri Image { get; set; }
+ ///
+ /// Gets custom metadata added to the layout.
+ ///
+ object? LayoutMetadata { get; set; }
- #endregion
- }
-}
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/IRGBDeviceProvider.cs b/RGB.NET.Core/Devices/IRGBDeviceProvider.cs
index dca3645c..48edc4d2 100644
--- a/RGB.NET.Core/Devices/IRGBDeviceProvider.cs
+++ b/RGB.NET.Core/Devices/IRGBDeviceProvider.cs
@@ -1,48 +1,57 @@
-using System;
+// ReSharper disable EventNeverSubscribedTo.Global
+
+using System;
using System.Collections.Generic;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a generic device provider.
+///
+public interface IRGBDeviceProvider : IDisposable
{
+ #region Properties & Fields
+
+ ///
+ /// Indicates if the used SDK is initialized and ready to use.
+ ///
+ bool IsInitialized { get; }
+
+ ///
+ /// Indicates if exceptions in the device provider are thrown or silently ignored.
+ ///
+ bool ThrowsExceptions { get; }
+
+ ///
+ /// Gets a collection of loaded by this .
+ ///
+ IEnumerable Devices { get; }
+
///
- /// Represents a generic device provider.
+ /// Gets a collection registered to this device provider.
///
- public interface IRGBDeviceProvider : IDisposable
- {
- #region Properties & Fields
-
- ///
- /// Indicates if the used SDK is initialized and ready to use.
- ///
- bool IsInitialized { get; }
-
- ///
- /// Gets a list of loaded by this .
- ///
- IEnumerable Devices { get; }
-
- ///
- /// Gets whether the application has exclusive access to devices or not.
- ///
- bool HasExclusiveAccess { get; }
-
- #endregion
-
- #region Methods
-
- ///
- /// Initializes the if not already happened or reloads it if it is already initialized.
- ///
- /// Specifies which types of devices to load.
- /// Specifies whether the application should request exclusive access of possible or not.
- /// Specifies whether exception during the initialization sequence should be thrown or not.
- ///
- bool Initialize(RGBDeviceType loadFilter = RGBDeviceType.All, bool exclusiveAccessIfPossible = false, bool throwExceptions = false);
-
- ///
- /// Resets all handled back top default.
- ///
- void ResetDevices();
-
- #endregion
- }
-}
+ IReadOnlyList<(int id, IDeviceUpdateTrigger trigger)> UpdateTriggers { get; }
+
+ #endregion
+
+ #region Events
+
+ ///
+ /// Occurs when an exception is thrown in the device provider.
+ ///
+ event EventHandler? Exception;
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Initializes the device provider and loads available devices.
+ ///
+ /// -flags to filter the devices to load.
+ /// Specifies if exceptions should be thrown or silently be ignored.
+ /// true if the initialization was successful; false otherwise.
+ bool Initialize(RGBDeviceType loadFilter = RGBDeviceType.All, bool throwExceptions = false);
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/IRGBDeviceProviderLoader.cs b/RGB.NET.Core/Devices/IRGBDeviceProviderLoader.cs
deleted file mode 100644
index 14a60cb2..00000000
--- a/RGB.NET.Core/Devices/IRGBDeviceProviderLoader.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a generic device provider loaded used to dynamically load devices into an application.
- /// This class should always provide an empty public constructor!
- ///
- public interface IRGBDeviceProviderLoader
- {
- ///
- /// Indicates if the returned device-provider needs some specific initialization before use.
- ///
- bool RequiresInitialization { get; }
-
- ///
- /// Gets the device-provider.
- ///
- /// The device-provider.
- IRGBDeviceProvider GetDeviceProvider();
- }
-}
diff --git a/RGB.NET.Core/Devices/IRGBDeviceSpecialPart.cs b/RGB.NET.Core/Devices/IRGBDeviceSpecialPart.cs
deleted file mode 100644
index 58c4e370..00000000
--- a/RGB.NET.Core/Devices/IRGBDeviceSpecialPart.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System.Collections.Generic;
-
-namespace RGB.NET.Core
-{
- ///
- ///
- /// Represents a special part of a .
- ///
- public interface IRGBDeviceSpecialPart : IEnumerable
- { }
-}
diff --git a/RGB.NET.Core/Devices/KeyboardLayoutType.cs b/RGB.NET.Core/Devices/KeyboardLayoutType.cs
new file mode 100644
index 00000000..fedeaf05
--- /dev/null
+++ b/RGB.NET.Core/Devices/KeyboardLayoutType.cs
@@ -0,0 +1,17 @@
+// ReSharper disable InconsistentNaming
+#pragma warning disable 1591
+
+namespace RGB.NET.Core;
+
+///
+/// Contains a list of available keyboard layout types.
+///
+public enum KeyboardLayoutType
+{
+ Unknown = 0,
+ ANSI = 1,
+ ISO = 2,
+ JIS = 3,
+ ABNT = 4,
+ KS = 5
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/Layout/DeviceLayout.cs b/RGB.NET.Core/Devices/Layout/DeviceLayout.cs
deleted file mode 100644
index 267c7d0f..00000000
--- a/RGB.NET.Core/Devices/Layout/DeviceLayout.cs
+++ /dev/null
@@ -1,151 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Xml.Serialization;
-
-namespace RGB.NET.Core.Layout
-{
- ///
- /// Represents the serializable layout of a .
- ///
- [Serializable]
- [XmlRoot("Device")]
- public class DeviceLayout
- {
- #region Properties & Fields
-
- ///
- /// Gets or sets the name of the .
- ///
- [XmlElement("Name")]
- public string Name { get; set; }
-
- ///
- /// Gets or sets the description of the .
- ///
- [XmlElement("Description")]
- public string Description { get; set; }
-
- ///
- /// Gets or sets the of the .
- ///
- [XmlElement("Type")]
- public RGBDeviceType Type { get; set; }
-
- ///
- /// Gets or sets the of the .
- ///
- [XmlElement("Lighting")]
- public RGBDeviceLighting Lighting { get; set; }
-
- ///
- /// Gets or sets the vendor of the .
- ///
- [XmlElement("Vendor")]
- public string Vendor { get; set; }
-
- ///
- /// Gets or sets the model of the .
- ///
- [XmlElement("Model")]
- public string Model { get; set; }
-
- ///
- /// Gets or sets the of the .
- ///
- [XmlElement("Shape")]
- [DefaultValue(Shape.Rectangle)]
- public Shape Shape { get; set; } = Shape.Rectangle;
-
- ///
- /// Gets or sets the width of the .
- ///
- [XmlElement("Width")]
- public double Width { get; set; }
-
- ///
- /// Gets or sets the height of the .
- ///
- [XmlElement("Height")]
- public double Height { get; set; }
-
- ///
- /// Gets or sets the width of one 'unit' used for the calculation of led positions and sizes.
- ///
- [XmlElement("LedUnitWidth")]
- [DefaultValue(19.0)]
- public double LedUnitWidth { get; set; } = 19.0;
-
- ///
- /// Gets or sets the height of one 'unit' used for the calculation of led positions and sizes.
- ///
- [XmlElement("LedUnitHeight")]
- [DefaultValue(19.0)]
- public double LedUnitHeight { get; set; } = 19.0;
-
- ///
- /// The path images for this device are collected in.
- ///
- [XmlElement("ImageBasePath")]
- public string ImageBasePath { get; set; }
-
- ///
- /// The image file for this device.
- ///
- [XmlElement("DeviceImage")]
- public string DeviceImage { get; set; }
-
- ///
- /// Gets or sets a list of representing all the of the .
- ///
- [XmlArray("Leds")]
- public List Leds { get; set; } = new List();
-
- ///
- /// Gets or sets a list of representing the layouts for the images of all the of the .
- ///
- [XmlArray("LedImageLayouts")]
- public List LedImageLayouts { get; set; } = new List();
-
- #endregion
-
- #region Methods
-
- ///
- /// Creates a new from the given xml.
- ///
- /// The path to the xml file.
- /// The deserialized .
- public static DeviceLayout Load(string path)
- {
- if (!File.Exists(path)) return null;
-
- try
- {
- XmlSerializer serializer = new XmlSerializer(typeof(DeviceLayout));
- using (StreamReader reader = new StreamReader(path))
- {
- DeviceLayout layout = serializer.Deserialize(reader) as DeviceLayout;
- if (layout?.Leds != null)
- {
- LedLayout lastLed = null;
- foreach (LedLayout led in layout.Leds)
- {
- led.CalculateValues(layout, lastLed);
- lastLed = led;
- }
- }
-
- return layout;
- }
- }
- catch
- {
- return null;
- }
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Core/Devices/Layout/LedImage.cs b/RGB.NET.Core/Devices/Layout/LedImage.cs
deleted file mode 100644
index c76d95ac..00000000
--- a/RGB.NET.Core/Devices/Layout/LedImage.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.Xml.Serialization;
-
-namespace RGB.NET.Core.Layout
-{
- ///
- /// Represents the serializable image-data of a specific .
- ///
- [Serializable]
- [XmlRoot("LedImage")]
- public class LedImage
- {
- ///
- /// Gets or sets the Id of the .
- ///
- [XmlAttribute("Id")]
- public string Id { get; set; }
-
- ///
- /// Gets or sets the image of the .
- ///
- [XmlAttribute("Image")]
- public string Image { get; set; }
- }
-}
diff --git a/RGB.NET.Core/Devices/Layout/LedImageLayout.cs b/RGB.NET.Core/Devices/Layout/LedImageLayout.cs
deleted file mode 100644
index 2c3a4914..00000000
--- a/RGB.NET.Core/Devices/Layout/LedImageLayout.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Xml.Serialization;
-
-namespace RGB.NET.Core.Layout
-{
- ///
- /// Represents the serializable collection of for a specific layout.
- ///
- [Serializable]
- [XmlRoot("LedImageLayout")]
- public class LedImageLayout
- {
- ///
- /// Gets or sets the layout of the .
- ///
- [XmlAttribute("Layout")]
- [DefaultValue(null)]
- public string Layout { get; set; }
-
- ///
- /// Gets or sets a list of representing the images of all the of the represented layout.
- ///
- [XmlArray("LedImages")]
- public List LedImages { get; set; } = new List();
- }
-}
diff --git a/RGB.NET.Core/Devices/Layout/LedLayout.cs b/RGB.NET.Core/Devices/Layout/LedLayout.cs
deleted file mode 100644
index c382520e..00000000
--- a/RGB.NET.Core/Devices/Layout/LedLayout.cs
+++ /dev/null
@@ -1,182 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Globalization;
-using System.Xml.Serialization;
-
-namespace RGB.NET.Core.Layout
-{
- ///
- /// Represents the serializable layout of a .
- ///
- [Serializable]
- [XmlType("Led")]
- public class LedLayout
- {
- #region Properties & Fields
-
- ///
- /// Gets or sets the Id of the .
- ///
- [XmlAttribute("Id")]
- public string Id { get; set; }
-
- ///
- /// Gets or sets the descriptive of the .
- /// This property is for XML-serialization only and should not be directly accessed.
- ///
- [XmlElement("Shape")]
- [DefaultValue("Rectangle")]
- public string DescriptiveShape { get; set; } = "Rectangle";
-
- ///
- /// Gets or sets the descriptive x-position of the .
- /// This property is for XML-serialization only and should not be directly accessed.
- ///
- [XmlElement("X")]
- [DefaultValue("+")]
- public string DescriptiveX { get; set; } = "+";
-
- ///
- /// Gets or sets the descriptive y-position of the .
- /// This property is for XML-serialization only and should not be directly accessed.
- ///
- [XmlElement("Y")]
- [DefaultValue("=")]
- public string DescriptiveY { get; set; } = "=";
-
- ///
- /// Gets or sets the descriptive width of the .
- /// This property is for XML-serialization only and should not be directly accessed.
- ///
- [XmlElement("Width")]
- [DefaultValue("1.0")]
- public string DescriptiveWidth { get; set; } = "1.0";
-
- ///
- /// Gets or sets the descriptive height of the .
- /// This property is for XML-serialization only and should not be directly accessed.
- ///
- [XmlElement("Height")]
- [DefaultValue("1.0")]
- public string DescriptiveHeight { get; set; } = "1.0";
-
- ///
- /// Gets or sets the of the .
- ///
- [XmlIgnore]
- public Shape Shape { get; set; }
-
- ///
- /// Gets or sets the vecor-data representing a custom-shape of the .
- ///
- [XmlIgnore]
- public string ShapeData { get; set; }
-
- ///
- /// Gets or sets the x-position of the .
- ///
- [XmlIgnore]
- public double X { get; private set; }
-
- ///
- /// Gets or sets the y-position of the .
- ///
- [XmlIgnore]
- public double Y { get; private set; }
-
- ///
- /// Gets or sets the width of the .
- ///
- [XmlIgnore]
- public double Width { get; private set; }
-
- ///
- /// Gets or sets the height of the .
- ///
- [XmlIgnore]
- public double Height { get; private set; }
-
- #endregion
-
- #region Methods
-
- ///
- /// Calculates the position- and size-data from the respective descriptive values.
- ///
- /// The this belongs to.
- /// The previously calculated.
- public void CalculateValues(DeviceLayout device, LedLayout lastLed)
- {
- if (!Enum.TryParse(DescriptiveShape, true, out Shape shape))
- {
- shape = Shape.Custom;
- ShapeData = DescriptiveShape;
- }
- Shape = shape;
-
- Width = GetSizeValue(DescriptiveWidth, device.LedUnitWidth);
- Height = GetSizeValue(DescriptiveHeight, device.LedUnitHeight);
-
- X = GetLocationValue(DescriptiveX, lastLed?.X ?? 0, Width, lastLed?.Width ?? 0);
- Y = GetLocationValue(DescriptiveY, lastLed?.Y ?? 0, Height, lastLed?.Height ?? 0);
- }
-
- private double GetLocationValue(string value, double lastValue, double currentSize, double lastSize)
- {
- try
- {
- if (string.IsNullOrWhiteSpace(value)) return 0;
-
- value = value.Replace(" ", string.Empty);
-
- if (string.Equals(value, "=", StringComparison.Ordinal))
- return lastValue;
-
- if (string.Equals(value, "+", StringComparison.Ordinal))
- return lastValue + lastSize;
-
- if (value.StartsWith("+", StringComparison.Ordinal))
- return lastValue + lastSize + double.Parse(value.Substring(1), CultureInfo.InvariantCulture);
-
- if (string.Equals(value, "-", StringComparison.Ordinal))
- return lastValue - currentSize;
-
- if (value.StartsWith("-", StringComparison.Ordinal))
- return lastValue - currentSize - double.Parse(value.Substring(1), CultureInfo.InvariantCulture);
-
- if (string.Equals(value, "~", StringComparison.Ordinal))
- return (lastValue + lastSize) - currentSize;
-
- if (value.StartsWith("~", StringComparison.Ordinal))
- return (lastValue + lastSize) - currentSize - double.Parse(value.Substring(1), CultureInfo.InvariantCulture);
-
- return double.Parse(value, CultureInfo.InvariantCulture);
- }
- catch
- {
- return 0;
- }
- }
-
- private double GetSizeValue(string value, double unitSize)
- {
- try
- {
- if (string.IsNullOrWhiteSpace(value)) return 0;
-
- value = value.Replace(" ", string.Empty);
-
- if (value.EndsWith("mm", StringComparison.OrdinalIgnoreCase))
- return double.Parse(value.Substring(0, value.Length - 2), CultureInfo.InvariantCulture);
-
- return unitSize * double.Parse(value, CultureInfo.InvariantCulture);
- }
- catch
- {
- return 0;
- }
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Core/Devices/RGBDeviceLighting.cs b/RGB.NET.Core/Devices/RGBDeviceLighting.cs
deleted file mode 100644
index 70a0607d..00000000
--- a/RGB.NET.Core/Devices/RGBDeviceLighting.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using RGB.NET.Core.Layout;
-
-namespace RGB.NET.Core
-{
- ///
- /// Contains a list of different lightning-modes used by .
- ///
- public enum RGBDeviceLighting
- {
- ///
- /// The doesn't support lighting,
- ///
- None = 0,
-
- ///
- /// The supports per-key-lightning.
- ///
- Key = 1,
-
- ///
- /// The supports per-device-lightning.
- ///
- Device = 2,
- }
-}
diff --git a/RGB.NET.Core/Devices/RGBDeviceType.cs b/RGB.NET.Core/Devices/RGBDeviceType.cs
index b0de5e37..88e4f822 100644
--- a/RGB.NET.Core/Devices/RGBDeviceType.cs
+++ b/RGB.NET.Core/Devices/RGBDeviceType.cs
@@ -1,96 +1,105 @@
using System;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Contains a list of different types of device.
+///
+[Flags]
+public enum RGBDeviceType
{
///
- /// Contains a list of different types of device.
- ///
- [Flags]
- public enum RGBDeviceType
- {
- ///
- /// Represents nothing.
- ///
- None = 0,
-
- ///
- /// Represents a keyboard.
- ///
- Keyboard = 1 << 0,
-
- ///
- /// Represents a mouse.
- ///
- Mouse = 1 << 1,
-
- ///
- /// Represents a headset.
- ///
- Headset = 1 << 2,
-
- ///
- /// Represents a mousepad.
- ///
- Mousepad = 1 << 3,
-
- ///
- /// Represents a LED-stipe.
- ///
- LedStripe = 1 << 4,
-
- ///
- /// Represents a LED-matrix.
- ///
- LedMatrix = 1 << 5,
-
- ///
- /// Represents a Mainboard.
- ///
- Mainboard = 1 << 6,
-
- ///
- /// Represents a Graphics card.
- ///
- GraphicsCard = 1 << 7,
-
- ///
- /// Represents a DRAM-bank.
- ///
- DRAM = 1 << 8,
-
- ///
- /// Represents a headset stand.
- ///
- HeadsetStand = 1 << 9,
-
- ///
- /// Represents a keypad.
- ///
- Keypad = 1 << 10,
-
- ///
- /// Represents a fan.
- ///
- Fan = 1 << 11,
-
- ///
- /// Represents a speaker
- ///
- Speaker = 1 << 12,
-
- ///
- /// Represents a cooler.
- ///
- Cooler = 1 << 13,
-
- ///
- /// Represents a device where the type is not known or not present in the list.
- ///
- Unknown = 1 << 31,
-
- ///
- /// Represents all devices.
- ///
- All = ~None
- }
-}
+ /// Represents nothing.
+ ///
+ None = 0,
+
+ ///
+ /// Represents a keyboard.
+ ///
+ Keyboard = 1 << 0,
+
+ ///
+ /// Represents a mouse.
+ ///
+ Mouse = 1 << 1,
+
+ ///
+ /// Represents a headset.
+ ///
+ Headset = 1 << 2,
+
+ ///
+ /// Represents a mousepad.
+ ///
+ Mousepad = 1 << 3,
+
+ ///
+ /// Represents a LED-stipe.
+ ///
+ LedStripe = 1 << 4,
+
+ ///
+ /// Represents a LED-matrix.
+ ///
+ LedMatrix = 1 << 5,
+
+ ///
+ /// Represents a Mainboard.
+ ///
+ Mainboard = 1 << 6,
+
+ ///
+ /// Represents a Graphics card.
+ ///
+ GraphicsCard = 1 << 7,
+
+ ///
+ /// Represents a DRAM-bank.
+ ///
+ DRAM = 1 << 8,
+
+ ///
+ /// Represents a headset stand.
+ ///
+ HeadsetStand = 1 << 9,
+
+ ///
+ /// Represents a keypad.
+ ///
+ Keypad = 1 << 10,
+
+ ///
+ /// Represents a fan.
+ ///
+ Fan = 1 << 11,
+
+ ///
+ /// Represents a speaker
+ ///
+ Speaker = 1 << 12,
+
+ ///
+ /// Represents a cooler.
+ ///
+ Cooler = 1 << 13,
+
+ ///
+ /// Represents a monitor.
+ ///
+ Monitor = 1 << 14,
+
+ ///
+ /// Represents a generic led-controller.
+ ///
+ LedController = 1 << 15,
+
+ ///
+ /// Represents a device where the type is not known or not present in the list.
+ ///
+ Unknown = 1 << 31,
+
+ ///
+ /// Represents all devices.
+ ///
+ All = ~None
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/ICooler.cs b/RGB.NET.Core/Devices/TypeInterfaces/ICooler.cs
index 6053c40b..1e1eb2f2 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/ICooler.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/ICooler.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a cooler-device
- ///
- public interface ICooler : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a cooler-device
+///
+public interface ICooler : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IDRAM.cs b/RGB.NET.Core/Devices/TypeInterfaces/IDRAM.cs
index 6734e165..3bb4c23a 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IDRAM.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IDRAM.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a DRAM-device
- ///
- public interface IDRAM : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a DRAM-device
+///
+public interface IDRAM : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IFan.cs b/RGB.NET.Core/Devices/TypeInterfaces/IFan.cs
index 3f9eb570..9f0c803a 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IFan.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IFan.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// represents a fan-device
- ///
- public interface IFan : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// represents a fan-device
+///
+public interface IFan : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IGraphicsCard.cs b/RGB.NET.Core/Devices/TypeInterfaces/IGraphicsCard.cs
index 30fc9d4f..372ec092 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IGraphicsCard.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IGraphicsCard.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a graphics-card-device
- ///
- public interface IGraphicsCard : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a graphics-card-device
+///
+public interface IGraphicsCard : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IHeadset.cs b/RGB.NET.Core/Devices/TypeInterfaces/IHeadset.cs
index 25cde5c4..0256cd5c 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IHeadset.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IHeadset.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a headset-device
- ///
- public interface IHeadset : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a headset-device
+///
+public interface IHeadset : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IHeadsetStand.cs b/RGB.NET.Core/Devices/TypeInterfaces/IHeadsetStand.cs
index 9c5c81a0..537c8564 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IHeadsetStand.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IHeadsetStand.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a headset-stand-device
- ///
- public interface IHeadsetStand : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a headset-stand-device
+///
+public interface IHeadsetStand : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IKeyboard.cs b/RGB.NET.Core/Devices/TypeInterfaces/IKeyboard.cs
index 7e32e96c..33f4e63c 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IKeyboard.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IKeyboard.cs
@@ -1,8 +1,23 @@
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a generic keyboard-device.
+///
+public interface IKeyboard : IRGBDevice
{
///
- /// Represents a keyboard-device
+ /// Gets the device information assiciated with this device.
///
- public interface IKeyboard : IRGBDevice
- { }
+ new IKeyboardDeviceInfo DeviceInfo { get; }
}
+
+///
+/// Represents a generic keyboard device information.
+///
+public interface IKeyboardDeviceInfo : IRGBDeviceInfo
+{
+ ///
+ /// Gets the of the keyboard.
+ ///
+ KeyboardLayoutType Layout { get; }
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IKeypad.cs b/RGB.NET.Core/Devices/TypeInterfaces/IKeypad.cs
index 30304926..2a65233b 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IKeypad.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IKeypad.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a keypad-device
- ///
- public interface IKeypad : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a keypad-device
+///
+public interface IKeypad : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/ILedMatrix.cs b/RGB.NET.Core/Devices/TypeInterfaces/ILedMatrix.cs
index 2ba759dc..b0f401e5 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/ILedMatrix.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/ILedMatrix.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a led-matrix-device
- ///
- public interface ILedMatrix : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a led-matrix-device
+///
+public interface ILedMatrix : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/ILedStripe.cs b/RGB.NET.Core/Devices/TypeInterfaces/ILedStripe.cs
index 9c97ab53..4bb5fd80 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/ILedStripe.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/ILedStripe.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a led-stripe-device
- ///
- public interface ILedStripe : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a led-stripe-device
+///
+public interface ILedStripe : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IMainboard.cs b/RGB.NET.Core/Devices/TypeInterfaces/IMainboard.cs
index e043c6f9..10af8f4a 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IMainboard.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IMainboard.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a mainboard-device
- ///
- public interface IMainboard : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a mainboard-device
+///
+public interface IMainboard : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IMouse.cs b/RGB.NET.Core/Devices/TypeInterfaces/IMouse.cs
index 6064012d..76e62e2e 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IMouse.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IMouse.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a mouse-device
- ///
- public interface IMouse : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a mouse-device
+///
+public interface IMouse : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IMousepad.cs b/RGB.NET.Core/Devices/TypeInterfaces/IMousepad.cs
index e6812fc1..c89b2548 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IMousepad.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IMousepad.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a mousepad-device
- ///
- public interface IMousepad : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a mousepad-device
+///
+public interface IMousepad : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/ISpeaker.cs b/RGB.NET.Core/Devices/TypeInterfaces/ISpeaker.cs
index 6670297f..cde47e4e 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/ISpeaker.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/ISpeaker.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a speaker-device
- ///
- public interface ISpeaker : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a speaker-device
+///
+public interface ISpeaker : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Devices/TypeInterfaces/IUnknownDevice.cs b/RGB.NET.Core/Devices/TypeInterfaces/IUnknownDevice.cs
index 724dc4dc..1d136ad7 100644
--- a/RGB.NET.Core/Devices/TypeInterfaces/IUnknownDevice.cs
+++ b/RGB.NET.Core/Devices/TypeInterfaces/IUnknownDevice.cs
@@ -1,8 +1,7 @@
-namespace RGB.NET.Core
-{
- ///
- /// Represents a device with unkown or not specified type.
- ///
- public interface IUnknownDevice : IRGBDevice
- { }
-}
+namespace RGB.NET.Core;
+
+///
+/// Represents a device with unkown or not specified type.
+///
+public interface IUnknownDevice : IRGBDevice
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Events/ExceptionEventArgs.cs b/RGB.NET.Core/Events/ExceptionEventArgs.cs
index 01e58ae8..63cb3abe 100644
--- a/RGB.NET.Core/Events/ExceptionEventArgs.cs
+++ b/RGB.NET.Core/Events/ExceptionEventArgs.cs
@@ -3,35 +3,48 @@
using System;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents the information supplied with an -event.
+///
+public class ExceptionEventArgs : EventArgs
{
- ///
+ #region Properties & Fields
+
///
- /// Represents the information supplied with an -event.
+ /// Gets the which is responsible for the event-call.
///
- public class ExceptionEventArgs : EventArgs
- {
- #region Properties & Fields
+ public Exception Exception { get; }
- ///
- /// Gets the which is responsible for the event-call.
- ///
- public Exception Exception { get; }
+ ///
+ /// Gets a bool indicating if the exception is critical for the thrower.
+ ///
+ public bool IsCritical { get; }
- #endregion
+ ///
+ /// Gets or sets if the exception should be thrown after the event is handled.
+ ///
+ public bool Throw { get; set; }
- #region Constructors
+ #endregion
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The which is responsible for the event-call.
- public ExceptionEventArgs(Exception exception)
- {
- this.Exception = exception;
- }
+ #region Constructors
- #endregion
+ ///
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The which is responsible for the event-call.
+ /// Indicates if the exception is critical for the thrower.
+ /// Indicates if the exception should be thrown after the event is handled.
+ public ExceptionEventArgs(Exception exception, bool isCritical = false, bool @throw = false)
+ {
+ this.Exception = exception;
+ this.IsCritical = isCritical;
+ this.Throw = @throw;
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Events/ResolvePathEventArgs.cs b/RGB.NET.Core/Events/ResolvePathEventArgs.cs
deleted file mode 100644
index 2b73a2e5..00000000
--- a/RGB.NET.Core/Events/ResolvePathEventArgs.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using System;
-
-namespace RGB.NET.Core
-{
- public class ResolvePathEventArgs : EventArgs
- {
- #region Properties & Fields
-
- ///
- /// Gets the filename used to resolve the path.
- /// This has to be checked for null since it'S possible that only is used.
- /// Also check before use.
- ///
- public string RelativePart { get; }
-
- ///
- /// Gets the filename used to resolve the path.
- /// This has to be checked for null since it'S possible that only is used.
- /// Also check before use.
- ///
- public string FileName { get; }
-
- ///
- /// Gets the relative path used to resolve the path.
- /// If this is set and are unused.
- ///
- public string RelativePath { get; }
-
- ///
- /// Gets or sets the resolved path.
- ///
- public string FinalPath { get; set; }
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The filename used to resolve the path.
- /// The filename used to resolve the path.
- /// The relative part used to resolve the path.
- public ResolvePathEventArgs(string relativePart, string fileName, string finalPath)
- {
- this.RelativePart = relativePart;
- this.FileName = fileName;
- this.FinalPath = finalPath;
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The relative path used to resolve the path.
- /// The relative part used to resolve the path.
- public ResolvePathEventArgs(string relativePath, string finalPath)
- {
- this.RelativePath = relativePath;
- this.FinalPath = finalPath;
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Core/Events/SurfaceLayoutChangedEventArgs.cs b/RGB.NET.Core/Events/SurfaceLayoutChangedEventArgs.cs
index 5e4840a4..1cee8465 100644
--- a/RGB.NET.Core/Events/SurfaceLayoutChangedEventArgs.cs
+++ b/RGB.NET.Core/Events/SurfaceLayoutChangedEventArgs.cs
@@ -2,51 +2,65 @@
// ReSharper disable UnusedAutoPropertyAccessor.Global
using System;
-using System.Collections.Generic;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents the information supplied with an -event.
+///
+public class SurfaceLayoutChangedEventArgs : EventArgs
{
+ #region Properties & Fields
+
+ ///
+ /// Gets the that caused the change. Returns null if the change isn't caused by a .
+ ///
+ public IRGBDevice? Devices { get; }
+
+ ///
+ /// Gets a value indicating if the event is caused by the addition of a new to the .
+ ///
+ public bool DeviceAdded { get; }
+
+ ///
+ /// Gets a value indicating if the event is caused by the removal of a to the .
+ ///
+ public bool DeviceRemoved { get; }
+
+ ///
+ /// Gets a value indicating if the event is caused by a changed location or size of one of the on the .
+ ///
+ public bool DeviceChanged { get; }
+
+ #endregion
+
+ #region Constructors
+
///
///
- /// Represents the information supplied with an -event.
+ /// Initializes a new instance of the class.
///
- public class SurfaceLayoutChangedEventArgs : EventArgs
+ /// The that caused the change.
+ /// A value indicating if the event is caused by the addition of a new to the .
+ /// A value indicating if the event is caused by the removal of a from the .
+ /// A value indicating if the event is caused by a change to a on the .
+ private SurfaceLayoutChangedEventArgs(IRGBDevice? devices, bool deviceAdded, bool deviceRemoved, bool deviceChanged)
{
- #region Properties & Fields
-
- ///
- /// Gets the that caused the change. Returns null if the change isn't caused by a .
- ///
- public IEnumerable Devices { get; }
-
- ///
- /// Gets a value indicating if the event is caused by the addition of a new to the .
- ///
- public bool DeviceAdded { get; }
-
- ///
- /// Gets a value indicating if the event is caused by a changed location of one of the devices on the .
- ///
- public bool DeviceLocationChanged { get; }
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The that caused the change.
- /// A value indicating if the event is caused by the addition of a new to the .
- /// A value indicating if the event is caused by a changed location of one of the devices on the .
- public SurfaceLayoutChangedEventArgs(IEnumerable devices, bool deviceAdded, bool deviceLocationChanged)
- {
- this.Devices = devices;
- this.DeviceAdded = deviceAdded;
- this.DeviceLocationChanged = deviceLocationChanged;
- }
-
- #endregion
+ this.Devices = devices;
+ this.DeviceAdded = deviceAdded;
+ this.DeviceRemoved = deviceRemoved;
+ this.DeviceChanged = deviceChanged;
}
-}
+
+ #endregion
+
+ #region Factory
+
+ internal static SurfaceLayoutChangedEventArgs FromAddedDevice(IRGBDevice device) => new(device, true, false, false);
+ internal static SurfaceLayoutChangedEventArgs FromRemovedDevice(IRGBDevice device) => new(device, false, true, false);
+ internal static SurfaceLayoutChangedEventArgs FromChangedDevice(IRGBDevice device) => new(device, false, false, true);
+ internal static SurfaceLayoutChangedEventArgs Misc() => new(null, false, false, false);
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Events/UpdatedEventArgs.cs b/RGB.NET.Core/Events/UpdatedEventArgs.cs
index fe2c4e6a..b4251d4d 100644
--- a/RGB.NET.Core/Events/UpdatedEventArgs.cs
+++ b/RGB.NET.Core/Events/UpdatedEventArgs.cs
@@ -1,11 +1,10 @@
using System;
-namespace RGB.NET.Core
-{
- ///
- ///
- /// Represents the information supplied with an -event.
- ///
- public class UpdatedEventArgs : EventArgs
- { }
-}
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents the information supplied with an -event.
+///
+public class UpdatedEventArgs : EventArgs
+{ }
\ No newline at end of file
diff --git a/RGB.NET.Core/Events/UpdatingEventArgs.cs b/RGB.NET.Core/Events/UpdatingEventArgs.cs
index 46e1f73f..47df4af4 100644
--- a/RGB.NET.Core/Events/UpdatingEventArgs.cs
+++ b/RGB.NET.Core/Events/UpdatingEventArgs.cs
@@ -3,49 +3,48 @@
using System;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents the information supplied with an -event.
+///
+public class UpdatingEventArgs : EventArgs
{
+ #region Properties & Fields
+
+ ///
+ /// Gets the elapsed time (in seconds) since the last update.
+ ///
+ public double DeltaTime { get; }
+
+ ///
+ /// Gets the trigger causing this update.
+ ///
+ public IUpdateTrigger? Trigger { get; }
+
+ ///
+ /// Gets the custom-data provided by the trigger for this update.
+ ///
+ public CustomUpdateData CustomData { get; }
+
+ #endregion
+
+ #region Constructors
+
///
///
- /// Represents the information supplied with an -event.
+ /// Initializes a new instance of the class.
///
- public class UpdatingEventArgs : EventArgs
+ /// The elapsed time (in seconds) since the last update.
+ /// The trigger causing this update.
+ /// The custom-data provided by the trigger for this update.
+ public UpdatingEventArgs(double deltaTime, IUpdateTrigger? trigger, CustomUpdateData customData)
{
- #region Properties & Fields
-
- ///
- /// Gets the elapsed time (in seconds) since the last update.
- ///
- public double DeltaTime { get; }
-
- ///
- /// Gets the trigger causing this update.
- ///
- public IUpdateTrigger Trigger { get; }
-
- ///
- /// Gets the custom-data provided by the trigger for this update.
- ///
- public CustomUpdateData CustomData { get; }
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The elapsed time (in seconds) since the last update.
- /// The trigger causing this update.
- /// The custom-data provided by the trigger for this update.
- public UpdatingEventArgs(double deltaTime, IUpdateTrigger trigger, CustomUpdateData customData)
- {
- this.DeltaTime = deltaTime;
- this.Trigger = trigger;
- this.CustomData = customData;
- }
-
- #endregion
+ this.DeltaTime = deltaTime;
+ this.Trigger = trigger;
+ this.CustomData = customData;
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Exceptions/DeviceProviderException.cs b/RGB.NET.Core/Exceptions/DeviceProviderException.cs
new file mode 100644
index 00000000..4d852887
--- /dev/null
+++ b/RGB.NET.Core/Exceptions/DeviceProviderException.cs
@@ -0,0 +1,34 @@
+using System;
+
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents an exception thrown by a .
+///
+public class DeviceProviderException : ApplicationException
+{
+ #region Properties & Fields
+
+ ///
+ /// Gets a bool indicating if the exception is critical and shouldn't be ingored.
+ ///
+ public bool IsCritical { get; }
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The exception that is the casue of the current exception or null if this exception was thrown on purpose.
+ /// A value indicating if the exception is critical and shouldn't be ignored.
+ public DeviceProviderException(Exception? innerException, bool isCritical)
+ : base(innerException?.Message, innerException)
+ {
+ this.IsCritical = isCritical;
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Exceptions/RGBDeviceException.cs b/RGB.NET.Core/Exceptions/RGBDeviceException.cs
index 735b0c49..0ccea387 100644
--- a/RGB.NET.Core/Exceptions/RGBDeviceException.cs
+++ b/RGB.NET.Core/Exceptions/RGBDeviceException.cs
@@ -1,25 +1,24 @@
using System;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents an exception thrown by an .
+///
+public class RGBDeviceException : ApplicationException
{
+ #region Constructors
+
///
///
- /// Represents an exception thrown by an .
+ /// Initializes a new instance of the class.
///
- public class RGBDeviceException : ApplicationException
- {
- #region Constructors
-
- ///
- ///
- /// Initializes a new instance of the class.
- ///
- /// The message which describes the reason of throwing this exception.
- /// Optional inner exception, which lead to this exception.
- public RGBDeviceException(string message, Exception innerException = null)
- : base(message, innerException)
- { }
+ /// The message which describes the reason of throwing this exception.
+ /// Optional inner exception, which lead to this exception.
+ public RGBDeviceException(string message, Exception? innerException = null)
+ : base(message, innerException)
+ { }
- #endregion
- }
-}
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Exceptions/RGBSurfaceException.cs b/RGB.NET.Core/Exceptions/RGBSurfaceException.cs
new file mode 100644
index 00000000..eb2b27c6
--- /dev/null
+++ b/RGB.NET.Core/Exceptions/RGBSurfaceException.cs
@@ -0,0 +1,24 @@
+using System;
+
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents an exception thrown by an .
+///
+public class RGBSurfaceException : ApplicationException
+{
+ #region Constructors
+
+ ///
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The message which describes the reason of throwing this exception.
+ /// Optional inner exception, which lead to this exception.
+ public RGBSurfaceException(string message, Exception? innerException = null)
+ : base(message, innerException)
+ { }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Extensions/ColorExtensions.cs b/RGB.NET.Core/Extensions/ColorExtensions.cs
index 15d0c804..c2afc234 100644
--- a/RGB.NET.Core/Extensions/ColorExtensions.cs
+++ b/RGB.NET.Core/Extensions/ColorExtensions.cs
@@ -1,30 +1,32 @@
using System;
-namespace RGB.NET.Core
-{
- public static class ColorExtensions
- {
- #region Methods
+namespace RGB.NET.Core;
- ///
- /// Calculates the distance between the two given colors using the redmean algorithm.
- /// For more infos check https://www.compuphase.com/cmetric.htm
- ///
- /// The start color of the distance calculation.
- /// The end color fot the distance calculation.
- ///
- public static double DistanceTo(this Color color1, Color color2)
- {
- (_, byte r1, byte g1, byte b1) = color1.GetRGBBytes();
- (_, byte r2, byte g2, byte b2) = color2.GetRGBBytes();
+///
+/// Offers some extensions and helper-methods for related things.
+///
+public static class ColorExtensions
+{
+ #region Methods
- long rmean = (r1 + r2) / 2;
- long r = r1 - r2;
- long g = g1 - g2;
- long b = b1 - b2;
- return Math.Sqrt((((512 + rmean) * r * r) >> 8) + (4 * g * g) + (((767 - rmean) * b * b) >> 8));
- }
+ ///
+ /// Calculates the distance between the two specified colors using the redmean algorithm.
+ /// For more infos check https://www.compuphase.com/cmetric.htm
+ ///
+ /// The start color of the distance calculation.
+ /// The end color fot the distance calculation.
+ /// The redmean distance between the two specified colors.
+ public static double DistanceTo(this in Color color1, in Color color2)
+ {
+ (_, byte r1, byte g1, byte b1) = color1.GetRGBBytes();
+ (_, byte r2, byte g2, byte b2) = color2.GetRGBBytes();
- #endregion
+ long rmean = (r1 + r2) / 2;
+ long r = r1 - r2;
+ long g = g1 - g2;
+ long b = b1 - b2;
+ return Math.Sqrt((((512 + rmean) * r * r) >> 8) + (4 * g * g) + (((767 - rmean) * b * b) >> 8));
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Extensions/CustomUpdateDataExtension.cs b/RGB.NET.Core/Extensions/CustomUpdateDataExtension.cs
new file mode 100644
index 00000000..ff014a91
--- /dev/null
+++ b/RGB.NET.Core/Extensions/CustomUpdateDataExtension.cs
@@ -0,0 +1,55 @@
+namespace RGB.NET.Core;
+
+///
+/// Offers some extensions for easier use of .
+///
+public static class CustomUpdateDataExtension
+{
+ ///
+ /// Sets the -Parameter to the given value.
+ ///
+ /// The update-data to modify.
+ /// The value to set.
+ /// The modified update-data.
+ public static CustomUpdateData FlushLeds(this CustomUpdateData customUpdateData, bool value = true)
+ {
+ customUpdateData[CustomUpdateDataIndex.FLUSH_LEDS] = value;
+ return customUpdateData;
+ }
+
+ ///
+ /// Sets the -Parameter to the given value.
+ ///
+ /// The update-data to modify.
+ /// The value to set.
+ /// The modified update-data.
+ public static CustomUpdateData Render(this CustomUpdateData customUpdateData, bool value = true)
+ {
+ customUpdateData[CustomUpdateDataIndex.RENDER] = value;
+ return customUpdateData;
+ }
+
+ ///
+ /// Sets the -Parameter to the given value.
+ ///
+ /// The update-data to modify.
+ /// The value to set.
+ /// The modified update-data.
+ public static CustomUpdateData UpdateDevices(this CustomUpdateData customUpdateData, bool value = true)
+ {
+ customUpdateData[CustomUpdateDataIndex.UPDATE_DEVICES] = value;
+ return customUpdateData;
+ }
+
+ ///
+ /// Sets the -Parameter to the given value.
+ ///
+ /// The update-data to modify.
+ /// The value to set.
+ /// The modified update-data.
+ public static CustomUpdateData Heartbeat(this CustomUpdateData customUpdateData, bool value = true)
+ {
+ customUpdateData[CustomUpdateDataIndex.HEARTBEAT] = value;
+ return customUpdateData;
+ }
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Extensions/MathExtensions.cs b/RGB.NET.Core/Extensions/MathExtensions.cs
index 0a9fb885..c3176b1a 100644
--- a/RGB.NET.Core/Extensions/MathExtensions.cs
+++ b/RGB.NET.Core/Extensions/MathExtensions.cs
@@ -1,101 +1,110 @@
using System;
using System.Runtime.CompilerServices;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Offers some extensions and helper-methods for the work with floats.
+///
+public static class FloatExtensions
{
+ #region Constants
+
///
- /// Offers some extensions and helper-methods for the work with doubles
+ /// Defines the precision RGB.NET processes floating point comparisons in.
///
- public static class DoubleExtensions
+ public const float TOLERANCE = 1E-7f;
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Checks if two values are equal respecting the .
+ ///
+ /// The first value to compare.
+ /// The first value to compare.
+ /// true if the difference is smaller than the ; otherwise, false.
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool EqualsInTolerance(this float value1, float value2) => Math.Abs(value1 - value2) < TOLERANCE;
+
+ ///
+ /// Clamps the provided value to be bigger or equal min and smaller or equal max.
+ ///
+ /// The value to clamp.
+ /// The lower value of the range the value is clamped to.
+ /// The higher value of the range the value is clamped to.
+ /// The clamped value.
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static float Clamp(this float value, float min, float max)
+ {
+ // ReSharper disable ConvertIfStatementToReturnStatement - I'm not sure why, but inlining this statement reduces performance by ~10%
+ if (value < min) return min;
+ if (value > max) return max;
+ return value;
+ // ReSharper restore ConvertIfStatementToReturnStatement
+ }
+
+ ///
+ /// Clamps the provided value to be bigger or equal min and smaller or equal max.
+ ///
+ /// The value to clamp.
+ /// The lower value of the range the value is clamped to.
+ /// The higher value of the range the value is clamped to.
+ /// The clamped value.
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static int Clamp(this int value, int min, int max)
{
- #region Constants
-
- ///
- /// Defines the precision RGB.NET processes floating point comparisons in.
- ///
- public const double TOLERANCE = 1E-10;
-
- #endregion
-
- #region Methods
-
- ///
- /// Checks if two values are equal respecting the .
- ///
- /// The first value to compare.
- /// The first value to compare.
- /// true if the difference is smaller than the ; otherwise, false.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static bool EqualsInTolerance(this double value1, double value2) => Math.Abs(value1 - value2) < TOLERANCE;
-
- ///
- /// Clamps the provided value to be bigger or equal min and smaller or equal max.
- ///
- /// The value to clamp.
- /// The lower value of the range the value is clamped to.
- /// The higher value of the range the value is clamped to.
- /// The clamped value.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static double Clamp(this double value, double min, double max)
- {
- // ReSharper disable ConvertIfStatementToReturnStatement - I'm not sure why, but inlining this statement reduces performance by ~10%
- if (value < min) return min;
- if (value > max) return max;
- return value;
- // ReSharper restore ConvertIfStatementToReturnStatement
- }
-
- ///
- /// Clamps the provided value to be bigger or equal min and smaller or equal max.
- ///
- /// The value to clamp.
- /// The lower value of the range the value is clamped to.
- /// The higher value of the range the value is clamped to.
- /// The clamped value.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static int Clamp(this int value, int min, int max)
- {
- // ReSharper disable ConvertIfStatementToReturnStatement - I'm not sure why, but inlining this statement reduces performance by ~10%
- if (value < min) return min;
- if (value > max) return max;
- return value;
- // ReSharper restore ConvertIfStatementToReturnStatement
- }
-
- ///
- /// Enforces the provided value to be in the specified range by wrapping it around the edges if it exceeds them.
- ///
- /// The value to wrap.
- /// The lower value of the range the value is wrapped into.
- /// The higher value of the range the value is wrapped into.
- /// The wrapped value.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static double Wrap(this double value, double min, double max)
- {
- double range = max - min;
-
- while (value >= max)
- value -= range;
-
- while (value < min)
- value += range;
-
- return value;
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static byte GetByteValueFromPercentage(this double percentage)
- {
- if (double.IsNaN(percentage)) return 0;
-
- percentage = percentage.Clamp(0, 1.0);
- return (byte)(percentage >= 1.0 ? 255 : percentage * 256.0);
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static double GetPercentageFromByteValue(this byte value)
- => ((double)value) / byte.MaxValue;
-
- #endregion
+ // ReSharper disable ConvertIfStatementToReturnStatement - I'm not sure why, but inlining this statement reduces performance by ~10%
+ if (value < min) return min;
+ if (value > max) return max;
+ return value;
+ // ReSharper restore ConvertIfStatementToReturnStatement
}
-}
+
+ ///
+ /// Enforces the provided value to be in the specified range by wrapping it around the edges if it exceeds them.
+ ///
+ /// The value to wrap.
+ /// The lower value of the range the value is wrapped into.
+ /// The higher value of the range the value is wrapped into.
+ /// The wrapped value.
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static float Wrap(this float value, float min, float max)
+ {
+ float range = max - min;
+
+ while (value >= max)
+ value -= range;
+
+ while (value < min)
+ value += range;
+
+ return value;
+ }
+
+ ///
+ /// Converts a normalized float value in the range [0..1] to a byte [0..255].
+ ///
+ /// The normalized float value to convert.
+ /// The byte value.
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static byte GetByteValueFromPercentage(this float percentage)
+ {
+ if (float.IsNaN(percentage)) return 0;
+
+ percentage = percentage.Clamp(0, 1.0f);
+ return (byte)(percentage >= 1.0f ? 255 : percentage * 256.0f);
+ }
+
+ ///
+ /// Converts a byte value [0..255] to a normalized float value in the range [0..1].
+ ///
+ /// The byte value to convert.
+ /// The normalized float value.
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static float GetPercentageFromByteValue(this byte value)
+ => value == 255 ? 1.0f : (value / 256.0f);
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Extensions/PointExtensions.cs b/RGB.NET.Core/Extensions/PointExtensions.cs
index 7c413e92..1acab3a7 100644
--- a/RGB.NET.Core/Extensions/PointExtensions.cs
+++ b/RGB.NET.Core/Extensions/PointExtensions.cs
@@ -1,37 +1,43 @@
using System;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Offers some extensions and helper-methods for related things.
+///
+public static class PointExtensions
{
- public static class PointExtensions
+ #region Methods
+
+ ///
+ /// Moves the specified by the specified amount.
+ ///
+ /// The to move.
+ /// The x-ammount to move.
+ /// The y-ammount to move.
+ /// The new location of the point.
+ public static Point Translate(this in Point point, float x = 0, float y = 0) => new(point.X + x, point.Y + y);
+
+ ///
+ /// Rotates the specified by the specified amuont around the specified origin.
+ ///
+ /// The to rotate.
+ /// The rotation.
+ /// The origin to rotate around. [0,0] if not set.
+ /// The new location of the point.
+ public static Point Rotate(this in Point point, in Rotation rotation, in Point origin = new())
{
- #region Methods
-
- ///
- /// Moves the specified by the given amount.
- ///
- /// The to move.
- /// The x-ammount to move.
- /// The y-ammount to move.
- /// The new location of the point.
- public static Point Translate(this Point point, double x = 0, double y = 0) => new Point(point.X + x, point.Y + y);
-
- ///
- /// Rotates the specified by the given amuont around the given origin.
- ///
- /// The to rotate.
- /// The rotation.
- /// The origin to rotate around. [0,0] if not set.
- /// The new location of the point.
- public static Point Rotate(this Point point, Rotation rotation, Point origin = new Point())
- {
- double sin = Math.Sin(rotation.Radians);
- double cos = Math.Cos(rotation.Radians);
-
- point = new Point(point.X - origin.X, point.Y - origin.Y);
- point = new Point((point.X * cos) - (point.Y * sin), (point.X * sin) + (point.Y * cos));
- return new Point(point.X + origin.X, point.Y + origin.Y); ;
- }
-
- #endregion
+ float sin = MathF.Sin(rotation.Radians);
+ float cos = MathF.Cos(rotation.Radians);
+
+ float x = point.X - origin.X;
+ float y = point.Y - origin.Y;
+
+ x = (x * cos) - (y * sin);
+ y = (x * sin) + (y * cos);
+
+ return new Point(x + origin.X, y + origin.Y);
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Extensions/RectangleExtensions.cs b/RGB.NET.Core/Extensions/RectangleExtensions.cs
index aae9b043..68fec324 100644
--- a/RGB.NET.Core/Extensions/RectangleExtensions.cs
+++ b/RGB.NET.Core/Extensions/RectangleExtensions.cs
@@ -1,169 +1,176 @@
using System;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Offers some extensions and helper-methods for the work with rectangles.
+///
+public static class RectangleExtensions
{
- public static class RectangleExtensions
+ #region Methods
+
+ ///
+ /// Sets the of the specified rectangle.
+ ///
+ /// The rectangle to modify.
+ /// The new location of the rectangle.
+ /// The modified .
+ public static Rectangle SetLocation(this in Rectangle rect, in Point location) => new(location, rect.Size);
+
+ ///
+ /// Sets the of the of the specified rectangle.
+ ///
+ /// The rectangle to modify.
+ /// The new x-location of the rectangle.
+ /// The modified .
+ public static Rectangle SetX(this in Rectangle rect, float x) => new(new Point(x, rect.Location.Y), rect.Size);
+
+ ///
+ /// Sets the of the of the specified rectangle.
+ ///
+ /// The rectangle to modify.
+ /// The new y-location of the rectangle.
+ /// The modified .
+ public static Rectangle SetY(this in Rectangle rect, float y) => new(new Point(rect.Location.X, y), rect.Size);
+
+ ///
+ /// Sets the of the specified rectangle.
+ ///
+ /// The rectangle to modify.
+ /// The new size of the rectangle.
+ /// The modified .
+ public static Rectangle SetSize(this in Rectangle rect, in Size size) => new(rect.Location, size);
+
+ ///
+ /// Sets the of the of the specified rectangle.
+ ///
+ /// The rectangle to modify.
+ /// The new width of the rectangle.
+ /// The modified .
+ public static Rectangle SetWidth(this in Rectangle rect, float width) => new(rect.Location, new Size(width, rect.Size.Height));
+
+ ///
+ /// Sets the of the of the specified rectangle.
+ ///
+ /// The rectangle to modify.
+ /// The new height of the rectangle.
+ /// The modified .
+ public static Rectangle SetHeight(this in Rectangle rect, float height) => new(rect.Location, new Size(rect.Size.Width, height));
+
+ ///
+ /// Calculates the percentage of intersection of a rectangle.
+ ///
+ /// The rectangle to calculate the intersection for.
+ /// The intersecting rectangle.
+ /// The percentage of intersection.
+ public static float CalculateIntersectPercentage(this in Rectangle rect, in Rectangle intersectingRect)
{
- #region Methods
-
- ///
- /// Sets the of the given rectangle.
- ///
- /// The rectangle to modify.
- /// The new location of the rectangle.
- /// The modified .
- public static Rectangle SetLocation(this Rectangle rect, Point location) => new Rectangle(location, rect.Size);
-
- ///
- /// Sets the of the of the given rectangle.
- ///
- /// The rectangle to modify.
- /// The new x-location of the rectangle.
- /// The modified .
- public static Rectangle SetX(this Rectangle rect, double x) => new Rectangle(new Point(x, rect.Location.Y), rect.Size);
-
- ///
- /// Sets the of the of the given rectangle.
- ///
- /// The rectangle to modify.
- /// The new y-location of the rectangle.
- /// The modified .
- public static Rectangle SetY(this Rectangle rect, double y) => new Rectangle(new Point(rect.Location.X, y), rect.Size);
-
- ///
- /// Sets the of the given rectangle.
- ///
- /// The rectangle to modify.
- /// The new size of the rectangle.
- /// The modified .
- public static Rectangle SetSize(this Rectangle rect, Size size) => new Rectangle(rect.Location, size);
-
- ///
- /// Sets the of the of the given rectangle.
- ///
- /// The rectangle to modify.
- /// The new width of the rectangle.
- /// The modified .
- public static Rectangle SetWidth(this Rectangle rect, double width) => new Rectangle(rect.Location, new Size(width, rect.Size.Height));
-
- ///
- /// Sets the of the of the given rectangle.
- ///
- /// The rectangle to modify.
- /// The new height of the rectangle.
- /// The modified .
- public static Rectangle SetHeight(this Rectangle rect, double height) => new Rectangle(rect.Location, new Size(rect.Size.Width, height));
-
- ///
- /// Calculates the percentage of intersection of a rectangle.
- ///
- /// The intersecting rectangle.
- /// The percentage of intersection.
- public static double CalculateIntersectPercentage(this Rectangle rect, Rectangle intersectingRect)
- {
- if (rect.IsEmpty || intersectingRect.IsEmpty) return 0;
+ if (rect.IsEmpty || intersectingRect.IsEmpty) return 0;
- Rectangle intersection = rect.CalculateIntersection(intersectingRect);
- return (intersection.Size.Width * intersection.Size.Height) / (rect.Size.Width * rect.Size.Height);
- }
+ Rectangle intersection = rect.CalculateIntersection(intersectingRect);
+ return (intersection.Size.Width * intersection.Size.Height) / (rect.Size.Width * rect.Size.Height);
+ }
- ///
- /// Calculates the representing the intersection of this and the one provided as parameter.
- ///
- /// The intersecting
- /// A new representing the intersection this and the one provided as parameter.
- public static Rectangle CalculateIntersection(this Rectangle rect, Rectangle intersectingRectangle)
- {
- double x1 = Math.Max(rect.Location.X, intersectingRectangle.Location.X);
- double x2 = Math.Min(rect.Location.X + rect.Size.Width, intersectingRectangle.Location.X + intersectingRectangle.Size.Width);
+ ///
+ /// Calculates the representing the intersection of this and the one provided as parameter.
+ ///
+ /// The rectangle to calculate the intersection for.
+ /// The intersecting .
+ /// A new representing the intersection this and the one provided as parameter.
+ public static Rectangle CalculateIntersection(this in Rectangle rect, in Rectangle intersectingRectangle)
+ {
+ float x1 = Math.Max(rect.Location.X, intersectingRectangle.Location.X);
+ float x2 = Math.Min(rect.Location.X + rect.Size.Width, intersectingRectangle.Location.X + intersectingRectangle.Size.Width);
- double y1 = Math.Max(rect.Location.Y, intersectingRectangle.Location.Y);
- double y2 = Math.Min(rect.Location.Y + rect.Size.Height, intersectingRectangle.Location.Y + intersectingRectangle.Size.Height);
+ float y1 = Math.Max(rect.Location.Y, intersectingRectangle.Location.Y);
+ float y2 = Math.Min(rect.Location.Y + rect.Size.Height, intersectingRectangle.Location.Y + intersectingRectangle.Size.Height);
- if ((x2 >= x1) && (y2 >= y1))
- return new Rectangle(x1, y1, x2 - x1, y2 - y1);
+ if ((x2 >= x1) && (y2 >= y1))
+ return new Rectangle(x1, y1, x2 - x1, y2 - y1);
- return new Rectangle();
- }
+ return new Rectangle();
+ }
+
+ ///
+ /// Determines if the specified is contained within this .
+ ///
+ /// The containing rectangle.
+ /// The to test.
+ /// true if the rectangle contains the specified point; otherwise false.
+ public static bool Contains(this in Rectangle rect, in Point point) => rect.Contains(point.X, point.Y);
+
+ ///
+ /// Determines if the specified location is contained within this .
+ ///
+ /// The containing rectangle.
+ /// The X-location to test.
+ /// The Y-location to test.
+ /// true if the rectangle contains the specified coordinates; otherwise false.
+ public static bool Contains(this in Rectangle rect, float x, float y) => (rect.Location.X <= x) && (x < (rect.Location.X + rect.Size.Width))
+ && (rect.Location.Y <= y) && (y < (rect.Location.Y + rect.Size.Height));
+
+ ///
+ /// Determines if the specified is contained within this .
+ ///
+ /// The containing rectangle.
+ /// The to test.
+ /// true if the rectangle contains the specified rect; otherwise false.
+ public static bool Contains(this in Rectangle rect, in Rectangle rect2) => (rect.Location.X <= rect2.Location.X) && ((rect2.Location.X + rect2.Size.Width) <= (rect.Location.X + rect.Size.Width))
+ && (rect.Location.Y <= rect2.Location.Y) && ((rect2.Location.Y + rect2.Size.Height) <= (rect.Location.Y + rect.Size.Height));
+
+ ///
+ /// Moves the specified by the specified amount.
+ ///
+ /// The to move.
+ /// The amount to move.
+ /// The moved rectangle.
+ public static Rectangle Translate(this in Rectangle rect, in Point point) => rect.Translate(point.X, point.Y);
+
+ ///
+ /// Moves the specified by the specified amount.
+ ///
+ /// The to move.
+ /// The x-ammount to move.
+ /// The y-ammount to move.
+ /// The moved rectangle.
+ public static Rectangle Translate(this in Rectangle rect, float x = 0, float y = 0) => new(rect.Location.Translate(x, y), rect.Size);
+
+ ///
+ /// Rotates the specified by the specified amuont around the specified origin.
+ ///
+ ///
+ /// The returned array of is filled with the new locations of the rectangle clockwise starting from the top left:
+ /// [0] = top left
+ /// [1] = top right
+ /// [2] = bottom right
+ /// [3] = bottom left
+ ///
+ /// The to rotate.
+ /// The rotation.
+ /// The origin to rotate around. [0,0] if not set.
+ /// A array of containing the new locations of the corners of the original rectangle.
+ public static Point[] Rotate(this in Rectangle rect, in Rotation rotation, in Point origin = new())
+ {
+ Point[] points = {
+ rect.Location, // top left
+ new(rect.Location.X + rect.Size.Width, rect.Location.Y), // top right
+ new(rect.Location.X + rect.Size.Width, rect.Location.Y + rect.Size.Height), // bottom right
+ new(rect.Location.X, rect.Location.Y + rect.Size.Height), // bottom right
+ };
+
+ float sin = MathF.Sin(rotation.Radians);
+ float cos = MathF.Cos(rotation.Radians);
- ///
- /// Determines if the specified is contained within this .
- ///
- /// The to test.
- /// true if the rectangle contains the given point; otherwise false.
- public static bool Contains(this Rectangle rect, Point point) => rect.Contains(point.X, point.Y);
-
- ///
- /// Determines if the specified location is contained within this .
- ///
- /// The X-location to test.
- /// The Y-location to test.
- /// true if the rectangle contains the given coordinates; otherwise false.
- public static bool Contains(this Rectangle rect, double x, double y) => (rect.Location.X <= x) && (x < (rect.Location.X + rect.Size.Width))
- && (rect.Location.Y <= y) && (y < (rect.Location.Y + rect.Size.Height));
-
- ///
- /// Determines if the specified is contained within this .
- ///
- /// The to test.
- /// true if the rectangle contains the given rect; otherwise false.
- public static bool Contains(this Rectangle rect, Rectangle rect2) => (rect.Location.X <= rect2.Location.X) && ((rect2.Location.X + rect2.Size.Width) <= (rect.Location.X + rect.Size.Width))
- && (rect.Location.Y <= rect2.Location.Y) && ((rect2.Location.Y + rect2.Size.Height) <= (rect.Location.Y + rect.Size.Height));
-
- ///
- /// Moves the specified by the given amount.
- ///
- /// The to move.
- /// The amount to move.
- /// The moved rectangle.
- public static Rectangle Translate(this Rectangle rect, Point point) => rect.Translate(point.X, point.Y);
-
- ///
- /// Moves the specified by the given amount.
- ///
- /// The to move.
- /// The x-ammount to move.
- /// The y-ammount to move.
- /// The moved rectangle.
- public static Rectangle Translate(this Rectangle rect, double x = 0, double y = 0) => new Rectangle(rect.Location.Translate(x, y), rect.Size);
-
- ///
- /// Rotates the specified by the given amuont around the given origin.
- ///
- ///
- /// The returned array of is filled with the new locations of the rectangle clockwise starting from the top left:
- /// [0] = top left
- /// [1] = top right
- /// [2] = bottom right
- /// [3] = bottom left
- ///
- /// The to rotate.
- /// The rotation.
- /// The origin to rotate around. [0,0] if not set.
- /// A array of containing the new locations of the corners of the original rectangle.
- public static Point[] Rotate(this Rectangle rect, Rotation rotation, Point origin = new Point())
+ for (int i = 0; i < points.Length; i++)
{
- Point[] points = {
- rect.Location, // top left
- new Point(rect.Location.X + rect.Size.Width, rect.Location.Y), // top right
- new Point(rect.Location.X + rect.Size.Width, rect.Location.Y + rect.Size.Height), // bottom right
- new Point(rect.Location.X, rect.Location.Y + rect.Size.Height), // bottom right
- };
-
- double sin = Math.Sin(rotation.Radians);
- double cos = Math.Cos(rotation.Radians);
-
- for (int i = 0; i < points.Length; i++)
- {
- Point point = points[i];
- point = new Point(point.X - origin.X, point.Y - origin.Y);
- point = new Point((point.X * cos) - (point.Y * sin), (point.X * sin) + (point.Y * cos));
- points[i] = new Point(point.X + origin.X, point.Y + origin.Y);
- }
-
- return points;
+ Point point = points[i];
+ point = new Point(point.X - origin.X, point.Y - origin.Y);
+ point = new Point((point.X * cos) - (point.Y * sin), (point.X * sin) + (point.Y * cos));
+ points[i] = new Point(point.X + origin.X, point.Y + origin.Y);
}
- #endregion
+ return points;
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Extensions/SurfaceExtensions.cs b/RGB.NET.Core/Extensions/SurfaceExtensions.cs
new file mode 100644
index 00000000..67e5e3a1
--- /dev/null
+++ b/RGB.NET.Core/Extensions/SurfaceExtensions.cs
@@ -0,0 +1,84 @@
+// ReSharper disable UnusedMember.Global
+
+using System.Collections.Generic;
+using System.Linq;
+
+namespace RGB.NET.Core;
+
+///
+/// Offers some extensions and helper-methods for the work with the surface.
+///
+public static class SurfaceExtensions
+{
+ #region Methods
+
+ ///
+ /// Initializes the specifiec device provider and attaches all devices.
+ ///
+ /// The surface to attach the devices to.
+ /// The device provider to load.
+ /// -flags to filter the devices to load.
+ /// Specifies if exceptions should be thrown or silently be ignored.
+ public static void Load(this RGBSurface surface, IRGBDeviceProvider deviceProvider, RGBDeviceType loadFilter = RGBDeviceType.All, bool throwExceptions = false)
+ {
+ if (!deviceProvider.IsInitialized)
+ deviceProvider.Initialize(loadFilter, throwExceptions);
+
+ surface.Attach(deviceProvider.Devices);
+ }
+
+ ///
+ /// Attaches the specified devices to the surface.
+ ///
+ /// The surface the devices are attached to.
+ /// The devices to attach.
+ public static void Attach(this RGBSurface surface, IEnumerable devices)
+ {
+ foreach (IRGBDevice device in devices)
+ surface.Attach(device);
+ }
+
+ ///
+ /// Detaches the specified devices from the surface.
+ ///
+ /// The surface the devices are detached from.
+ /// The devices to detach.
+ public static void Detach(this RGBSurface surface, IEnumerable devices)
+ {
+ foreach (IRGBDevice device in devices)
+ surface.Detach(device);
+ }
+
+ ///
+ /// Gets all devices of a specific type.
+ ///
+ /// The type of devices to get.
+ /// A collection of devices with the specified type.
+ public static IEnumerable GetDevices(this RGBSurface surface)
+ where T : class
+ => surface.Devices.Where(x => x is T).Cast();
+
+ ///
+ /// Gets all devices of the specified .
+ ///
+ /// The surface to get the devices from.
+ /// The of the devices to get.
+ /// A collection of devices matching the specified .
+ public static IEnumerable GetDevices(this RGBSurface surface, RGBDeviceType deviceType)
+ => surface.Devices.Where(d => deviceType.HasFlag(d.DeviceInfo.DeviceType));
+
+ ///
+ /// Automatically aligns all devices to prevent overlaps.
+ ///
+ public static void AlignDevices(this RGBSurface surface)
+ {
+ float posX = 0;
+ foreach (IRGBDevice device in surface.Devices)
+ {
+ device.Location += new Point(posX, 0);
+ posX += device.ActualSize.Width + 1;
+ }
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Groups/AbstractLedGroup.cs b/RGB.NET.Core/Groups/AbstractLedGroup.cs
index eab68038..6569dac9 100644
--- a/RGB.NET.Core/Groups/AbstractLedGroup.cs
+++ b/RGB.NET.Core/Groups/AbstractLedGroup.cs
@@ -1,51 +1,61 @@
-using System.Collections.Generic;
+using System.Collections;
+using System.Collections.Generic;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+///
+/// Represents a generic .
+///
+public abstract class AbstractLedGroup : AbstractDecoratable, ILedGroup
{
- ///
- ///
- ///
- /// Represents a generic .
- ///
- public abstract class AbstractLedGroup : AbstractDecoratable, ILedGroup
- {
- #region Properties & Fields
+ #region Properties & Fields
- ///
- public IBrush Brush { get; set; }
+ RGBSurface? ILedGroup.Surface { get; set; }
- ///
- public int ZIndex { get; set; } = 0;
+ ///
+ public RGBSurface? Surface => ((ILedGroup)this).Surface;
- #endregion
+ ///
+ public IBrush? Brush { get; set; }
- #region Constructors
+ ///
+ public int ZIndex { get; set; } = 0;
- ///
- /// Initializes a new instance of the class.
- ///
- /// Specifies whether this should be automatically attached or not.
- protected AbstractLedGroup(bool autoAttach)
- {
- if (autoAttach)
- RGBSurface.Instance.AttachLedGroup(this);
- }
+ #endregion
- #endregion
+ #region Constructors
- #region Methods
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ protected AbstractLedGroup(RGBSurface? attachTo)
+ {
+ attachTo?.Attach(this);
+ }
- ///
- public abstract IList GetLeds();
+ #endregion
- ///
- public virtual void OnAttach()
- { }
+ #region Methods
- ///
- public virtual void OnDetach()
- { }
+ ///
+ /// Gets a enumerable containing all leds in this group.
+ ///
+ /// A enumerable containing all leds of this group.
+ protected abstract IEnumerable GetLeds();
- #endregion
- }
-}
+ ///
+ public virtual void OnAttach() { }
+
+ ///
+ public virtual void OnDetach() { }
+
+ ///
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+
+ ///
+ public IEnumerator GetEnumerator() => GetLeds().GetEnumerator();
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Groups/ILedGroup.cs b/RGB.NET.Core/Groups/ILedGroup.cs
index 5db5e639..88b5b976 100644
--- a/RGB.NET.Core/Groups/ILedGroup.cs
+++ b/RGB.NET.Core/Groups/ILedGroup.cs
@@ -3,38 +3,40 @@
using System.Collections.Generic;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a generic ledgroup.
+///
+public interface ILedGroup : IDecoratable, IEnumerable
{
- ///
///
- /// Represents a generic ledgroup.
+ /// Gets the surface this group is attached to or null if it is not attached to any surface.
+ ///
+ RGBSurface? Surface { get; internal set; }
+
+ ///
+ /// Gets a bool indicating if the group is attached to a surface.
+ ///
+ bool IsAttached => Surface != null;
+
+ ///
+ /// Gets or sets the which should be drawn over this .
+ ///
+ IBrush? Brush { get; set; }
+
+ ///
+ /// Gets or sets the z-index of this to allow ordering them before drawing. (lowest first) (default: 0)
+ ///
+ int ZIndex { get; set; }
+
+ ///
+ /// Called when the is attached to the .
+ ///
+ void OnAttach();
+
+ ///
+ /// Called when the is detached from the .
///
- public interface ILedGroup : IDecoratable
- {
- ///
- /// Gets or sets the which should be drawn over this .
- ///
- IBrush Brush { get; set; }
-
- ///
- /// Gets or sets the z-index of this to allow ordering them before drawing. (lowest first) (default: 0)
- ///
- int ZIndex { get; set; }
-
- ///
- /// Gets a list containing all of this .
- ///
- /// The list containing all of this .
- IList GetLeds();
-
- ///
- /// Called when the is attached to the .
- ///
- void OnAttach();
-
- ///
- /// Called when the is detached from the .
- ///
- void OnDetach();
- }
-}
+ void OnDetach();
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Groups/LedGroupExtension.cs b/RGB.NET.Core/Groups/LedGroupExtension.cs
new file mode 100644
index 00000000..f6fd6d38
--- /dev/null
+++ b/RGB.NET.Core/Groups/LedGroupExtension.cs
@@ -0,0 +1,57 @@
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable UnusedMember.Global
+
+namespace RGB.NET.Core;
+
+///
+/// Offers some extensions and helper-methods for related things.
+///
+public static class LedGroupExtension
+{
+ ///
+ /// Converts the specified to a .
+ ///
+ /// The to convert.
+ /// The converted .
+ public static ListLedGroup ToListLedGroup(this ILedGroup ledGroup)
+ {
+ // ReSharper disable once InvertIf
+ if (ledGroup is not ListLedGroup listLedGroup)
+ {
+ if (ledGroup.IsAttached)
+ ledGroup.Detach();
+ listLedGroup = new ListLedGroup(ledGroup.Surface, ledGroup) { Brush = ledGroup.Brush, ZIndex = ledGroup.ZIndex };
+ }
+ return listLedGroup;
+ }
+
+ ///
+ /// Returns a new which contains all from the specified excluding the specified ones.
+ ///
+ /// The base .
+ /// The to exclude.
+ /// The new .
+ public static ListLedGroup Exclude(this ILedGroup ledGroup, params Led[] ledIds)
+ {
+ ListLedGroup listLedGroup = ledGroup.ToListLedGroup();
+ foreach (Led led in ledIds)
+ listLedGroup.RemoveLed(led);
+ return listLedGroup;
+ }
+
+ // ReSharper disable once UnusedMethodReturnValue.Global
+ ///
+ /// Attaches the specified to the .
+ ///
+ /// The to attach.
+ /// The to attach this group to.
+ /// true if the could be attached; otherwise, false.
+ public static bool Attach(this ILedGroup ledGroup, RGBSurface surface) => surface.Attach(ledGroup);
+
+ ///
+ /// Detaches the specified from the .
+ ///
+ /// The to attach.
+ /// true if the could be detached; otherwise, false.
+ public static bool Detach(this ILedGroup ledGroup) => ledGroup.Surface?.Detach(ledGroup) ?? false;
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Groups/ListLedGroup.cs b/RGB.NET.Core/Groups/ListLedGroup.cs
new file mode 100644
index 00000000..a33fc56e
--- /dev/null
+++ b/RGB.NET.Core/Groups/ListLedGroup.cs
@@ -0,0 +1,132 @@
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable UnusedMember.Global
+
+using System.Collections.Generic;
+
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents a ledgroup containing arbitrary .
+///
+public class ListLedGroup : AbstractLedGroup
+{
+ #region Properties & Fields
+
+ ///
+ /// Gets the list containing the of this .
+ ///
+ protected IList GroupLeds { get; } = new List();
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Specifies the surface to attach this group to or null if the group should not be attached on creation.
+ public ListLedGroup(RGBSurface? surface)
+ : base(surface)
+ { }
+
+ ///
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Specifies the surface to attach this group to or null if the group should not be attached on creation.
+ /// The initial of this .
+ public ListLedGroup(RGBSurface? surface, IEnumerable leds)
+ : base(surface)
+ {
+ AddLeds(leds);
+ }
+
+ ///
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Specifies the surface to attach this group to or null if the group should not be attached on creation.
+ /// The initial of this .
+ public ListLedGroup(RGBSurface? surface, params Led[] leds)
+ : base(surface)
+ {
+ AddLeds(leds);
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Adds the specified LED(s) to this .
+ ///
+ /// The LED(s) to add.
+ public void AddLed(params Led[] leds) => AddLeds(leds);
+
+ ///
+ /// Adds the specified to this .
+ ///
+ /// The to add.
+ public void AddLeds(IEnumerable leds)
+ {
+ lock (GroupLeds)
+ foreach (Led led in leds)
+ if (!ContainsLed(led))
+ GroupLeds.Add(led);
+ }
+
+ ///
+ /// Removes the specified LED(s) from this .
+ ///
+ /// The LED(s) to remove.
+ public void RemoveLed(params Led[] leds) => RemoveLeds(leds);
+
+ ///
+ /// Removes the specified from this .
+ ///
+ /// The to remove.
+ public void RemoveLeds(IEnumerable leds)
+ {
+ lock (GroupLeds)
+ foreach (Led led in leds)
+ GroupLeds.Remove(led);
+ }
+
+ ///
+ /// Checks if a specified LED is contained by this ledgroup.
+ ///
+ /// The LED which should be checked.
+ /// true if the LED is contained by this ledgroup; otherwise, false.
+ public bool ContainsLed(Led led)
+ {
+ lock (GroupLeds)
+ return GroupLeds.Contains(led);
+ }
+
+ ///
+ /// Merges the from the specified ledgroup in this ledgroup.
+ ///
+ /// The ledgroup to merge.
+ public void MergeLeds(ILedGroup groupToMerge)
+ {
+ lock (GroupLeds)
+ foreach (Led led in groupToMerge)
+ if (!GroupLeds.Contains(led))
+ GroupLeds.Add(led);
+ }
+
+ ///
+ ///
+ /// Gets a list containing the from this group.
+ ///
+ /// The list containing the .
+ protected override IEnumerable GetLeds()
+ {
+ lock (GroupLeds)
+ return new List(GroupLeds);
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Helper/ConversionHelper.cs b/RGB.NET.Core/Helper/ConversionHelper.cs
index cf96a36b..0be3dfbc 100644
--- a/RGB.NET.Core/Helper/ConversionHelper.cs
+++ b/RGB.NET.Core/Helper/ConversionHelper.cs
@@ -1,60 +1,61 @@
-namespace RGB.NET.Core
+using System;
+
+namespace RGB.NET.Core;
+
+///
+/// Contains helper methods for converting things.
+///
+public static class ConversionHelper
{
+ #region Methods
+
+ // Source: https://web.archive.org/web/20180224104425/https://stackoverflow.com/questions/623104/byte-to-hex-string/3974535
///
- /// Contains helper methods for converting things.
+ /// Converts an array of bytes to a HEX-representation.
///
- public static class ConversionHelper
+ /// The array of bytes.
+ /// The HEX-representation of the provided bytes.
+ public static string ToHex(params byte[] bytes)
{
- #region Methods
-
- // Source: https://web.archive.org/web/20180224104425/https://stackoverflow.com/questions/623104/byte-to-hex-string/3974535
- ///
- /// Converts an array of bytes to a HEX-representation.
- ///
- /// The array of bytes.
- /// The HEX-representation of the provided bytes.
- public static string ToHex(params byte[] bytes)
+ char[] c = new char[bytes.Length * 2];
+
+ for (int bx = 0, cx = 0; bx < bytes.Length; ++bx, ++cx)
{
- char[] c = new char[bytes.Length * 2];
+ byte b = ((byte)(bytes[bx] >> 4));
+ c[cx] = (char)(b > 9 ? b + 0x37 : b + 0x30);
- for (int bx = 0, cx = 0; bx < bytes.Length; ++bx, ++cx)
- {
- byte b = ((byte)(bytes[bx] >> 4));
- c[cx] = (char)(b > 9 ? b + 0x37: b + 0x30);
+ b = ((byte)(bytes[bx] & 0x0F));
+ c[++cx] = (char)(b > 9 ? b + 0x37 : b + 0x30);
+ }
- b = ((byte)(bytes[bx] & 0x0F));
- c[++cx] = (char)(b > 9 ? b + 0x37: b + 0x30);
- }
+ return new string(c);
+ }
- return new string(c);
- }
+ // Source: https://web.archive.org/web/20180224104425/https://stackoverflow.com/questions/623104/byte-to-hex-string/3974535
+ ///
+ /// Converts the HEX-representation of a byte array to that array.
+ ///
+ /// The HEX-string to convert.
+ /// The correspondending byte array.
+ public static byte[] HexToBytes(ReadOnlySpan hexString)
+ {
+ if ((hexString.Length == 0) || ((hexString.Length % 2) != 0))
+ return Array.Empty();
- // Source: https://web.archive.org/web/20180224104425/https://stackoverflow.com/questions/623104/byte-to-hex-string/3974535
- ///
- /// Converts the HEX-representation of a byte array to that array.
- ///
- /// The HEX-string to convert.
- /// The correspondending byte array.
- public static byte[] HexToBytes(string hexString)
+ byte[] buffer = new byte[hexString.Length / 2];
+ for (int bx = 0, sx = 0; bx < buffer.Length; ++bx, ++sx)
{
- if ((hexString.Length == 0) || ((hexString.Length % 2) != 0))
- return new byte[0];
-
- byte[] buffer = new byte[hexString.Length / 2];
- for (int bx = 0, sx = 0; bx < buffer.Length; ++bx, ++sx)
- {
- // Convert first half of byte
- char c = hexString[sx];
- buffer[bx] = (byte)((c > '9' ? (c > 'Z' ? ((c - 'a') + 10) : ((c - 'A') + 10)) : (c - '0')) << 4);
-
- // Convert second half of byte
- c = hexString[++sx];
- buffer[bx] |= (byte)(c > '9' ? (c > 'Z' ? ((c - 'a') + 10) : ((c - 'A') + 10)) : (c - '0'));
- }
-
- return buffer;
+ // Convert first half of byte
+ char c = hexString[sx];
+ buffer[bx] = (byte)((c > '9' ? (c > 'Z' ? ((c - 'a') + 10) : ((c - 'A') + 10)) : (c - '0')) << 4);
+
+ // Convert second half of byte
+ c = hexString[++sx];
+ buffer[bx] |= (byte)(c > '9' ? (c > 'Z' ? ((c - 'a') + 10) : ((c - 'A') + 10)) : (c - '0'));
}
- #endregion
+ return buffer;
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Helper/CultureHelper.cs b/RGB.NET.Core/Helper/CultureHelper.cs
deleted file mode 100644
index 3ea900ab..00000000
--- a/RGB.NET.Core/Helper/CultureHelper.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System;
-using System.Globalization;
-using System.Runtime.InteropServices;
-
-namespace RGB.NET.Core
-{
- ///
- /// Offers some helper-methods for culture related things.
- ///
- public static class CultureHelper
- {
- #region DLLImports
-
- [DllImport("user32.dll")]
- private static extern IntPtr GetKeyboardLayout(uint thread);
-
- #endregion
-
- #region Constructors
-
- #endregion
-
- #region Methods
-
- ///
- /// Gets the current keyboard-layout from the OS.
- ///
- /// The current keyboard-layout
- public static CultureInfo GetCurrentCulture()
- {
- try
- {
- int keyboardLayout = GetKeyboardLayout(0).ToInt32() & 0xFFFF;
- return new CultureInfo(keyboardLayout);
- }
- catch
- {
- return new CultureInfo(1033); // en-US on error.
- }
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Core/Helper/DeviceHelper.cs b/RGB.NET.Core/Helper/DeviceHelper.cs
new file mode 100644
index 00000000..0fd9f9b7
--- /dev/null
+++ b/RGB.NET.Core/Helper/DeviceHelper.cs
@@ -0,0 +1,26 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+namespace RGB.NET.Core;
+
+///
+/// Offsers some helper methods for device creation.
+///
+public static class DeviceHelper
+{
+ #region Methods
+
+ ///
+ /// Creates a unique device name from a manufacturer and model name.
+ ///
+ ///
+ /// The id is made unique based on the assembly calling this method.
+ ///
+ /// The manufacturer of the device.
+ /// The model of the device.
+ /// The unique identifier for this device.
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public static string CreateDeviceName(string manufacturer, string model) => IdGenerator.MakeUnique(Assembly.GetCallingAssembly(), $"{manufacturer} {model}");
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Helper/PathHelper.cs b/RGB.NET.Core/Helper/PathHelper.cs
deleted file mode 100644
index d67e5b72..00000000
--- a/RGB.NET.Core/Helper/PathHelper.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-using System;
-using System.IO;
-using System.Reflection;
-
-namespace RGB.NET.Core
-{
- ///
- /// Offers some helper-methods for file-path related things.
- ///
- public static class PathHelper
- {
- #region Events
-
- ///
- /// Occurs when a path is resolving.
- ///
- public static event EventHandler ResolvingAbsolutePath;
-
- #endregion
-
- #region Methods
-
- ///
- /// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
- ///
- /// The relative part of the path to convert.
- /// The absolute path.
- public static string GetAbsolutePath(string relativePath) => GetAbsolutePath((object)null, relativePath);
-
- ///
- /// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
- ///
- /// The relative part of the path to convert.
- /// The file name of the path to convert.
- /// The absolute path.
- public static string GetAbsolutePath(string relativePath, string fileName) => GetAbsolutePath(null, relativePath, fileName);
-
- ///
- /// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
- ///
- /// The requester of this path. (Used for better control when using the event to override this behavior.)
- /// The relative path to convert.
- /// The file name of the path to convert.
- /// The absolute path.
- public static string GetAbsolutePath(object sender, string relativePath, string fileName)
- {
- string relativePart = Path.Combine(relativePath, fileName);
-
- string assemblyLocation = Assembly.GetEntryAssembly()?.Location;
- if (assemblyLocation == null) return relativePart;
-
- string directoryName = Path.GetDirectoryName(assemblyLocation);
- string path = directoryName == null ? null : Path.Combine(directoryName, relativePart);
-
- ResolvePathEventArgs args = new ResolvePathEventArgs(relativePath, fileName, path);
- ResolvingAbsolutePath?.Invoke(sender, args);
-
- return args.FinalPath;
- }
-
- ///
- /// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
- ///
- /// The requester of this path. (Used for better control when using the event to override this behavior.)
- /// The relative path to convert.
- /// The absolute path.
- public static string GetAbsolutePath(object sender, string relativePath)
- {
- string assemblyLocation = Assembly.GetEntryAssembly()?.Location;
- if (assemblyLocation == null) return relativePath;
-
- string directoryName = Path.GetDirectoryName(assemblyLocation);
- string path = directoryName == null ? null : Path.Combine(directoryName, relativePath);
-
- ResolvePathEventArgs args = new ResolvePathEventArgs(relativePath, path);
- ResolvingAbsolutePath?.Invoke(sender, args);
-
- return args.FinalPath;
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Core/Helper/TimerHelper.cs b/RGB.NET.Core/Helper/TimerHelper.cs
new file mode 100644
index 00000000..432170bf
--- /dev/null
+++ b/RGB.NET.Core/Helper/TimerHelper.cs
@@ -0,0 +1,178 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Threading;
+
+namespace RGB.NET.Core;
+
+///
+/// Offers some helper methods for timed operations.
+///
+public static class TimerHelper
+{
+ #region DLL-Imports
+
+ [DllImport("winmm.dll", EntryPoint = "timeBeginPeriod")]
+ private static extern void TimeBeginPeriod(int t);
+
+ [DllImport("winmm.dll", EntryPoint = "timeEndPeriod")]
+ private static extern void TimeEndPeriod(int t);
+
+ #endregion
+
+ #region Properties & Fields
+
+ private static readonly object HIGH_RESOLUTION_TIMER_LOCK = new();
+
+ private static bool _areHighResolutionTimersEnabled = false;
+
+ private static bool _useHighResolutionTimers = true;
+ ///
+ /// Gets or sets if High Resolution Timers should be used.
+ ///
+ public static bool UseHighResolutionTimers
+ {
+ get => _useHighResolutionTimers;
+ set
+ {
+ lock (HIGH_RESOLUTION_TIMER_LOCK)
+ {
+ _useHighResolutionTimers = value;
+ CheckHighResolutionTimerUsage();
+ }
+ }
+ }
+
+ // ReSharper disable once InconsistentNaming
+ private static readonly HashSet _timerLeases = new();
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Executes the provided action and blocks if needed until the the has passed.
+ ///
+ /// The action to execute.
+ /// The time in ms this method should block. default: 0
+ /// The time in ms spent executing the .
+ public static double Execute(Action action, double targetExecuteTime = 0)
+ {
+ long preUpdateTicks = Stopwatch.GetTimestamp();
+
+ action();
+
+ double updateTime = GetElapsedTime(preUpdateTicks);
+
+ if (targetExecuteTime > 0)
+ {
+ int sleep = (int)(targetExecuteTime - updateTime);
+ if (sleep > 0)
+ Thread.Sleep(sleep);
+ }
+
+ return updateTime;
+ }
+
+ ///
+ /// Calculates the elapsed time in ms from the provided timestamp until now.
+ ///
+ /// The initial timestamp to calculate the time from.
+ /// The elapsed time in ms.
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static double GetElapsedTime(long initialTimestamp) => ((Stopwatch.GetTimestamp() - initialTimestamp) / (Stopwatch.Frequency / 1000.0));
+
+ ///
+ /// Requests to use to use High Resolution Timers if enabled.
+ /// IMPORTANT: Always dispose the returned disposable if High Resolution Timers are no longer needed for the caller.
+ ///
+ /// A disposable to remove the request.
+ public static IDisposable RequestHighResolutionTimer()
+ {
+ HighResolutionTimerDisposable timerLease = new();
+ lock (HIGH_RESOLUTION_TIMER_LOCK)
+ {
+ _timerLeases.Add(timerLease);
+ CheckHighResolutionTimerUsage();
+ }
+
+ return timerLease;
+ }
+
+ private static void CheckHighResolutionTimerUsage()
+ {
+ if (UseHighResolutionTimers && (_timerLeases.Count > 0))
+ EnableHighResolutionTimers();
+ else
+ DisableHighResolutionTimers();
+ }
+
+ private static void EnableHighResolutionTimers()
+ {
+ lock (HIGH_RESOLUTION_TIMER_LOCK)
+ {
+ if (_areHighResolutionTimersEnabled) return;
+
+ // DarthAffe 06.05.2022: Linux should use 1ms timers by default
+ if (OperatingSystem.IsWindows())
+ TimeBeginPeriod(1);
+
+ _areHighResolutionTimersEnabled = true;
+ }
+ }
+
+ private static void DisableHighResolutionTimers()
+ {
+ lock (HIGH_RESOLUTION_TIMER_LOCK)
+ {
+ if (!_areHighResolutionTimersEnabled) return;
+
+ if (OperatingSystem.IsWindows())
+ TimeEndPeriod(1);
+
+ _areHighResolutionTimersEnabled = false;
+ }
+ }
+
+ ///
+ /// Disposes all open High Resolution Timer Requests.
+ /// This should be called once when exiting the application to make sure nothing remains open and the application correctly unregisters itself on OS level.
+ /// Shouldn't be needed if everything is disposed, but better safe then sorry.
+ ///
+ public static void DisposeAllHighResolutionTimerRequests()
+ {
+ List timerLeases = new(_timerLeases);
+ foreach (HighResolutionTimerDisposable timer in timerLeases)
+ timer.Dispose();
+ }
+
+ #endregion
+
+ private class HighResolutionTimerDisposable : IDisposable
+ {
+ #region Properties & Fields
+
+ private bool _isDisposed = false;
+
+ #endregion
+
+ #region Methods
+
+ public void Dispose()
+ {
+ if (_isDisposed) return;
+
+ _isDisposed = true;
+
+ lock (HIGH_RESOLUTION_TIMER_LOCK)
+ {
+ _timerLeases.Remove(this);
+ CheckHighResolutionTimerUsage();
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Ids/IdGenerator.cs b/RGB.NET.Core/Ids/IdGenerator.cs
new file mode 100644
index 00000000..99beaa68
--- /dev/null
+++ b/RGB.NET.Core/Ids/IdGenerator.cs
@@ -0,0 +1,74 @@
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+namespace RGB.NET.Core;
+
+///
+/// Offers some methods to create and handle unique identifiers.
+///
+public static class IdGenerator
+{
+ #region Properties & Fields
+
+ // ReSharper disable InconsistentNaming
+ private static readonly HashSet _registeredIds = new();
+ private static readonly Dictionary> _idMappings = new();
+ private static readonly Dictionary> _counter = new();
+ // ReSharper restore InconsistentNaming
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Makes the specified id unique based on the calling assembly by adding a counter if needed.
+ ///
+ /// The id to make unique.
+ /// The unique id.
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public static string MakeUnique(string id) => MakeUnique(Assembly.GetCallingAssembly(), id);
+
+ internal static string MakeUnique(Assembly callingAssembly, string id)
+ {
+ if (!_idMappings.TryGetValue(callingAssembly, out Dictionary? idMapping))
+ {
+ _idMappings.Add(callingAssembly, idMapping = new Dictionary());
+ _counter.Add(callingAssembly, new Dictionary());
+ }
+
+ Dictionary counterMapping = _counter[callingAssembly];
+
+ if (!idMapping.TryGetValue(id, out string? mappedId))
+ {
+ mappedId = id;
+ int mappingCounter = 1;
+ while (_registeredIds.Contains(mappedId))
+ mappedId = $"{id} ({++mappingCounter})";
+
+ _registeredIds.Add(mappedId);
+ idMapping.Add(id, mappedId);
+ }
+
+ if (!counterMapping.ContainsKey(mappedId))
+ counterMapping.Add(mappedId, 0);
+
+ int counter = ++counterMapping[mappedId];
+ return counter <= 1 ? mappedId : $"{mappedId} ({counter})";
+ }
+
+ ///
+ /// Resets the counter used to create unique ids.
+ /// All previous generated ids are not garantueed to stay unique if this is called!
+ ///
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public static void ResetCounter() => ResetCounter(Assembly.GetCallingAssembly());
+
+ internal static void ResetCounter(Assembly callingAssembly)
+ {
+ if (_counter.TryGetValue(callingAssembly, out Dictionary? counter))
+ counter.Clear();
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Leds/Led.cs b/RGB.NET.Core/Leds/Led.cs
index 67cea337..ad2e3f9f 100644
--- a/RGB.NET.Core/Leds/Led.cs
+++ b/RGB.NET.Core/Leds/Led.cs
@@ -1,310 +1,175 @@
// ReSharper disable MemberCanBePrivate.Global
-using System;
-using System.ComponentModel;
using System.Diagnostics;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents a single LED of a RGB-device.
+///
+[DebuggerDisplay("{Id} {Color}")]
+public class Led : Placeable
{
- ///
+ #region Properties & Fields
+
///
- /// Represents a single LED of a RGB-device.
+ /// Gets the this is associated with.
///
- [DebuggerDisplay("{Id} {Color}")]
- public class Led : AbstractBindable
- {
- #region Properties & Fields
-
- ///
- /// Gets the this is associated with.
- ///
- public IRGBDevice Device { get; }
-
- ///
- /// Gets the of the .
- ///
- public LedId Id { get; }
-
- private Shape _shape = Shape.Rectangle;
- ///
- /// Gets or sets the of the .
- ///
- public Shape Shape
- {
- get => _shape;
- set => SetProperty(ref _shape, value);
- }
-
- private string _shapeData;
- ///
- /// Gets or sets the data used for by the -.
- ///
- public string ShapeData
- {
- get => _shapeData;
- set => SetProperty(ref _shapeData, value);
- }
-
- private Point _location;
- ///
- /// Gets or sets the relative location of the .
- ///
- public Point Location
- {
- get => _location;
- set
- {
- if (SetProperty(ref _location, value))
- {
- UpdateActualData();
- UpdateAbsoluteData();
- }
- }
- }
+ public IRGBDevice Device { get; }
- private Size _size;
- ///
- /// Gets or sets the size of the .
- ///
- public Size Size
- {
- get => _size;
- set
- {
- if (SetProperty(ref _size, value))
- {
- UpdateActualData();
- UpdateAbsoluteData();
- }
- }
- }
-
- private Point _actualLocation;
- ///
- /// Gets the actual location of the .
- /// This includes device-scaling and rotation.
- ///
- public Point ActualLocation
- {
- get => _actualLocation;
- private set => SetProperty(ref _actualLocation, value);
- }
-
- private Size _actualSize;
- ///
- /// Gets the actual size of the .
- /// This includes device-scaling.
- ///
- public Size ActualSize
- {
- get => _actualSize;
- private set => SetProperty(ref _actualSize, value);
- }
-
- private Rectangle _ledRectangle;
- ///
- /// Gets a rectangle representing the logical location of the relative to the .
- ///
- public Rectangle LedRectangle
- {
- get => _ledRectangle;
- private set => SetProperty(ref _ledRectangle, value);
- }
-
- private Rectangle _absoluteLedRectangle;
- ///
- /// Gets a rectangle representing the logical location of the on the .
- ///
- public Rectangle AbsoluteLedRectangle
- {
- get => _absoluteLedRectangle;
- private set => SetProperty(ref _absoluteLedRectangle, value);
- }
-
- ///
- /// Indicates whether the is about to change it's color.
- ///
- public bool IsDirty => RequestedColor.HasValue && (RequestedColor != InternalColor);
+ ///
+ /// Gets the of the .
+ ///
+ public LedId Id { get; }
- private Color? _requestedColor;
- ///
- /// Gets a copy of the the LED should be set to on the next update.
- /// Null if there is no update-request for the next update.
- ///
- public Color? RequestedColor
- {
- get => _requestedColor;
- private set
- {
- SetProperty(ref _requestedColor, value);
+ private Shape _shape = Shape.Rectangle;
+ ///
+ /// Gets or sets the of the .
+ ///
+ public Shape Shape
+ {
+ get => _shape;
+ set => SetProperty(ref _shape, value);
+ }
- // ReSharper disable once ExplicitCallerInfoArgument
- OnPropertyChanged(nameof(IsDirty));
- }
- }
+ private string? _shapeData;
+ ///
+ /// Gets or sets the data used for by the -.
+ ///
+ public string? ShapeData
+ {
+ get => _shapeData;
+ set => SetProperty(ref _shapeData, value);
+ }
- private Color _color = Color.Transparent;
- ///
- /// Gets the current of the . Sets the for the next update.
- ///
- public Color Color
- {
- get => _color;
- set
- {
- if (!IsLocked)
- {
- if (RequestedColor.HasValue)
- RequestedColor += value;
- else
- RequestedColor = value;
- }
+ private Rectangle _absoluteBoundary;
+ ///
+ /// Gets a rectangle representing the logical location of the on the .
+ ///
+ public Rectangle AbsoluteBoundary
+ {
+ get => _absoluteBoundary;
+ private set => SetProperty(ref _absoluteBoundary, value);
+ }
- }
- }
+ ///
+ /// Indicates whether the is about to change it's color.
+ ///
+ public bool IsDirty => RequestedColor.HasValue && (RequestedColor != Color);
- ///
- /// Gets or set the ignoring all workflows regarding locks and update-requests. />
- ///
- internal Color InternalColor
+ private Color? _requestedColor;
+ ///
+ /// Gets a copy of the the LED should be set to on the next update.
+ /// Null if there is no update-request for the next update.
+ ///
+ public Color? RequestedColor
+ {
+ get => _requestedColor;
+ private set
{
- get => _color;
- set => SetProperty(ref _color, value);
- }
+ SetProperty(ref _requestedColor, value);
- private bool _isLocked;
- ///
- /// Gets or sets if the color of this LED can be changed.
- ///
- public bool IsLocked
- {
- get => _isLocked;
- set => SetProperty(ref _isLocked, value);
+ // ReSharper disable once ExplicitCallerInfoArgument
+ OnPropertyChanged(nameof(IsDirty));
}
+ }
- ///
- /// Gets the URI of an image of the or null if there is no image.
- ///
- public Uri Image { get; set; }
-
- ///
- /// Gets the provider-specific data associated with this led.
- ///
- public object CustomData { get; }
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The the is associated with.
- /// The of the .
- /// The physical location of the relative to the .
- /// The size of the .
- /// The provider-specific data associated with this led.
- internal Led(IRGBDevice device, LedId id, Point location, Size size, object customData = null)
+ private Color _color = Color.Transparent;
+ ///
+ /// Gets the current of the . Sets the for the next update.
+ ///
+ public Color Color
+ {
+ get => _color;
+ set
{
- this.Device = device;
- this.Id = id;
- this.Location = location;
- this.Size = size;
- this.CustomData = customData;
-
- device.PropertyChanged += DevicePropertyChanged;
+ if (RequestedColor.HasValue)
+ RequestedColor = RequestedColor.Value + value;
+ else
+ RequestedColor = _color + value;
}
+ }
- #endregion
-
- #region Methods
-
- private void DevicePropertyChanged(object sender, PropertyChangedEventArgs e)
- {
- if ((e.PropertyName == nameof(IRGBDevice.Location)))
- UpdateAbsoluteData();
- else if (e.PropertyName == nameof(IRGBDevice.DeviceRectangle))
- {
- UpdateActualData();
- UpdateAbsoluteData();
- }
- }
+ ///
+ /// Gets the provider-specific data associated with this led.
+ ///
+ public object? CustomData { get; }
- private void UpdateActualData()
- {
- ActualSize = Size * Device.Scale;
+ ///
+ /// Gets or sets some custom metadata of this led.
+ ///
+ public object? LayoutMetadata { get; set; }
- Point actualLocation = (Location * Device.Scale);
- Rectangle ledRectangle = new Rectangle(Location * Device.Scale, Size * Device.Scale);
+ #endregion
- if (Device.Rotation.IsRotated)
- {
- Point deviceCenter = new Rectangle(Device.ActualSize).Center;
- Point actualDeviceCenter = new Rectangle(Device.DeviceRectangle.Size).Center;
- Point centerOffset = new Point(actualDeviceCenter.X - deviceCenter.X, actualDeviceCenter.Y - deviceCenter.Y);
+ #region Constructors
- actualLocation = actualLocation.Rotate(Device.Rotation, new Rectangle(Device.ActualSize).Center) + centerOffset;
- ledRectangle = new Rectangle(ledRectangle.Rotate(Device.Rotation, new Rectangle(Device.ActualSize).Center)).Translate(centerOffset);
- }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The the is associated with.
+ /// The of the .
+ /// The physical location of the relative to the .
+ /// The size of the .
+ /// The provider-specific data associated with this led.
+ internal Led(IRGBDevice device, LedId id, Point location, Size size, object? customData = null)
+ : base(device)
+ {
+ this.Device = device;
+ this.Id = id;
+ this.Location = location;
+ this.Size = size;
+ this.CustomData = customData;
+ }
- ActualLocation = actualLocation;
- LedRectangle = ledRectangle;
- }
+ #endregion
- private void UpdateAbsoluteData()
- {
- AbsoluteLedRectangle = LedRectangle.Translate(Device.Location);
- }
+ #region Methods
- ///
- /// Converts the and the of this to a human-readable string.
- ///
- /// A string that contains the and the of this . For example "Enter [A: 255, R: 255, G: 0, B: 0]".
- public override string ToString() => $"{Id} {Color}";
+ ///
+ protected override void UpdateActualPlaceableData()
+ {
+ base.UpdateActualPlaceableData();
- ///
- /// Updates the to the requested .
- ///
- internal void Update()
- {
- if (!RequestedColor.HasValue) return;
+ AbsoluteBoundary = Boundary.Translate(Device.Location);
+ }
- _color = RequestedColor.Value;
- RequestedColor = null;
+ ///
+ /// Converts the and the of this to a human-readable string.
+ ///
+ /// A string that contains the and the of this . For example "Enter [A: 255, R: 255, G: 0, B: 0]".
+ public override string ToString() => $"{Id} {Color}";
- // ReSharper disable once ExplicitCallerInfoArgument
- OnPropertyChanged(nameof(Color));
- }
+ ///
+ /// Updates the to the requested .
+ ///
+ internal void Update()
+ {
+ if (!RequestedColor.HasValue) return;
- ///
- /// Resets the back to default.
- ///
- internal void Reset()
- {
- _color = Color.Transparent;
- RequestedColor = null;
- IsLocked = false;
+ _color = RequestedColor.Value;
+ RequestedColor = null;
- // ReSharper disable once ExplicitCallerInfoArgument
- OnPropertyChanged(nameof(Color));
- }
+ // ReSharper disable once ExplicitCallerInfoArgument
+ OnPropertyChanged(nameof(Color));
+ }
- #endregion
+ #endregion
- #region Operators
+ #region Operators
- ///
- /// Converts a to a .
- ///
- /// The to convert.
- public static implicit operator Color(Led led) => led?.Color ?? Color.Transparent;
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
+ public static implicit operator Color(Led led) => led.Color;
- ///
- /// Converts a to a .
- ///
- /// The to convert.
- public static implicit operator Rectangle(Led led) => led?.LedRectangle ?? new Rectangle();
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
+ public static implicit operator Rectangle(Led led) => led.Boundary;
- #endregion
- }
-}
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Leds/LedId.cs b/RGB.NET.Core/Leds/LedId.cs
index 536263e3..dff98a5d 100644
--- a/RGB.NET.Core/Leds/LedId.cs
+++ b/RGB.NET.Core/Leds/LedId.cs
@@ -3,1363 +3,8338 @@
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+public enum LedId
{
- public enum LedId
- {
- Invalid = -1,
+ Invalid = -1,
+
+ Logo = 0,
- Logo = 0,
+ /*### Keyboard ###*/
+ Keyboard_Escape = 0x00000001,
+ Keyboard_F1 = 0x00000002,
+ Keyboard_F2 = 0x00000003,
+ Keyboard_F3 = 0x00000004,
+ Keyboard_F4 = 0x00000005,
+ Keyboard_F5 = 0x00000006,
+ Keyboard_F6 = 0x00000007,
+ Keyboard_F7 = 0x00000008,
+ Keyboard_F8 = 0x00000009,
+ Keyboard_F9 = 0x0000000A,
+ Keyboard_F10 = 0x0000000B,
+ Keyboard_F11 = 0x0000000C,
+ Keyboard_F12 = 0x0000000D,
+ Keyboard_GraveAccentAndTilde = 0x0000000E,
+ Keyboard_1 = 0x0000000F,
+ Keyboard_2 = 0x00000011,
+ Keyboard_3 = 0x00000012,
+ Keyboard_4 = 0x00000013,
+ Keyboard_5 = 0x00000014,
+ Keyboard_6 = 0x00000015,
+ Keyboard_7 = 0x00000016,
+ Keyboard_8 = 0x00000017,
+ Keyboard_9 = 0x00000018,
+ Keyboard_0 = 0x00000019,
+ Keyboard_MinusAndUnderscore = 0x0000001A,
+ Keyboard_EqualsAndPlus = 0x0000001B,
+ Keyboard_Backspace = 0x0000001C,
+ Keyboard_Tab = 0x0000001D,
+ Keyboard_Q = 0x0000001E,
+ Keyboard_W = 0x0000001F,
+ Keyboard_E = 0x00000020,
+ Keyboard_R = 0x00000021,
+ Keyboard_T = 0x00000022,
+ Keyboard_Y = 0x00000023,
+ Keyboard_U = 0x00000024,
+ Keyboard_I = 0x00000025,
+ Keyboard_O = 0x00000026,
+ Keyboard_P = 0x00000027,
+ Keyboard_BracketLeft = 0x000000028,
+ Keyboard_BracketRight = 0x000000029,
+ Keyboard_Backslash = 0x00000002A,
+ Keyboard_Enter = 0x0000002B,
+ Keyboard_CapsLock = 0x0000002C,
+ Keyboard_A = 0x0000002D,
+ Keyboard_S = 0x0000002E,
+ Keyboard_D = 0x0000002F,
+ Keyboard_F = 0x00000030,
+ Keyboard_G = 0x00000031,
+ Keyboard_H = 0x00000032,
+ Keyboard_J = 0x00000033,
+ Keyboard_K = 0x00000034,
+ Keyboard_L = 0x00000035,
+ Keyboard_SemicolonAndColon = 0x00000036,
+ Keyboard_ApostropheAndDoubleQuote = 0x00000037,
+ Keyboard_NonUsTilde = 0x00000038,
+ Keyboard_LeftShift = 0x00000039,
+ Keyboard_NonUsBackslash = 0x0000003A,
+ Keyboard_Z = 0x0000003B,
+ Keyboard_X = 0x0000003C,
+ Keyboard_C = 0x0000003D,
+ Keyboard_V = 0x0000003E,
+ Keyboard_B = 0x0000003F,
+ Keyboard_N = 0x00000040,
+ Keyboard_M = 0x00000041,
+ Keyboard_CommaAndLessThan = 0x00000042,
+ Keyboard_PeriodAndBiggerThan = 0x00000043,
+ Keyboard_SlashAndQuestionMark = 0x00000044,
+ Keyboard_RightShift = 0x00000045,
+ Keyboard_LeftCtrl = 0x00000046,
+ Keyboard_LeftGui = 0x00000047,
+ Keyboard_LeftAlt = 0x00000048,
+ Keyboard_Lang2 = 0x00000049,
+ Keyboard_Space = 0x0000004A,
+ Keyboard_Lang1 = 0x0000004B,
+ Keyboard_RightAlt = 0x0000004C,
+ Keyboard_RightGui = 0x0000004D,
+ Keyboard_Application = 0x0000004E,
+ Keyboard_RightCtrl = 0x0000004F,
+ Keyboard_International1 = 0x00000050,
+ Keyboard_International2 = 0x00000051,
+ Keyboard_International3 = 0x00000052,
+ Keyboard_International5 = 0x00000053,
+ Keyboard_International4 = 0x00000054,
+ Keyboard_Function = 0x00000055,
- /*### Keyboard ###*/
- Keyboard_Escape = 0x00000001,
- Keyboard_F1 = 0x00000002,
- Keyboard_F2 = 0x00000003,
- Keyboard_F3 = 0x00000004,
- Keyboard_F4 = 0x00000005,
- Keyboard_F5 = 0x00000006,
- Keyboard_F6 = 0x00000007,
- Keyboard_F7 = 0x00000008,
- Keyboard_F8 = 0x00000009,
- Keyboard_F9 = 0x0000000A,
- Keyboard_F10 = 0x0000000B,
- Keyboard_F11 = 0x0000000C,
- Keyboard_F12 = 0x0000000D,
- Keyboard_GraveAccentAndTilde = 0x0000000E,
- Keyboard_1 = 0x0000000F,
- Keyboard_2 = 0x00000011,
- Keyboard_3 = 0x00000012,
- Keyboard_4 = 0x00000013,
- Keyboard_5 = 0x00000014,
- Keyboard_6 = 0x00000015,
- Keyboard_7 = 0x00000016,
- Keyboard_8 = 0x00000017,
- Keyboard_9 = 0x00000018,
- Keyboard_0 = 0x00000019,
- Keyboard_MinusAndUnderscore = 0x0000001A,
- Keyboard_EqualsAndPlus = 0x0000001B,
- Keyboard_Backspace = 0x0000001C,
- Keyboard_Tab = 0x0000001D,
- Keyboard_Q = 0x0000001E,
- Keyboard_W = 0x0000001F,
- Keyboard_E = 0x00000020,
- Keyboard_R = 0x00000021,
- Keyboard_T = 0x00000022,
- Keyboard_Y = 0x00000023,
- Keyboard_U = 0x00000024,
- Keyboard_I = 0x00000025,
- Keyboard_O = 0x00000026,
- Keyboard_P = 0x00000027,
- Keyboard_BracketLeft = 0x000000028,
- Keyboard_BracketRight = 0x000000029,
- Keyboard_Backslash = 0x00000002A,
- Keyboard_Enter = 0x0000002B,
- Keyboard_CapsLock = 0x0000002C,
- Keyboard_A = 0x0000002D,
- Keyboard_S = 0x0000002E,
- Keyboard_D = 0x0000002F,
- Keyboard_F = 0x00000030,
- Keyboard_G = 0x00000031,
- Keyboard_H = 0x00000032,
- Keyboard_J = 0x00000033,
- Keyboard_K = 0x00000034,
- Keyboard_L = 0x00000035,
- Keyboard_SemicolonAndColon = 0x00000036,
- Keyboard_ApostropheAndDoubleQuote = 0x00000037,
- Keyboard_NonUsTilde = 0x00000038,
- Keyboard_LeftShift = 0x00000039,
- Keyboard_NonUsBackslash = 0x0000003A,
- Keyboard_Z = 0x0000003B,
- Keyboard_X = 0x0000003C,
- Keyboard_C = 0x0000003D,
- Keyboard_V = 0x0000003E,
- Keyboard_B = 0x0000003F,
- Keyboard_N = 0x00000040,
- Keyboard_M = 0x00000041,
- Keyboard_CommaAndLessThan = 0x00000042,
- Keyboard_PeriodAndBiggerThan = 0x00000043,
- Keyboard_SlashAndQuestionMark = 0x00000044,
- Keyboard_RightShift = 0x00000045,
- Keyboard_LeftCtrl = 0x00000046,
- Keyboard_LeftGui = 0x00000047,
- Keyboard_LeftAlt = 0x00000048,
- Keyboard_Lang2 = 0x00000049,
- Keyboard_Space = 0x0000004A,
- Keyboard_Lang1 = 0x0000004B,
- Keyboard_RightAlt = 0x0000004C,
- Keyboard_RightGui = 0x0000004D,
- Keyboard_Application = 0x0000004E,
- Keyboard_RightCtrl = 0x0000004F,
- Keyboard_International1 = 0x00000050,
- Keyboard_International2 = 0x00000051,
- Keyboard_International3 = 0x00000052,
- Keyboard_International5 = 0x00000053,
- Keyboard_International4 = 0x00000054,
+ Keyboard_PrintScreen = 0x00001001,
+ Keyboard_ScrollLock = 0x000001002,
+ Keyboard_PauseBreak = 0x000001003,
+ Keyboard_Insert = 0x00001004,
+ Keyboard_Home = 0x00001005,
+ Keyboard_PageUp = 0x00001006,
+ Keyboard_Delete = 0x00001007,
+ Keyboard_End = 0x00001008,
+ Keyboard_PageDown = 0x00001009,
+ Keyboard_ArrowUp = 0x0000100A,
+ Keyboard_ArrowLeft = 0x0000100B,
+ Keyboard_ArrowDown = 0x0000100C,
+ Keyboard_ArrowRight = 0x0000100D,
- Keyboard_PrintScreen = 0x00001001,
- Keyboard_ScrollLock = 0x000001002,
- Keyboard_PauseBreak = 0x000001003,
- Keyboard_Insert = 0x00001004,
- Keyboard_Home = 0x00001005,
- Keyboard_PageUp = 0x00001006,
- Keyboard_Delete = 0x00001007,
- Keyboard_End = 0x00001008,
- Keyboard_PageDown = 0x00001009,
- Keyboard_ArrowUp = 0x0000100A,
- Keyboard_ArrowLeft = 0x0000100B,
- Keyboard_ArrowDown = 0x0000100C,
- Keyboard_ArrowRight = 0x0000100D,
+ Keyboard_NumLock = 0x00002001,
+ Keyboard_NumSlash = 0x00002002,
+ Keyboard_NumAsterisk = 0x00002003,
+ Keyboard_NumMinus = 0x00002004,
+ Keyboard_Num7 = 0x00002005,
+ Keyboard_Num8 = 0x00002006,
+ Keyboard_Num9 = 0x00002007,
+ Keyboard_NumComma = 0x00002008,
+ Keyboard_NumPlus = 0x00002009,
+ Keyboard_Num4 = 0x0000200A,
+ Keyboard_Num5 = 0x0000200B,
+ Keyboard_Num6 = 0x0000200C,
+ Keyboard_Num1 = 0x0000200D,
+ Keyboard_Num2 = 0x0000200E,
+ Keyboard_Num3 = 0x0000200F,
+ Keyboard_NumEnter = 0x00002010,
+ Keyboard_Num0 = 0x00002011,
+ Keyboard_Num00 = 0x00002012,
+ Keyboard_NumPeriodAndDelete = 0x00002013,
- Keyboard_NumLock = 0x00002001,
- Keyboard_NumSlash = 0x00002002,
- Keyboard_NumAsterisk = 0x00002003,
- Keyboard_NumMinus = 0x00002004,
- Keyboard_Num7 = 0x00002005,
- Keyboard_Num8 = 0x00002006,
- Keyboard_Num9 = 0x00002007,
- Keyboard_NumComma = 0x00002008,
- Keyboard_NumPlus = 0x00002009,
- Keyboard_Num4 = 0x0000200A,
- Keyboard_Num5 = 0x0000200B,
- Keyboard_Num6 = 0x0000200C,
- Keyboard_Num1 = 0x0000200D,
- Keyboard_Num2 = 0x0000200E,
- Keyboard_Num3 = 0x0000200F,
- Keyboard_NumEnter = 0x00002010,
- Keyboard_Num0 = 0x00002011,
- Keyboard_Num00 = 0x00002012,
- Keyboard_NumPeriodAndDelete = 0x00002013,
+ Keyboard_MediaMute = 0x00003001,
+ Keyboard_MediaVolumeDown = 0x00003002,
+ Keyboard_MediaVolumeUp = 0x00003003,
+ Keyboard_MediaStop = 0x00003004,
+ Keyboard_MediaPreviousTrack = 0x00003005,
+ Keyboard_MediaPlay = 0x00003006,
+ Keyboard_MediaNextTrack = 0x00003007,
- Keyboard_MediaMute = 0x00003001,
- Keyboard_MediaVolumeDown = 0x00003002,
- Keyboard_MediaVolumeUp = 0x00003003,
- Keyboard_MediaStop = 0x00003004,
- Keyboard_MediaPreviousTrack = 0x00003005,
- Keyboard_MediaPlay = 0x00003006,
- Keyboard_MediaNextTrack = 0x00003007,
+ Keyboard_WinLock = 0x00004001,
+ Keyboard_Brightness = 0x00004002,
+ Keyboard_LedProgramming = 0x00004003,
+ Keyboard_Profile = 0x00004004,
- Keyboard_WinLock = 0x00004001,
- Keyboard_Brightness = 0x00004002,
+ Keyboard_MacroRecording = 0x00005001,
+ Keyboard_Macro1 = 0x00005002,
+ Keyboard_Macro2 = 0x00005003,
+ Keyboard_Macro3 = 0x00005004,
+ Keyboard_Macro4 = 0x00005005,
+ Keyboard_Macro5 = 0x00005006,
+ Keyboard_Macro6 = 0x00005007,
+ Keyboard_Macro7 = 0x00005008,
+ Keyboard_Macro8 = 0x00005009,
+ Keyboard_Macro9 = 0x0000500A,
+ Keyboard_Macro10 = 0x0000500B,
+ Keyboard_Macro11 = 0x0000500C,
+ Keyboard_Macro12 = 0x0000500D,
+ Keyboard_Macro13 = 0x0000500E,
+ Keyboard_Macro14 = 0x0000500F,
+ Keyboard_Macro15 = 0x00005010,
+ Keyboard_Macro16 = 0x00005011,
+ Keyboard_Macro17 = 0x00005012,
+ Keyboard_Macro18 = 0x00005013,
+ Keyboard_Macro19 = 0x00005014,
+ Keyboard_Macro20 = 0x00005015,
+ Keyboard_Macro21 = 0x00005016,
+ Keyboard_Macro22 = 0x00005017,
+ Keyboard_Macro23 = 0x00005018,
+ Keyboard_Macro24 = 0x00005019,
+ Keyboard_Macro25 = 0x0000501A,
+ Keyboard_Macro26 = 0x0000501B,
+ Keyboard_Macro27 = 0x0000501C,
+ Keyboard_Macro28 = 0x0000501D,
+ Keyboard_Macro29 = 0x0000501E,
+ Keyboard_Macro30 = 0x0000501F,
+ Keyboard_Macro31 = 0x00005020,
+ Keyboard_Macro32 = 0x00005021,
- Keyboard_MacroRecording = 0x00005001,
- Keyboard_Macro1 = 0x00005002,
- Keyboard_Macro2 = 0x00005003,
- Keyboard_Macro3 = 0x00005004,
- Keyboard_Macro4 = 0x00005005,
- Keyboard_Macro5 = 0x00005006,
+ Keyboard_Programmable1 = 0x00006001,
+ Keyboard_Programmable2 = 0x00006002,
+ Keyboard_Programmable3 = 0x00006003,
+ Keyboard_Programmable4 = 0x00006004,
+ Keyboard_Programmable5 = 0x00006005,
+ Keyboard_Programmable6 = 0x00006006,
+ Keyboard_Programmable7 = 0x00006007,
+ Keyboard_Programmable8 = 0x00006008,
+ Keyboard_Programmable9 = 0x00006009,
+ Keyboard_Programmable10 = 0x0000600A,
+ Keyboard_Programmable11 = 0x0000600B,
+ Keyboard_Programmable12 = 0x0000600C,
+ Keyboard_Programmable13 = 0x0000600D,
+ Keyboard_Programmable14 = 0x0000600E,
+ Keyboard_Programmable15 = 0x0000600F,
+ Keyboard_Programmable16 = 0x00006010,
+ Keyboard_Programmable17 = 0x00006011,
+ Keyboard_Programmable18 = 0x00006012,
+ Keyboard_Programmable19 = 0x00006013,
+ Keyboard_Programmable20 = 0x00006014,
+ Keyboard_Programmable21 = 0x00006015,
+ Keyboard_Programmable22 = 0x00006016,
+ Keyboard_Programmable23 = 0x00006017,
+ Keyboard_Programmable24 = 0x00006018,
+ Keyboard_Programmable25 = 0x00006019,
+ Keyboard_Programmable26 = 0x0000601A,
+ Keyboard_Programmable27 = 0x0000601B,
+ Keyboard_Programmable28 = 0x0000601C,
+ Keyboard_Programmable29 = 0x0000601D,
+ Keyboard_Programmable30 = 0x0000601E,
+ Keyboard_Programmable31 = 0x0000601F,
+ Keyboard_Programmable32 = 0x00006020,
+ Keyboard_Programmable33 = 0x00006021,
+ Keyboard_Programmable34 = 0x00006022,
+ Keyboard_Programmable35 = 0x00006023,
+ Keyboard_Programmable36 = 0x00006024,
+ Keyboard_Programmable37 = 0x00006025,
+ Keyboard_Programmable38 = 0x00006026,
+ Keyboard_Programmable39 = 0x00006027,
+ Keyboard_Programmable40 = 0x00006028,
+ Keyboard_Programmable41 = 0x00006029,
+ Keyboard_Programmable42 = 0x0000602A,
+ Keyboard_Programmable43 = 0x0000602B,
+ Keyboard_Programmable44 = 0x0000602C,
+ Keyboard_Programmable45 = 0x0000602D,
+ Keyboard_Programmable46 = 0x0000602E,
+ Keyboard_Programmable47 = 0x0000602F,
+ Keyboard_Programmable48 = 0x00006030,
+ Keyboard_Programmable49 = 0x00006031,
+ Keyboard_Programmable50 = 0x00006032,
+ Keyboard_Programmable51 = 0x00006033,
+ Keyboard_Programmable52 = 0x00006034,
+ Keyboard_Programmable53 = 0x00006035,
+ Keyboard_Programmable54 = 0x00006036,
+ Keyboard_Programmable55 = 0x00006037,
+ Keyboard_Programmable56 = 0x00006038,
+ Keyboard_Programmable57 = 0x00006039,
+ Keyboard_Programmable58 = 0x0000603A,
+ Keyboard_Programmable59 = 0x0000603B,
+ Keyboard_Programmable60 = 0x0000603C,
+ Keyboard_Programmable61 = 0x0000603D,
+ Keyboard_Programmable62 = 0x0000603E,
+ Keyboard_Programmable63 = 0x0000603F,
+ Keyboard_Programmable64 = 0x00006040,
- Keyboard_Programmable1 = 0x00006001,
- Keyboard_Programmable2 = 0x00006002,
- Keyboard_Programmable3 = 0x00006003,
- Keyboard_Programmable4 = 0x00006004,
- Keyboard_Programmable5 = 0x00006005,
- Keyboard_Programmable6 = 0x00006006,
- Keyboard_Programmable7 = 0x00006007,
- Keyboard_Programmable8 = 0x00006008,
- Keyboard_Programmable9 = 0x00006009,
- Keyboard_Programmable10 = 0x0000600A,
- Keyboard_Programmable11 = 0x0000600B,
- Keyboard_Programmable12 = 0x0000600C,
- Keyboard_Programmable13 = 0x0000600D,
- Keyboard_Programmable14 = 0x0000600E,
- Keyboard_Programmable15 = 0x0000600F,
- Keyboard_Programmable16 = 0x00006010,
- Keyboard_Programmable17 = 0x00006011,
- Keyboard_Programmable18 = 0x00006012,
- Keyboard_Programmable19 = 0x00006013,
- Keyboard_Programmable20 = 0x00006014,
- Keyboard_Programmable21 = 0x00006015,
- Keyboard_Programmable22 = 0x00006016,
- Keyboard_Programmable23 = 0x00006017,
- Keyboard_Programmable24 = 0x00006018,
- Keyboard_Programmable25 = 0x00006019,
- Keyboard_Programmable26 = 0x0000601A,
- Keyboard_Programmable27 = 0x0000601B,
- Keyboard_Programmable28 = 0x0000601C,
- Keyboard_Programmable29 = 0x0000601D,
- Keyboard_Programmable30 = 0x0000601E,
- Keyboard_Programmable31 = 0x0000601F,
- Keyboard_Programmable32 = 0x00006020,
+ Keyboard_Custom1 = 0x00007001,
+ Keyboard_Custom2 = 0x00007002,
+ Keyboard_Custom3 = 0x00007003,
+ Keyboard_Custom4 = 0x00007004,
+ Keyboard_Custom5 = 0x00007005,
+ Keyboard_Custom6 = 0x00007006,
+ Keyboard_Custom7 = 0x00007007,
+ Keyboard_Custom8 = 0x00007008,
+ Keyboard_Custom9 = 0x00007009,
+ Keyboard_Custom10 = 0x0000700A,
+ Keyboard_Custom11 = 0x0000700B,
+ Keyboard_Custom12 = 0x0000700C,
+ Keyboard_Custom13 = 0x0000700D,
+ Keyboard_Custom14 = 0x0000700E,
+ Keyboard_Custom15 = 0x0000700F,
+ Keyboard_Custom16 = 0x00007010,
+ Keyboard_Custom17 = 0x00007011,
+ Keyboard_Custom18 = 0x00007012,
+ Keyboard_Custom19 = 0x00007013,
+ Keyboard_Custom20 = 0x00007014,
+ Keyboard_Custom21 = 0x00007015,
+ Keyboard_Custom22 = 0x00007016,
+ Keyboard_Custom23 = 0x00007017,
+ Keyboard_Custom24 = 0x00007018,
+ Keyboard_Custom25 = 0x00007019,
+ Keyboard_Custom26 = 0x0000701A,
+ Keyboard_Custom27 = 0x0000701B,
+ Keyboard_Custom28 = 0x0000701C,
+ Keyboard_Custom29 = 0x0000701D,
+ Keyboard_Custom30 = 0x0000701E,
+ Keyboard_Custom31 = 0x0000701F,
+ Keyboard_Custom32 = 0x00007020,
+ Keyboard_Custom33 = 0x00007021,
+ Keyboard_Custom34 = 0x00007022,
+ Keyboard_Custom35 = 0x00007023,
+ Keyboard_Custom36 = 0x00007024,
+ Keyboard_Custom37 = 0x00007025,
+ Keyboard_Custom38 = 0x00007026,
+ Keyboard_Custom39 = 0x00007027,
+ Keyboard_Custom40 = 0x00007028,
+ Keyboard_Custom41 = 0x00007029,
+ Keyboard_Custom42 = 0x0000702A,
+ Keyboard_Custom43 = 0x0000702B,
+ Keyboard_Custom44 = 0x0000702C,
+ Keyboard_Custom45 = 0x0000702D,
+ Keyboard_Custom46 = 0x0000702E,
+ Keyboard_Custom47 = 0x0000702F,
+ Keyboard_Custom48 = 0x00007030,
+ Keyboard_Custom49 = 0x00007031,
+ Keyboard_Custom50 = 0x00007032,
+ Keyboard_Custom51 = 0x00007033,
+ Keyboard_Custom52 = 0x00007034,
+ Keyboard_Custom53 = 0x00007035,
+ Keyboard_Custom54 = 0x00007036,
+ Keyboard_Custom55 = 0x00007037,
+ Keyboard_Custom56 = 0x00007038,
+ Keyboard_Custom57 = 0x00007039,
+ Keyboard_Custom58 = 0x0000703A,
+ Keyboard_Custom59 = 0x0000703B,
+ Keyboard_Custom60 = 0x0000703C,
+ Keyboard_Custom61 = 0x0000703D,
+ Keyboard_Custom62 = 0x0000703E,
+ Keyboard_Custom63 = 0x0000703F,
+ Keyboard_Custom64 = 0x00007040,
+ Keyboard_Custom65 = 0x00007041,
+ Keyboard_Custom66 = 0x00007042,
+ Keyboard_Custom67 = 0x00007043,
+ Keyboard_Custom68 = 0x00007044,
+ Keyboard_Custom69 = 0x00007045,
+ Keyboard_Custom70 = 0x00007046,
+ Keyboard_Custom71 = 0x00007047,
+ Keyboard_Custom72 = 0x00007048,
+ Keyboard_Custom73 = 0x00007049,
+ Keyboard_Custom74 = 0x0000704A,
+ Keyboard_Custom75 = 0x0000704B,
+ Keyboard_Custom76 = 0x0000704C,
+ Keyboard_Custom77 = 0x0000704D,
+ Keyboard_Custom78 = 0x0000704E,
+ Keyboard_Custom79 = 0x0000704F,
+ Keyboard_Custom80 = 0x00007050,
+ Keyboard_Custom81 = 0x00007051,
+ Keyboard_Custom82 = 0x00007052,
+ Keyboard_Custom83 = 0x00007053,
+ Keyboard_Custom84 = 0x00007054,
+ Keyboard_Custom85 = 0x00007055,
+ Keyboard_Custom86 = 0x00007056,
+ Keyboard_Custom87 = 0x00007057,
+ Keyboard_Custom88 = 0x00007058,
+ Keyboard_Custom89 = 0x00007059,
+ Keyboard_Custom90 = 0x0000705A,
+ Keyboard_Custom91 = 0x0000705B,
+ Keyboard_Custom92 = 0x0000705C,
+ Keyboard_Custom93 = 0x0000705D,
+ Keyboard_Custom94 = 0x0000705E,
+ Keyboard_Custom95 = 0x0000705F,
+ Keyboard_Custom96 = 0x00007060,
+ Keyboard_Custom97 = 0x00007061,
+ Keyboard_Custom98 = 0x00007062,
+ Keyboard_Custom99 = 0x00007063,
+ Keyboard_Custom100 = 0x00007064,
+ Keyboard_Custom101 = 0x00007065,
+ Keyboard_Custom102 = 0x00007066,
+ Keyboard_Custom103 = 0x00007067,
+ Keyboard_Custom104 = 0x00007068,
+ Keyboard_Custom105 = 0x00007069,
+ Keyboard_Custom106 = 0x0000706A,
+ Keyboard_Custom107 = 0x0000706B,
+ Keyboard_Custom108 = 0x0000706C,
+ Keyboard_Custom109 = 0x0000706D,
+ Keyboard_Custom110 = 0x0000706E,
+ Keyboard_Custom111 = 0x0000706F,
+ Keyboard_Custom112 = 0x00007070,
+ Keyboard_Custom113 = 0x00007071,
+ Keyboard_Custom114 = 0x00007072,
+ Keyboard_Custom115 = 0x00007073,
+ Keyboard_Custom116 = 0x00007074,
+ Keyboard_Custom117 = 0x00007075,
+ Keyboard_Custom118 = 0x00007076,
+ Keyboard_Custom119 = 0x00007077,
+ Keyboard_Custom120 = 0x00007078,
+ Keyboard_Custom121 = 0x00007079,
+ Keyboard_Custom122 = 0x0000707A,
+ Keyboard_Custom123 = 0x0000707B,
+ Keyboard_Custom124 = 0x0000707C,
+ Keyboard_Custom125 = 0x0000707D,
+ Keyboard_Custom126 = 0x0000707E,
+ Keyboard_Custom127 = 0x0000707F,
+ Keyboard_Custom128 = 0x00007080,
- Keyboard_Custom1 = 0x00007001,
- Keyboard_Custom2 = 0x00007002,
- Keyboard_Custom3 = 0x00007003,
- Keyboard_Custom4 = 0x00007004,
- Keyboard_Custom5 = 0x00007005,
- Keyboard_Custom6 = 0x00007006,
- Keyboard_Custom7 = 0x00007007,
- Keyboard_Custom8 = 0x00007008,
- Keyboard_Custom9 = 0x00007009,
- Keyboard_Custom10 = 0x0000700A,
- Keyboard_Custom11 = 0x0000700B,
- Keyboard_Custom12 = 0x0000700C,
- Keyboard_Custom13 = 0x0000700D,
- Keyboard_Custom14 = 0x0000700E,
- Keyboard_Custom15 = 0x0000700F,
- Keyboard_Custom16 = 0x00007010,
- Keyboard_Custom17 = 0x00007011,
- Keyboard_Custom18 = 0x00007012,
- Keyboard_Custom19 = 0x00007013,
- Keyboard_Custom20 = 0x00007014,
- Keyboard_Custom21 = 0x00007015,
- Keyboard_Custom22 = 0x00007016,
- Keyboard_Custom23 = 0x00007017,
- Keyboard_Custom24 = 0x00007018,
- Keyboard_Custom25 = 0x00007019,
- Keyboard_Custom26 = 0x0000701A,
- Keyboard_Custom27 = 0x0000701B,
- Keyboard_Custom28 = 0x0000701C,
- Keyboard_Custom29 = 0x0000701D,
- Keyboard_Custom30 = 0x0000701E,
- Keyboard_Custom31 = 0x0000701F,
- Keyboard_Custom32 = 0x00007020,
- Keyboard_Custom33 = 0x00007021,
- Keyboard_Custom34 = 0x00007022,
- Keyboard_Custom35 = 0x00007023,
- Keyboard_Custom36 = 0x00007024,
- Keyboard_Custom37 = 0x00007025,
- Keyboard_Custom38 = 0x00007026,
- Keyboard_Custom39 = 0x00007027,
- Keyboard_Custom40 = 0x00007028,
- Keyboard_Custom41 = 0x00007029,
- Keyboard_Custom42 = 0x0000702A,
- Keyboard_Custom43 = 0x0000702B,
- Keyboard_Custom44 = 0x0000702C,
- Keyboard_Custom45 = 0x0000702D,
- Keyboard_Custom46 = 0x0000702E,
- Keyboard_Custom47 = 0x0000702F,
- Keyboard_Custom48 = 0x00007030,
- Keyboard_Custom49 = 0x00007031,
- Keyboard_Custom50 = 0x00007032,
- Keyboard_Custom51 = 0x00007033,
- Keyboard_Custom52 = 0x00007034,
- Keyboard_Custom53 = 0x00007035,
- Keyboard_Custom54 = 0x00007036,
- Keyboard_Custom55 = 0x00007037,
- Keyboard_Custom56 = 0x00007038,
- Keyboard_Custom57 = 0x00007039,
- Keyboard_Custom58 = 0x0000703A,
- Keyboard_Custom59 = 0x0000703B,
- Keyboard_Custom60 = 0x0000703C,
- Keyboard_Custom61 = 0x0000703D,
- Keyboard_Custom62 = 0x0000703E,
- Keyboard_Custom63 = 0x0000703F,
- Keyboard_Custom64 = 0x00007040,
+ /*### Mouse ###*/
+ Mouse1 = 0x00100001,
+ Mouse2 = 0x00100002,
+ Mouse3 = 0x00100003,
+ Mouse4 = 0x00100004,
+ Mouse5 = 0x00100005,
+ Mouse6 = 0x00100006,
+ Mouse7 = 0x00100007,
+ Mouse8 = 0x00100008,
+ Mouse9 = 0x00100009,
+ Mouse10 = 0x0010000A,
+ Mouse11 = 0x0010000B,
+ Mouse12 = 0x0010000C,
+ Mouse13 = 0x0010000D,
+ Mouse14 = 0x0010000E,
+ Mouse15 = 0x0010000F,
+ Mouse16 = 0x00100010,
+ Mouse17 = 0x00100011,
+ Mouse18 = 0x00100012,
+ Mouse19 = 0x00100013,
+ Mouse20 = 0x00100014,
+ Mouse21 = 0x00100015,
+ Mouse22 = 0x00100016,
+ Mouse23 = 0x00100017,
+ Mouse24 = 0x00100018,
+ Mouse25 = 0x00100019,
+ Mouse26 = 0x0010001A,
+ Mouse27 = 0x0010001B,
+ Mouse28 = 0x0010001C,
+ Mouse29 = 0x0010001D,
+ Mouse30 = 0x0010001E,
+ Mouse31 = 0x0010001F,
+ Mouse32 = 0x00100020,
+ Mouse33 = 0x00100021,
+ Mouse34 = 0x00100022,
+ Mouse35 = 0x00100023,
+ Mouse36 = 0x00100024,
+ Mouse37 = 0x00100025,
+ Mouse38 = 0x00100026,
+ Mouse39 = 0x00100027,
+ Mouse40 = 0x00100028,
+ Mouse41 = 0x00100029,
+ Mouse42 = 0x0010002A,
+ Mouse43 = 0x0010002B,
+ Mouse44 = 0x0010002C,
+ Mouse45 = 0x0010002D,
+ Mouse46 = 0x0010002E,
+ Mouse47 = 0x0010002F,
+ Mouse48 = 0x00100030,
+ Mouse49 = 0x00100031,
+ Mouse50 = 0x00100032,
+ Mouse51 = 0x00100033,
+ Mouse52 = 0x00100034,
+ Mouse53 = 0x00100035,
+ Mouse54 = 0x00100036,
+ Mouse55 = 0x00100037,
+ Mouse56 = 0x00100038,
+ Mouse57 = 0x00100039,
+ Mouse58 = 0x0010003A,
+ Mouse59 = 0x0010003B,
+ Mouse60 = 0x0010003C,
+ Mouse61 = 0x0010003D,
+ Mouse62 = 0x0010003E,
+ Mouse63 = 0x0010003F,
+ Mouse64 = 0x00100040,
+ Mouse65 = 0x00100041,
+ Mouse66 = 0x00100042,
+ Mouse67 = 0x00100043,
+ Mouse68 = 0x00100044,
+ Mouse69 = 0x00100045,
+ Mouse70 = 0x00100046,
+ Mouse71 = 0x00100047,
+ Mouse72 = 0x00100048,
+ Mouse73 = 0x00100049,
+ Mouse74 = 0x0010004A,
+ Mouse75 = 0x0010004B,
+ Mouse76 = 0x0010004C,
+ Mouse77 = 0x0010004D,
+ Mouse78 = 0x0010004E,
+ Mouse79 = 0x0010004F,
+ Mouse80 = 0x00100050,
+ Mouse81 = 0x00100051,
+ Mouse82 = 0x00100052,
+ Mouse83 = 0x00100053,
+ Mouse84 = 0x00100054,
+ Mouse85 = 0x00100055,
+ Mouse86 = 0x00100056,
+ Mouse87 = 0x00100057,
+ Mouse88 = 0x00100058,
+ Mouse89 = 0x00100059,
+ Mouse90 = 0x0010005A,
+ Mouse91 = 0x0010005B,
+ Mouse92 = 0x0010005C,
+ Mouse93 = 0x0010005D,
+ Mouse94 = 0x0010005E,
+ Mouse95 = 0x0010005F,
+ Mouse96 = 0x00100060,
+ Mouse97 = 0x00100061,
+ Mouse98 = 0x00100062,
+ Mouse99 = 0x00100063,
+ Mouse100 = 0x00100064,
+ Mouse101 = 0x00100065,
+ Mouse102 = 0x00100066,
+ Mouse103 = 0x00100067,
+ Mouse104 = 0x00100068,
+ Mouse105 = 0x00100069,
+ Mouse106 = 0x0010006A,
+ Mouse107 = 0x0010006B,
+ Mouse108 = 0x0010006C,
+ Mouse109 = 0x0010006D,
+ Mouse110 = 0x0010006E,
+ Mouse111 = 0x0010006F,
+ Mouse112 = 0x00100070,
+ Mouse113 = 0x00100071,
+ Mouse114 = 0x00100072,
+ Mouse115 = 0x00100073,
+ Mouse116 = 0x00100074,
+ Mouse117 = 0x00100075,
+ Mouse118 = 0x00100076,
+ Mouse119 = 0x00100077,
+ Mouse120 = 0x00100078,
+ Mouse121 = 0x00100079,
+ Mouse122 = 0x0010007A,
+ Mouse123 = 0x0010007B,
+ Mouse124 = 0x0010007C,
+ Mouse125 = 0x0010007D,
+ Mouse126 = 0x0010007E,
+ Mouse127 = 0x0010007F,
+ Mouse128 = 0x00100080,
- /*### Mouse ###*/
- Mouse1 = 0x00100001,
- Mouse2 = 0x00100002,
- Mouse3 = 0x00100003,
- Mouse4 = 0x00100004,
- Mouse5 = 0x00100005,
- Mouse6 = 0x00100006,
- Mouse7 = 0x00100007,
- Mouse8 = 0x00100008,
- Mouse9 = 0x00100009,
- Mouse10 = 0x0010000A,
- Mouse11 = 0x0010000B,
- Mouse12 = 0x0010000C,
- Mouse13 = 0x0010000D,
- Mouse14 = 0x0010000E,
- Mouse15 = 0x0010000F,
- Mouse16 = 0x00100010,
- Mouse17 = 0x00100011,
- Mouse18 = 0x00100012,
- Mouse19 = 0x00100013,
- Mouse20 = 0x00100014,
- Mouse21 = 0x00100015,
- Mouse22 = 0x00100016,
- Mouse23 = 0x00100017,
- Mouse24 = 0x00100018,
- Mouse25 = 0x00100019,
- Mouse26 = 0x0010001A,
- Mouse27 = 0x0010001B,
- Mouse28 = 0x0010001C,
- Mouse29 = 0x0010001D,
- Mouse30 = 0x0010001E,
- Mouse31 = 0x0010001F,
- Mouse32 = 0x00100020,
- Mouse33 = 0x00100021,
- Mouse34 = 0x00100022,
- Mouse35 = 0x00100023,
- Mouse36 = 0x00100024,
- Mouse37 = 0x00100025,
- Mouse38 = 0x00100026,
- Mouse39 = 0x00100027,
- Mouse40 = 0x00100028,
- Mouse41 = 0x00100029,
- Mouse42 = 0x0010002A,
- Mouse43 = 0x0010002B,
- Mouse44 = 0x0010002C,
- Mouse45 = 0x0010002D,
- Mouse46 = 0x0010002E,
- Mouse47 = 0x0010002F,
- Mouse48 = 0x00100030,
- Mouse49 = 0x00100031,
- Mouse50 = 0x00100032,
- Mouse51 = 0x00100033,
- Mouse52 = 0x00100034,
- Mouse53 = 0x00100035,
- Mouse54 = 0x00100036,
- Mouse55 = 0x00100037,
- Mouse56 = 0x00100038,
- Mouse57 = 0x00100039,
- Mouse58 = 0x0010003A,
- Mouse59 = 0x0010003B,
- Mouse60 = 0x0010003C,
- Mouse61 = 0x0010003D,
- Mouse62 = 0x0010003E,
- Mouse63 = 0x0010003F,
- Mouse64 = 0x00100040,
+ /*### Headset ###*/
+ Headset1 = 0x00200001,
+ Headset2 = 0x00200002,
+ Headset3 = 0x00200003,
+ Headset4 = 0x00200004,
+ Headset5 = 0x00200005,
+ Headset6 = 0x00200006,
+ Headset7 = 0x00200007,
+ Headset8 = 0x00200008,
+ Headset9 = 0x00200009,
+ Headset10 = 0x0020000A,
+ Headset11 = 0x0020000B,
+ Headset12 = 0x0020000C,
+ Headset13 = 0x0020000D,
+ Headset14 = 0x0020000E,
+ Headset15 = 0x0020000F,
+ Headset16 = 0x00200010,
+ Headset17 = 0x00200011,
+ Headset18 = 0x00200012,
+ Headset19 = 0x00200013,
+ Headset20 = 0x00200014,
+ Headset21 = 0x00200015,
+ Headset22 = 0x00200016,
+ Headset23 = 0x00200017,
+ Headset24 = 0x00200018,
+ Headset25 = 0x00200019,
+ Headset26 = 0x0020001A,
+ Headset27 = 0x0020001B,
+ Headset28 = 0x0020001C,
+ Headset29 = 0x0020001D,
+ Headset30 = 0x0020001E,
+ Headset31 = 0x0020001F,
+ Headset32 = 0x00200020,
+ Headset33 = 0x00200021,
+ Headset34 = 0x00200022,
+ Headset35 = 0x00200023,
+ Headset36 = 0x00200024,
+ Headset37 = 0x00200025,
+ Headset38 = 0x00200026,
+ Headset39 = 0x00200027,
+ Headset40 = 0x00200028,
+ Headset41 = 0x00200029,
+ Headset42 = 0x0020002A,
+ Headset43 = 0x0020002B,
+ Headset44 = 0x0020002C,
+ Headset45 = 0x0020002D,
+ Headset46 = 0x0020002E,
+ Headset47 = 0x0020002F,
+ Headset48 = 0x00200030,
+ Headset49 = 0x00200031,
+ Headset50 = 0x00200032,
+ Headset51 = 0x00200033,
+ Headset52 = 0x00200034,
+ Headset53 = 0x00200035,
+ Headset54 = 0x00200036,
+ Headset55 = 0x00200037,
+ Headset56 = 0x00200038,
+ Headset57 = 0x00200039,
+ Headset58 = 0x0020003A,
+ Headset59 = 0x0020003B,
+ Headset60 = 0x0020003C,
+ Headset61 = 0x0020003D,
+ Headset62 = 0x0020003E,
+ Headset63 = 0x0020003F,
+ Headset64 = 0x00200040,
+ Headset65 = 0x00200041,
+ Headset66 = 0x00200042,
+ Headset67 = 0x00200043,
+ Headset68 = 0x00200044,
+ Headset69 = 0x00200045,
+ Headset70 = 0x00200046,
+ Headset71 = 0x00200047,
+ Headset72 = 0x00200048,
+ Headset73 = 0x00200049,
+ Headset74 = 0x0020004A,
+ Headset75 = 0x0020004B,
+ Headset76 = 0x0020004C,
+ Headset77 = 0x0020004D,
+ Headset78 = 0x0020004E,
+ Headset79 = 0x0020004F,
+ Headset80 = 0x00200050,
+ Headset81 = 0x00200051,
+ Headset82 = 0x00200052,
+ Headset83 = 0x00200053,
+ Headset84 = 0x00200054,
+ Headset85 = 0x00200055,
+ Headset86 = 0x00200056,
+ Headset87 = 0x00200057,
+ Headset88 = 0x00200058,
+ Headset89 = 0x00200059,
+ Headset90 = 0x0020005A,
+ Headset91 = 0x0020005B,
+ Headset92 = 0x0020005C,
+ Headset93 = 0x0020005D,
+ Headset94 = 0x0020005E,
+ Headset95 = 0x0020005F,
+ Headset96 = 0x00200060,
+ Headset97 = 0x00200061,
+ Headset98 = 0x00200062,
+ Headset99 = 0x00200063,
+ Headset100 = 0x00200064,
+ Headset101 = 0x00200065,
+ Headset102 = 0x00200066,
+ Headset103 = 0x00200067,
+ Headset104 = 0x00200068,
+ Headset105 = 0x00200069,
+ Headset106 = 0x0020006A,
+ Headset107 = 0x0020006B,
+ Headset108 = 0x0020006C,
+ Headset109 = 0x0020006D,
+ Headset110 = 0x0020006E,
+ Headset111 = 0x0020006F,
+ Headset112 = 0x00200070,
+ Headset113 = 0x00200071,
+ Headset114 = 0x00200072,
+ Headset115 = 0x00200073,
+ Headset116 = 0x00200074,
+ Headset117 = 0x00200075,
+ Headset118 = 0x00200076,
+ Headset119 = 0x00200077,
+ Headset120 = 0x00200078,
+ Headset121 = 0x00200079,
+ Headset122 = 0x0020007A,
+ Headset123 = 0x0020007B,
+ Headset124 = 0x0020007C,
+ Headset125 = 0x0020007D,
+ Headset126 = 0x0020007E,
+ Headset127 = 0x0020007F,
+ Headset128 = 0x00200080,
- /*### Headset ###*/
- Headset1 = 0x00200001,
- Headset2 = 0x00200002,
- Headset3 = 0x00200003,
- Headset4 = 0x00200004,
- Headset5 = 0x00200005,
- Headset6 = 0x00200006,
- Headset7 = 0x00200007,
- Headset8 = 0x00200008,
- Headset9 = 0x00200009,
- Headset10 = 0x0020000A,
- Headset11 = 0x0020000B,
- Headset12 = 0x0020000C,
- Headset13 = 0x0020000D,
- Headset14 = 0x0020000E,
- Headset15 = 0x0020000F,
- Headset16 = 0x00200010,
- Headset17 = 0x00200011,
- Headset18 = 0x00200012,
- Headset19 = 0x00200013,
- Headset20 = 0x00200014,
- Headset21 = 0x00200015,
- Headset22 = 0x00200016,
- Headset23 = 0x00200017,
- Headset24 = 0x00200018,
- Headset25 = 0x00200019,
- Headset26 = 0x0020001A,
- Headset27 = 0x0020001B,
- Headset28 = 0x0020001C,
- Headset29 = 0x0020001D,
- Headset30 = 0x0020001E,
- Headset31 = 0x0020001F,
- Headset32 = 0x00200020,
- Headset33 = 0x00200021,
- Headset34 = 0x00200022,
- Headset35 = 0x00200023,
- Headset36 = 0x00200024,
- Headset37 = 0x00200025,
- Headset38 = 0x00200026,
- Headset39 = 0x00200027,
- Headset40 = 0x00200028,
- Headset41 = 0x00200029,
- Headset42 = 0x0020002A,
- Headset43 = 0x0020002B,
- Headset44 = 0x0020002C,
- Headset45 = 0x0020002D,
- Headset46 = 0x0020002E,
- Headset47 = 0x0020002F,
- Headset48 = 0x00200030,
- Headset49 = 0x00200031,
- Headset50 = 0x00200032,
- Headset51 = 0x00200033,
- Headset52 = 0x00200034,
- Headset53 = 0x00200035,
- Headset54 = 0x00200036,
- Headset55 = 0x00200037,
- Headset56 = 0x00200038,
- Headset57 = 0x00200039,
- Headset58 = 0x0020003A,
- Headset59 = 0x0020003B,
- Headset60 = 0x0020003C,
- Headset61 = 0x0020003D,
- Headset62 = 0x0020003E,
- Headset63 = 0x0020003F,
- Headset64 = 0x00200040,
+ /*### Mousepad ###*/
+ Mousepad1 = 0x00300001,
+ Mousepad2 = 0x00300002,
+ Mousepad3 = 0x00300003,
+ Mousepad4 = 0x00300004,
+ Mousepad5 = 0x00300005,
+ Mousepad6 = 0x00300006,
+ Mousepad7 = 0x00300007,
+ Mousepad8 = 0x00300008,
+ Mousepad9 = 0x00300009,
+ Mousepad10 = 0x0030000A,
+ Mousepad11 = 0x0030000B,
+ Mousepad12 = 0x0030000C,
+ Mousepad13 = 0x0030000D,
+ Mousepad14 = 0x0030000E,
+ Mousepad15 = 0x0030000F,
+ Mousepad16 = 0x00300010,
+ Mousepad17 = 0x00300011,
+ Mousepad18 = 0x00300012,
+ Mousepad19 = 0x00300013,
+ Mousepad20 = 0x00300014,
+ Mousepad21 = 0x00300015,
+ Mousepad22 = 0x00300016,
+ Mousepad23 = 0x00300017,
+ Mousepad24 = 0x00300018,
+ Mousepad25 = 0x00300019,
+ Mousepad26 = 0x0030001A,
+ Mousepad27 = 0x0030001B,
+ Mousepad28 = 0x0030001C,
+ Mousepad29 = 0x0030001D,
+ Mousepad30 = 0x0030001E,
+ Mousepad31 = 0x0030001F,
+ Mousepad32 = 0x00300020,
+ Mousepad33 = 0x00300021,
+ Mousepad34 = 0x00300022,
+ Mousepad35 = 0x00300023,
+ Mousepad36 = 0x00300024,
+ Mousepad37 = 0x00300025,
+ Mousepad38 = 0x00300026,
+ Mousepad39 = 0x00300027,
+ Mousepad40 = 0x00300028,
+ Mousepad41 = 0x00300029,
+ Mousepad42 = 0x0030002A,
+ Mousepad43 = 0x0030002B,
+ Mousepad44 = 0x0030002C,
+ Mousepad45 = 0x0030002D,
+ Mousepad46 = 0x0030002E,
+ Mousepad47 = 0x0030002F,
+ Mousepad48 = 0x00300030,
+ Mousepad49 = 0x00300031,
+ Mousepad50 = 0x00300032,
+ Mousepad51 = 0x00300033,
+ Mousepad52 = 0x00300034,
+ Mousepad53 = 0x00300035,
+ Mousepad54 = 0x00300036,
+ Mousepad55 = 0x00300037,
+ Mousepad56 = 0x00300038,
+ Mousepad57 = 0x00300039,
+ Mousepad58 = 0x0030003A,
+ Mousepad59 = 0x0030003B,
+ Mousepad60 = 0x0030003C,
+ Mousepad61 = 0x0030003D,
+ Mousepad62 = 0x0030003E,
+ Mousepad63 = 0x0030003F,
+ Mousepad64 = 0x00300040,
+ Mousepad65 = 0x00300041,
+ Mousepad66 = 0x00300042,
+ Mousepad67 = 0x00300043,
+ Mousepad68 = 0x00300044,
+ Mousepad69 = 0x00300045,
+ Mousepad70 = 0x00300046,
+ Mousepad71 = 0x00300047,
+ Mousepad72 = 0x00300048,
+ Mousepad73 = 0x00300049,
+ Mousepad74 = 0x0030004A,
+ Mousepad75 = 0x0030004B,
+ Mousepad76 = 0x0030004C,
+ Mousepad77 = 0x0030004D,
+ Mousepad78 = 0x0030004E,
+ Mousepad79 = 0x0030004F,
+ Mousepad80 = 0x00300050,
+ Mousepad81 = 0x00300051,
+ Mousepad82 = 0x00300052,
+ Mousepad83 = 0x00300053,
+ Mousepad84 = 0x00300054,
+ Mousepad85 = 0x00300055,
+ Mousepad86 = 0x00300056,
+ Mousepad87 = 0x00300057,
+ Mousepad88 = 0x00300058,
+ Mousepad89 = 0x00300059,
+ Mousepad90 = 0x0030005A,
+ Mousepad91 = 0x0030005B,
+ Mousepad92 = 0x0030005C,
+ Mousepad93 = 0x0030005D,
+ Mousepad94 = 0x0030005E,
+ Mousepad95 = 0x0030005F,
+ Mousepad96 = 0x00300060,
+ Mousepad97 = 0x00300061,
+ Mousepad98 = 0x00300062,
+ Mousepad99 = 0x00300063,
+ Mousepad100 = 0x00300064,
+ Mousepad101 = 0x00300065,
+ Mousepad102 = 0x00300066,
+ Mousepad103 = 0x00300067,
+ Mousepad104 = 0x00300068,
+ Mousepad105 = 0x00300069,
+ Mousepad106 = 0x0030006A,
+ Mousepad107 = 0x0030006B,
+ Mousepad108 = 0x0030006C,
+ Mousepad109 = 0x0030006D,
+ Mousepad110 = 0x0030006E,
+ Mousepad111 = 0x0030006F,
+ Mousepad112 = 0x00300070,
+ Mousepad113 = 0x00300071,
+ Mousepad114 = 0x00300072,
+ Mousepad115 = 0x00300073,
+ Mousepad116 = 0x00300074,
+ Mousepad117 = 0x00300075,
+ Mousepad118 = 0x00300076,
+ Mousepad119 = 0x00300077,
+ Mousepad120 = 0x00300078,
+ Mousepad121 = 0x00300079,
+ Mousepad122 = 0x0030007A,
+ Mousepad123 = 0x0030007B,
+ Mousepad124 = 0x0030007C,
+ Mousepad125 = 0x0030007D,
+ Mousepad126 = 0x0030007E,
+ Mousepad127 = 0x0030007F,
+ Mousepad128 = 0x00300080,
- /*### Mousepad ###*/
- Mousepad1 = 0x00300001,
- Mousepad2 = 0x00300002,
- Mousepad3 = 0x00300003,
- Mousepad4 = 0x00300004,
- Mousepad5 = 0x00300005,
- Mousepad6 = 0x00300006,
- Mousepad7 = 0x00300007,
- Mousepad8 = 0x00300008,
- Mousepad9 = 0x00300009,
- Mousepad10 = 0x0030000A,
- Mousepad11 = 0x0030000B,
- Mousepad12 = 0x0030000C,
- Mousepad13 = 0x0030000D,
- Mousepad14 = 0x0030000E,
- Mousepad15 = 0x0030000F,
- Mousepad16 = 0x00300010,
- Mousepad17 = 0x00300011,
- Mousepad18 = 0x00300012,
- Mousepad19 = 0x00300013,
- Mousepad20 = 0x00300014,
- Mousepad21 = 0x00300015,
- Mousepad22 = 0x00300016,
- Mousepad23 = 0x00300017,
- Mousepad24 = 0x00300018,
- Mousepad25 = 0x00300019,
- Mousepad26 = 0x0030001A,
- Mousepad27 = 0x0030001B,
- Mousepad28 = 0x0030001C,
- Mousepad29 = 0x0030001D,
- Mousepad30 = 0x0030001E,
- Mousepad31 = 0x0030001F,
- Mousepad32 = 0x00300020,
- Mousepad33 = 0x00300021,
- Mousepad34 = 0x00300022,
- Mousepad35 = 0x00300023,
- Mousepad36 = 0x00300024,
- Mousepad37 = 0x00300025,
- Mousepad38 = 0x00300026,
- Mousepad39 = 0x00300027,
- Mousepad40 = 0x00300028,
- Mousepad41 = 0x00300029,
- Mousepad42 = 0x0030002A,
- Mousepad43 = 0x0030002B,
- Mousepad44 = 0x0030002C,
- Mousepad45 = 0x0030002D,
- Mousepad46 = 0x0030002E,
- Mousepad47 = 0x0030002F,
- Mousepad48 = 0x00300030,
- Mousepad49 = 0x00300031,
- Mousepad50 = 0x00300032,
- Mousepad51 = 0x00300033,
- Mousepad52 = 0x00300034,
- Mousepad53 = 0x00300035,
- Mousepad54 = 0x00300036,
- Mousepad55 = 0x00300037,
- Mousepad56 = 0x00300038,
- Mousepad57 = 0x00300039,
- Mousepad58 = 0x0030003A,
- Mousepad59 = 0x0030003B,
- Mousepad60 = 0x0030003C,
- Mousepad61 = 0x0030003D,
- Mousepad62 = 0x0030003E,
- Mousepad63 = 0x0030003F,
- Mousepad64 = 0x00300040,
+ /*### LedStripe ###*/
+ LedStripe1 = 0x00400001,
+ LedStripe2 = 0x00400002,
+ LedStripe3 = 0x00400003,
+ LedStripe4 = 0x00400004,
+ LedStripe5 = 0x00400005,
+ LedStripe6 = 0x00400006,
+ LedStripe7 = 0x00400007,
+ LedStripe8 = 0x00400008,
+ LedStripe9 = 0x00400009,
+ LedStripe10 = 0x0040000A,
+ LedStripe11 = 0x0040000B,
+ LedStripe12 = 0x0040000C,
+ LedStripe13 = 0x0040000D,
+ LedStripe14 = 0x0040000E,
+ LedStripe15 = 0x0040000F,
+ LedStripe16 = 0x00400010,
+ LedStripe17 = 0x00400011,
+ LedStripe18 = 0x00400012,
+ LedStripe19 = 0x00400013,
+ LedStripe20 = 0x00400014,
+ LedStripe21 = 0x00400015,
+ LedStripe22 = 0x00400016,
+ LedStripe23 = 0x00400017,
+ LedStripe24 = 0x00400018,
+ LedStripe25 = 0x00400019,
+ LedStripe26 = 0x0040001A,
+ LedStripe27 = 0x0040001B,
+ LedStripe28 = 0x0040001C,
+ LedStripe29 = 0x0040001D,
+ LedStripe30 = 0x0040001E,
+ LedStripe31 = 0x0040001F,
+ LedStripe32 = 0x00400020,
+ LedStripe33 = 0x00400021,
+ LedStripe34 = 0x00400022,
+ LedStripe35 = 0x00400023,
+ LedStripe36 = 0x00400024,
+ LedStripe37 = 0x00400025,
+ LedStripe38 = 0x00400026,
+ LedStripe39 = 0x00400027,
+ LedStripe40 = 0x00400028,
+ LedStripe41 = 0x00400029,
+ LedStripe42 = 0x0040002A,
+ LedStripe43 = 0x0040002B,
+ LedStripe44 = 0x0040002C,
+ LedStripe45 = 0x0040002D,
+ LedStripe46 = 0x0040002E,
+ LedStripe47 = 0x0040002F,
+ LedStripe48 = 0x00400030,
+ LedStripe49 = 0x00400031,
+ LedStripe50 = 0x00400032,
+ LedStripe51 = 0x00400033,
+ LedStripe52 = 0x00400034,
+ LedStripe53 = 0x00400035,
+ LedStripe54 = 0x00400036,
+ LedStripe55 = 0x00400037,
+ LedStripe56 = 0x00400038,
+ LedStripe57 = 0x00400039,
+ LedStripe58 = 0x0040003A,
+ LedStripe59 = 0x0040003B,
+ LedStripe60 = 0x0040003C,
+ LedStripe61 = 0x0040003D,
+ LedStripe62 = 0x0040003E,
+ LedStripe63 = 0x0040003F,
+ LedStripe64 = 0x00400040,
+ LedStripe65 = 0x00400041,
+ LedStripe66 = 0x00400042,
+ LedStripe67 = 0x00400043,
+ LedStripe68 = 0x00400044,
+ LedStripe69 = 0x00400045,
+ LedStripe70 = 0x00400046,
+ LedStripe71 = 0x00400047,
+ LedStripe72 = 0x00400048,
+ LedStripe73 = 0x00400049,
+ LedStripe74 = 0x0040004A,
+ LedStripe75 = 0x0040004B,
+ LedStripe76 = 0x0040004C,
+ LedStripe77 = 0x0040004D,
+ LedStripe78 = 0x0040004E,
+ LedStripe79 = 0x0040004F,
+ LedStripe80 = 0x00400050,
+ LedStripe81 = 0x00400051,
+ LedStripe82 = 0x00400052,
+ LedStripe83 = 0x00400053,
+ LedStripe84 = 0x00400054,
+ LedStripe85 = 0x00400055,
+ LedStripe86 = 0x00400056,
+ LedStripe87 = 0x00400057,
+ LedStripe88 = 0x00400058,
+ LedStripe89 = 0x00400059,
+ LedStripe90 = 0x0040005A,
+ LedStripe91 = 0x0040005B,
+ LedStripe92 = 0x0040005C,
+ LedStripe93 = 0x0040005D,
+ LedStripe94 = 0x0040005E,
+ LedStripe95 = 0x0040005F,
+ LedStripe96 = 0x00400060,
+ LedStripe97 = 0x00400061,
+ LedStripe98 = 0x00400062,
+ LedStripe99 = 0x00400063,
+ LedStripe100 = 0x00400064,
+ LedStripe101 = 0x00400065,
+ LedStripe102 = 0x00400066,
+ LedStripe103 = 0x00400067,
+ LedStripe104 = 0x00400068,
+ LedStripe105 = 0x00400069,
+ LedStripe106 = 0x0040006A,
+ LedStripe107 = 0x0040006B,
+ LedStripe108 = 0x0040006C,
+ LedStripe109 = 0x0040006D,
+ LedStripe110 = 0x0040006E,
+ LedStripe111 = 0x0040006F,
+ LedStripe112 = 0x00400070,
+ LedStripe113 = 0x00400071,
+ LedStripe114 = 0x00400072,
+ LedStripe115 = 0x00400073,
+ LedStripe116 = 0x00400074,
+ LedStripe117 = 0x00400075,
+ LedStripe118 = 0x00400076,
+ LedStripe119 = 0x00400077,
+ LedStripe120 = 0x00400078,
+ LedStripe121 = 0x00400079,
+ LedStripe122 = 0x0040007A,
+ LedStripe123 = 0x0040007B,
+ LedStripe124 = 0x0040007C,
+ LedStripe125 = 0x0040007D,
+ LedStripe126 = 0x0040007E,
+ LedStripe127 = 0x0040007F,
+ LedStripe128 = 0x00400080,
+ LedStripe129 = 0x00400081,
+ LedStripe130 = 0x00400082,
+ LedStripe131 = 0x00400083,
+ LedStripe132 = 0x00400084,
+ LedStripe133 = 0x00400085,
+ LedStripe134 = 0x00400086,
+ LedStripe135 = 0x00400087,
+ LedStripe136 = 0x00400088,
+ LedStripe137 = 0x00400089,
+ LedStripe138 = 0x0040008A,
+ LedStripe139 = 0x0040008B,
+ LedStripe140 = 0x0040008C,
+ LedStripe141 = 0x0040008D,
+ LedStripe142 = 0x0040008E,
+ LedStripe143 = 0x0040008F,
+ LedStripe144 = 0x00400090,
+ LedStripe145 = 0x00400091,
+ LedStripe146 = 0x00400092,
+ LedStripe147 = 0x00400093,
+ LedStripe148 = 0x00400094,
+ LedStripe149 = 0x00400095,
+ LedStripe150 = 0x00400096,
+ LedStripe151 = 0x00400097,
+ LedStripe152 = 0x00400098,
+ LedStripe153 = 0x00400099,
+ LedStripe154 = 0x0040009A,
+ LedStripe155 = 0x0040009B,
+ LedStripe156 = 0x0040009C,
+ LedStripe157 = 0x0040009D,
+ LedStripe158 = 0x0040009E,
+ LedStripe159 = 0x0040009F,
+ LedStripe160 = 0x004000A0,
+ LedStripe161 = 0x004000A1,
+ LedStripe162 = 0x004000A2,
+ LedStripe163 = 0x004000A3,
+ LedStripe164 = 0x004000A4,
+ LedStripe165 = 0x004000A5,
+ LedStripe166 = 0x004000A6,
+ LedStripe167 = 0x004000A7,
+ LedStripe168 = 0x004000A8,
+ LedStripe169 = 0x004000A9,
+ LedStripe170 = 0x004000AA,
+ LedStripe171 = 0x004000AB,
+ LedStripe172 = 0x004000AC,
+ LedStripe173 = 0x004000AD,
+ LedStripe174 = 0x004000AE,
+ LedStripe175 = 0x004000AF,
+ LedStripe176 = 0x004000B0,
+ LedStripe177 = 0x004000B1,
+ LedStripe178 = 0x004000B2,
+ LedStripe179 = 0x004000B3,
+ LedStripe180 = 0x004000B4,
+ LedStripe181 = 0x004000B5,
+ LedStripe182 = 0x004000B6,
+ LedStripe183 = 0x004000B7,
+ LedStripe184 = 0x004000B8,
+ LedStripe185 = 0x004000B9,
+ LedStripe186 = 0x004000BA,
+ LedStripe187 = 0x004000BB,
+ LedStripe188 = 0x004000BC,
+ LedStripe189 = 0x004000BD,
+ LedStripe190 = 0x004000BE,
+ LedStripe191 = 0x004000BF,
+ LedStripe192 = 0x004000C0,
+ LedStripe193 = 0x004000C1,
+ LedStripe194 = 0x004000C2,
+ LedStripe195 = 0x004000C3,
+ LedStripe196 = 0x004000C4,
+ LedStripe197 = 0x004000C5,
+ LedStripe198 = 0x004000C6,
+ LedStripe199 = 0x004000C7,
+ LedStripe200 = 0x004000C8,
+ LedStripe201 = 0x004000C9,
+ LedStripe202 = 0x004000CA,
+ LedStripe203 = 0x004000CB,
+ LedStripe204 = 0x004000CC,
+ LedStripe205 = 0x004000CD,
+ LedStripe206 = 0x004000CE,
+ LedStripe207 = 0x004000CF,
+ LedStripe208 = 0x004000D0,
+ LedStripe209 = 0x004000D1,
+ LedStripe210 = 0x004000D2,
+ LedStripe211 = 0x004000D3,
+ LedStripe212 = 0x004000D4,
+ LedStripe213 = 0x004000D5,
+ LedStripe214 = 0x004000D6,
+ LedStripe215 = 0x004000D7,
+ LedStripe216 = 0x004000D8,
+ LedStripe217 = 0x004000D9,
+ LedStripe218 = 0x004000DA,
+ LedStripe219 = 0x004000DB,
+ LedStripe220 = 0x004000DC,
+ LedStripe221 = 0x004000DD,
+ LedStripe222 = 0x004000DE,
+ LedStripe223 = 0x004000DF,
+ LedStripe224 = 0x004000E0,
+ LedStripe225 = 0x004000E1,
+ LedStripe226 = 0x004000E2,
+ LedStripe227 = 0x004000E3,
+ LedStripe228 = 0x004000E4,
+ LedStripe229 = 0x004000E5,
+ LedStripe230 = 0x004000E6,
+ LedStripe231 = 0x004000E7,
+ LedStripe232 = 0x004000E8,
+ LedStripe233 = 0x004000E9,
+ LedStripe234 = 0x004000EA,
+ LedStripe235 = 0x004000EB,
+ LedStripe236 = 0x004000EC,
+ LedStripe237 = 0x004000ED,
+ LedStripe238 = 0x004000EE,
+ LedStripe239 = 0x004000EF,
+ LedStripe240 = 0x004000F0,
+ LedStripe241 = 0x004000F1,
+ LedStripe242 = 0x004000F2,
+ LedStripe243 = 0x004000F3,
+ LedStripe244 = 0x004000F4,
+ LedStripe245 = 0x004000F5,
+ LedStripe246 = 0x004000F6,
+ LedStripe247 = 0x004000F7,
+ LedStripe248 = 0x004000F8,
+ LedStripe249 = 0x004000F9,
+ LedStripe250 = 0x004000FA,
+ LedStripe251 = 0x004000FB,
+ LedStripe252 = 0x004000FC,
+ LedStripe253 = 0x004000FD,
+ LedStripe254 = 0x004000FE,
+ LedStripe255 = 0x004000FF,
+ LedStripe256 = 0x00400100,
+ LedStripe257 = 0x00400101,
+ LedStripe258 = 0x00400102,
+ LedStripe259 = 0x00400103,
+ LedStripe260 = 0x00400104,
+ LedStripe261 = 0x00400105,
+ LedStripe262 = 0x00400106,
+ LedStripe263 = 0x00400107,
+ LedStripe264 = 0x00400108,
+ LedStripe265 = 0x00400109,
+ LedStripe266 = 0x0040010A,
+ LedStripe267 = 0x0040010B,
+ LedStripe268 = 0x0040010C,
+ LedStripe269 = 0x0040010D,
+ LedStripe270 = 0x0040010E,
+ LedStripe271 = 0x0040010F,
+ LedStripe272 = 0x00400110,
+ LedStripe273 = 0x00400111,
+ LedStripe274 = 0x00400112,
+ LedStripe275 = 0x00400113,
+ LedStripe276 = 0x00400114,
+ LedStripe277 = 0x00400115,
+ LedStripe278 = 0x00400116,
+ LedStripe279 = 0x00400117,
+ LedStripe280 = 0x00400118,
+ LedStripe281 = 0x00400119,
+ LedStripe282 = 0x0040011A,
+ LedStripe283 = 0x0040011B,
+ LedStripe284 = 0x0040011C,
+ LedStripe285 = 0x0040011D,
+ LedStripe286 = 0x0040011E,
+ LedStripe287 = 0x0040011F,
+ LedStripe288 = 0x00400120,
+ LedStripe289 = 0x00400121,
+ LedStripe290 = 0x00400122,
+ LedStripe291 = 0x00400123,
+ LedStripe292 = 0x00400124,
+ LedStripe293 = 0x00400125,
+ LedStripe294 = 0x00400126,
+ LedStripe295 = 0x00400127,
+ LedStripe296 = 0x00400128,
+ LedStripe297 = 0x00400129,
+ LedStripe298 = 0x0040012A,
+ LedStripe299 = 0x0040012B,
+ LedStripe300 = 0x0040012C,
+ LedStripe301 = 0x0040012D,
+ LedStripe302 = 0x0040012E,
+ LedStripe303 = 0x0040012F,
+ LedStripe304 = 0x00400130,
+ LedStripe305 = 0x00400131,
+ LedStripe306 = 0x00400132,
+ LedStripe307 = 0x00400133,
+ LedStripe308 = 0x00400134,
+ LedStripe309 = 0x00400135,
+ LedStripe310 = 0x00400136,
+ LedStripe311 = 0x00400137,
+ LedStripe312 = 0x00400138,
+ LedStripe313 = 0x00400139,
+ LedStripe314 = 0x0040013A,
+ LedStripe315 = 0x0040013B,
+ LedStripe316 = 0x0040013C,
+ LedStripe317 = 0x0040013D,
+ LedStripe318 = 0x0040013E,
+ LedStripe319 = 0x0040013F,
+ LedStripe320 = 0x00400140,
+ LedStripe321 = 0x00400141,
+ LedStripe322 = 0x00400142,
+ LedStripe323 = 0x00400143,
+ LedStripe324 = 0x00400144,
+ LedStripe325 = 0x00400145,
+ LedStripe326 = 0x00400146,
+ LedStripe327 = 0x00400147,
+ LedStripe328 = 0x00400148,
+ LedStripe329 = 0x00400149,
+ LedStripe330 = 0x0040014A,
+ LedStripe331 = 0x0040014B,
+ LedStripe332 = 0x0040014C,
+ LedStripe333 = 0x0040014D,
+ LedStripe334 = 0x0040014E,
+ LedStripe335 = 0x0040014F,
+ LedStripe336 = 0x00400150,
+ LedStripe337 = 0x00400151,
+ LedStripe338 = 0x00400152,
+ LedStripe339 = 0x00400153,
+ LedStripe340 = 0x00400154,
+ LedStripe341 = 0x00400155,
+ LedStripe342 = 0x00400156,
+ LedStripe343 = 0x00400157,
+ LedStripe344 = 0x00400158,
+ LedStripe345 = 0x00400159,
+ LedStripe346 = 0x0040015A,
+ LedStripe347 = 0x0040015B,
+ LedStripe348 = 0x0040015C,
+ LedStripe349 = 0x0040015D,
+ LedStripe350 = 0x0040015E,
+ LedStripe351 = 0x0040015F,
+ LedStripe352 = 0x00400160,
+ LedStripe353 = 0x00400161,
+ LedStripe354 = 0x00400162,
+ LedStripe355 = 0x00400163,
+ LedStripe356 = 0x00400164,
+ LedStripe357 = 0x00400165,
+ LedStripe358 = 0x00400166,
+ LedStripe359 = 0x00400167,
+ LedStripe360 = 0x00400168,
+ LedStripe361 = 0x00400169,
+ LedStripe362 = 0x0040016A,
+ LedStripe363 = 0x0040016B,
+ LedStripe364 = 0x0040016C,
+ LedStripe365 = 0x0040016D,
+ LedStripe366 = 0x0040016E,
+ LedStripe367 = 0x0040016F,
+ LedStripe368 = 0x00400170,
+ LedStripe369 = 0x00400171,
+ LedStripe370 = 0x00400172,
+ LedStripe371 = 0x00400173,
+ LedStripe372 = 0x00400174,
+ LedStripe373 = 0x00400175,
+ LedStripe374 = 0x00400176,
+ LedStripe375 = 0x00400177,
+ LedStripe376 = 0x00400178,
+ LedStripe377 = 0x00400179,
+ LedStripe378 = 0x0040017A,
+ LedStripe379 = 0x0040017B,
+ LedStripe380 = 0x0040017C,
+ LedStripe381 = 0x0040017D,
+ LedStripe382 = 0x0040017E,
+ LedStripe383 = 0x0040017F,
+ LedStripe384 = 0x00400180,
+ LedStripe385 = 0x00400181,
+ LedStripe386 = 0x00400182,
+ LedStripe387 = 0x00400183,
+ LedStripe388 = 0x00400184,
+ LedStripe389 = 0x00400185,
+ LedStripe390 = 0x00400186,
+ LedStripe391 = 0x00400187,
+ LedStripe392 = 0x00400188,
+ LedStripe393 = 0x00400189,
+ LedStripe394 = 0x0040018A,
+ LedStripe395 = 0x0040018B,
+ LedStripe396 = 0x0040018C,
+ LedStripe397 = 0x0040018D,
+ LedStripe398 = 0x0040018E,
+ LedStripe399 = 0x0040018F,
+ LedStripe400 = 0x00400190,
+ LedStripe401 = 0x00400191,
+ LedStripe402 = 0x00400192,
+ LedStripe403 = 0x00400193,
+ LedStripe404 = 0x00400194,
+ LedStripe405 = 0x00400195,
+ LedStripe406 = 0x00400196,
+ LedStripe407 = 0x00400197,
+ LedStripe408 = 0x00400198,
+ LedStripe409 = 0x00400199,
+ LedStripe410 = 0x0040019A,
+ LedStripe411 = 0x0040019B,
+ LedStripe412 = 0x0040019C,
+ LedStripe413 = 0x0040019D,
+ LedStripe414 = 0x0040019E,
+ LedStripe415 = 0x0040019F,
+ LedStripe416 = 0x004001A0,
+ LedStripe417 = 0x004001A1,
+ LedStripe418 = 0x004001A2,
+ LedStripe419 = 0x004001A3,
+ LedStripe420 = 0x004001A4,
+ LedStripe421 = 0x004001A5,
+ LedStripe422 = 0x004001A6,
+ LedStripe423 = 0x004001A7,
+ LedStripe424 = 0x004001A8,
+ LedStripe425 = 0x004001A9,
+ LedStripe426 = 0x004001AA,
+ LedStripe427 = 0x004001AB,
+ LedStripe428 = 0x004001AC,
+ LedStripe429 = 0x004001AD,
+ LedStripe430 = 0x004001AE,
+ LedStripe431 = 0x004001AF,
+ LedStripe432 = 0x004001B0,
+ LedStripe433 = 0x004001B1,
+ LedStripe434 = 0x004001B2,
+ LedStripe435 = 0x004001B3,
+ LedStripe436 = 0x004001B4,
+ LedStripe437 = 0x004001B5,
+ LedStripe438 = 0x004001B6,
+ LedStripe439 = 0x004001B7,
+ LedStripe440 = 0x004001B8,
+ LedStripe441 = 0x004001B9,
+ LedStripe442 = 0x004001BA,
+ LedStripe443 = 0x004001BB,
+ LedStripe444 = 0x004001BC,
+ LedStripe445 = 0x004001BD,
+ LedStripe446 = 0x004001BE,
+ LedStripe447 = 0x004001BF,
+ LedStripe448 = 0x004001C0,
+ LedStripe449 = 0x004001C1,
+ LedStripe450 = 0x004001C2,
+ LedStripe451 = 0x004001C3,
+ LedStripe452 = 0x004001C4,
+ LedStripe453 = 0x004001C5,
+ LedStripe454 = 0x004001C6,
+ LedStripe455 = 0x004001C7,
+ LedStripe456 = 0x004001C8,
+ LedStripe457 = 0x004001C9,
+ LedStripe458 = 0x004001CA,
+ LedStripe459 = 0x004001CB,
+ LedStripe460 = 0x004001CC,
+ LedStripe461 = 0x004001CD,
+ LedStripe462 = 0x004001CE,
+ LedStripe463 = 0x004001CF,
+ LedStripe464 = 0x004001D0,
+ LedStripe465 = 0x004001D1,
+ LedStripe466 = 0x004001D2,
+ LedStripe467 = 0x004001D3,
+ LedStripe468 = 0x004001D4,
+ LedStripe469 = 0x004001D5,
+ LedStripe470 = 0x004001D6,
+ LedStripe471 = 0x004001D7,
+ LedStripe472 = 0x004001D8,
+ LedStripe473 = 0x004001D9,
+ LedStripe474 = 0x004001DA,
+ LedStripe475 = 0x004001DB,
+ LedStripe476 = 0x004001DC,
+ LedStripe477 = 0x004001DD,
+ LedStripe478 = 0x004001DE,
+ LedStripe479 = 0x004001DF,
+ LedStripe480 = 0x004001E0,
+ LedStripe481 = 0x004001E1,
+ LedStripe482 = 0x004001E2,
+ LedStripe483 = 0x004001E3,
+ LedStripe484 = 0x004001E4,
+ LedStripe485 = 0x004001E5,
+ LedStripe486 = 0x004001E6,
+ LedStripe487 = 0x004001E7,
+ LedStripe488 = 0x004001E8,
+ LedStripe489 = 0x004001E9,
+ LedStripe490 = 0x004001EA,
+ LedStripe491 = 0x004001EB,
+ LedStripe492 = 0x004001EC,
+ LedStripe493 = 0x004001ED,
+ LedStripe494 = 0x004001EE,
+ LedStripe495 = 0x004001EF,
+ LedStripe496 = 0x004001F0,
+ LedStripe497 = 0x004001F1,
+ LedStripe498 = 0x004001F2,
+ LedStripe499 = 0x004001F3,
+ LedStripe500 = 0x004001F4,
+ LedStripe501 = 0x004001F5,
+ LedStripe502 = 0x004001F6,
+ LedStripe503 = 0x004001F7,
+ LedStripe504 = 0x004001F8,
+ LedStripe505 = 0x004001F9,
+ LedStripe506 = 0x004001FA,
+ LedStripe507 = 0x004001FB,
+ LedStripe508 = 0x004001FC,
+ LedStripe509 = 0x004001FD,
+ LedStripe510 = 0x004001FE,
+ LedStripe511 = 0x004001FF,
+ LedStripe512 = 0x00400200,
+ LedStripe513 = 0x00400201,
+ LedStripe514 = 0x00400202,
+ LedStripe515 = 0x00400203,
+ LedStripe516 = 0x00400204,
+ LedStripe517 = 0x00400205,
+ LedStripe518 = 0x00400206,
+ LedStripe519 = 0x00400207,
+ LedStripe520 = 0x00400208,
+ LedStripe521 = 0x00400209,
+ LedStripe522 = 0x0040020A,
+ LedStripe523 = 0x0040020B,
+ LedStripe524 = 0x0040020C,
+ LedStripe525 = 0x0040020D,
+ LedStripe526 = 0x0040020E,
+ LedStripe527 = 0x0040020F,
+ LedStripe528 = 0x00400210,
+ LedStripe529 = 0x00400211,
+ LedStripe530 = 0x00400212,
+ LedStripe531 = 0x00400213,
+ LedStripe532 = 0x00400214,
+ LedStripe533 = 0x00400215,
+ LedStripe534 = 0x00400216,
+ LedStripe535 = 0x00400217,
+ LedStripe536 = 0x00400218,
+ LedStripe537 = 0x00400219,
+ LedStripe538 = 0x0040021A,
+ LedStripe539 = 0x0040021B,
+ LedStripe540 = 0x0040021C,
+ LedStripe541 = 0x0040021D,
+ LedStripe542 = 0x0040021E,
+ LedStripe543 = 0x0040021F,
+ LedStripe544 = 0x00400220,
+ LedStripe545 = 0x00400221,
+ LedStripe546 = 0x00400222,
+ LedStripe547 = 0x00400223,
+ LedStripe548 = 0x00400224,
+ LedStripe549 = 0x00400225,
+ LedStripe550 = 0x00400226,
+ LedStripe551 = 0x00400227,
+ LedStripe552 = 0x00400228,
+ LedStripe553 = 0x00400229,
+ LedStripe554 = 0x0040022A,
+ LedStripe555 = 0x0040022B,
+ LedStripe556 = 0x0040022C,
+ LedStripe557 = 0x0040022D,
+ LedStripe558 = 0x0040022E,
+ LedStripe559 = 0x0040022F,
+ LedStripe560 = 0x00400230,
+ LedStripe561 = 0x00400231,
+ LedStripe562 = 0x00400232,
+ LedStripe563 = 0x00400233,
+ LedStripe564 = 0x00400234,
+ LedStripe565 = 0x00400235,
+ LedStripe566 = 0x00400236,
+ LedStripe567 = 0x00400237,
+ LedStripe568 = 0x00400238,
+ LedStripe569 = 0x00400239,
+ LedStripe570 = 0x0040023A,
+ LedStripe571 = 0x0040023B,
+ LedStripe572 = 0x0040023C,
+ LedStripe573 = 0x0040023D,
+ LedStripe574 = 0x0040023E,
+ LedStripe575 = 0x0040023F,
+ LedStripe576 = 0x00400240,
+ LedStripe577 = 0x00400241,
+ LedStripe578 = 0x00400242,
+ LedStripe579 = 0x00400243,
+ LedStripe580 = 0x00400244,
+ LedStripe581 = 0x00400245,
+ LedStripe582 = 0x00400246,
+ LedStripe583 = 0x00400247,
+ LedStripe584 = 0x00400248,
+ LedStripe585 = 0x00400249,
+ LedStripe586 = 0x0040024A,
+ LedStripe587 = 0x0040024B,
+ LedStripe588 = 0x0040024C,
+ LedStripe589 = 0x0040024D,
+ LedStripe590 = 0x0040024E,
+ LedStripe591 = 0x0040024F,
+ LedStripe592 = 0x00400250,
+ LedStripe593 = 0x00400251,
+ LedStripe594 = 0x00400252,
+ LedStripe595 = 0x00400253,
+ LedStripe596 = 0x00400254,
+ LedStripe597 = 0x00400255,
+ LedStripe598 = 0x00400256,
+ LedStripe599 = 0x00400257,
+ LedStripe600 = 0x00400258,
+ LedStripe601 = 0x00400259,
+ LedStripe602 = 0x0040025A,
+ LedStripe603 = 0x0040025B,
+ LedStripe604 = 0x0040025C,
+ LedStripe605 = 0x0040025D,
+ LedStripe606 = 0x0040025E,
+ LedStripe607 = 0x0040025F,
+ LedStripe608 = 0x00400260,
+ LedStripe609 = 0x00400261,
+ LedStripe610 = 0x00400262,
+ LedStripe611 = 0x00400263,
+ LedStripe612 = 0x00400264,
+ LedStripe613 = 0x00400265,
+ LedStripe614 = 0x00400266,
+ LedStripe615 = 0x00400267,
+ LedStripe616 = 0x00400268,
+ LedStripe617 = 0x00400269,
+ LedStripe618 = 0x0040026A,
+ LedStripe619 = 0x0040026B,
+ LedStripe620 = 0x0040026C,
+ LedStripe621 = 0x0040026D,
+ LedStripe622 = 0x0040026E,
+ LedStripe623 = 0x0040026F,
+ LedStripe624 = 0x00400270,
+ LedStripe625 = 0x00400271,
+ LedStripe626 = 0x00400272,
+ LedStripe627 = 0x00400273,
+ LedStripe628 = 0x00400274,
+ LedStripe629 = 0x00400275,
+ LedStripe630 = 0x00400276,
+ LedStripe631 = 0x00400277,
+ LedStripe632 = 0x00400278,
+ LedStripe633 = 0x00400279,
+ LedStripe634 = 0x0040027A,
+ LedStripe635 = 0x0040027B,
+ LedStripe636 = 0x0040027C,
+ LedStripe637 = 0x0040027D,
+ LedStripe638 = 0x0040027E,
+ LedStripe639 = 0x0040027F,
+ LedStripe640 = 0x00400280,
+ LedStripe641 = 0x00400281,
+ LedStripe642 = 0x00400282,
+ LedStripe643 = 0x00400283,
+ LedStripe644 = 0x00400284,
+ LedStripe645 = 0x00400285,
+ LedStripe646 = 0x00400286,
+ LedStripe647 = 0x00400287,
+ LedStripe648 = 0x00400288,
+ LedStripe649 = 0x00400289,
+ LedStripe650 = 0x0040028A,
+ LedStripe651 = 0x0040028B,
+ LedStripe652 = 0x0040028C,
+ LedStripe653 = 0x0040028D,
+ LedStripe654 = 0x0040028E,
+ LedStripe655 = 0x0040028F,
+ LedStripe656 = 0x00400290,
+ LedStripe657 = 0x00400291,
+ LedStripe658 = 0x00400292,
+ LedStripe659 = 0x00400293,
+ LedStripe660 = 0x00400294,
+ LedStripe661 = 0x00400295,
+ LedStripe662 = 0x00400296,
+ LedStripe663 = 0x00400297,
+ LedStripe664 = 0x00400298,
+ LedStripe665 = 0x00400299,
+ LedStripe666 = 0x0040029A,
+ LedStripe667 = 0x0040029B,
+ LedStripe668 = 0x0040029C,
+ LedStripe669 = 0x0040029D,
+ LedStripe670 = 0x0040029E,
+ LedStripe671 = 0x0040029F,
+ LedStripe672 = 0x004002A0,
+ LedStripe673 = 0x004002A1,
+ LedStripe674 = 0x004002A2,
+ LedStripe675 = 0x004002A3,
+ LedStripe676 = 0x004002A4,
+ LedStripe677 = 0x004002A5,
+ LedStripe678 = 0x004002A6,
+ LedStripe679 = 0x004002A7,
+ LedStripe680 = 0x004002A8,
+ LedStripe681 = 0x004002A9,
+ LedStripe682 = 0x004002AA,
+ LedStripe683 = 0x004002AB,
+ LedStripe684 = 0x004002AC,
+ LedStripe685 = 0x004002AD,
+ LedStripe686 = 0x004002AE,
+ LedStripe687 = 0x004002AF,
+ LedStripe688 = 0x004002B0,
+ LedStripe689 = 0x004002B1,
+ LedStripe690 = 0x004002B2,
+ LedStripe691 = 0x004002B3,
+ LedStripe692 = 0x004002B4,
+ LedStripe693 = 0x004002B5,
+ LedStripe694 = 0x004002B6,
+ LedStripe695 = 0x004002B7,
+ LedStripe696 = 0x004002B8,
+ LedStripe697 = 0x004002B9,
+ LedStripe698 = 0x004002BA,
+ LedStripe699 = 0x004002BB,
+ LedStripe700 = 0x004002BC,
+ LedStripe701 = 0x004002BD,
+ LedStripe702 = 0x004002BE,
+ LedStripe703 = 0x004002BF,
+ LedStripe704 = 0x004002C0,
+ LedStripe705 = 0x004002C1,
+ LedStripe706 = 0x004002C2,
+ LedStripe707 = 0x004002C3,
+ LedStripe708 = 0x004002C4,
+ LedStripe709 = 0x004002C5,
+ LedStripe710 = 0x004002C6,
+ LedStripe711 = 0x004002C7,
+ LedStripe712 = 0x004002C8,
+ LedStripe713 = 0x004002C9,
+ LedStripe714 = 0x004002CA,
+ LedStripe715 = 0x004002CB,
+ LedStripe716 = 0x004002CC,
+ LedStripe717 = 0x004002CD,
+ LedStripe718 = 0x004002CE,
+ LedStripe719 = 0x004002CF,
+ LedStripe720 = 0x004002D0,
+ LedStripe721 = 0x004002D1,
+ LedStripe722 = 0x004002D2,
+ LedStripe723 = 0x004002D3,
+ LedStripe724 = 0x004002D4,
+ LedStripe725 = 0x004002D5,
+ LedStripe726 = 0x004002D6,
+ LedStripe727 = 0x004002D7,
+ LedStripe728 = 0x004002D8,
+ LedStripe729 = 0x004002D9,
+ LedStripe730 = 0x004002DA,
+ LedStripe731 = 0x004002DB,
+ LedStripe732 = 0x004002DC,
+ LedStripe733 = 0x004002DD,
+ LedStripe734 = 0x004002DE,
+ LedStripe735 = 0x004002DF,
+ LedStripe736 = 0x004002E0,
+ LedStripe737 = 0x004002E1,
+ LedStripe738 = 0x004002E2,
+ LedStripe739 = 0x004002E3,
+ LedStripe740 = 0x004002E4,
+ LedStripe741 = 0x004002E5,
+ LedStripe742 = 0x004002E6,
+ LedStripe743 = 0x004002E7,
+ LedStripe744 = 0x004002E8,
+ LedStripe745 = 0x004002E9,
+ LedStripe746 = 0x004002EA,
+ LedStripe747 = 0x004002EB,
+ LedStripe748 = 0x004002EC,
+ LedStripe749 = 0x004002ED,
+ LedStripe750 = 0x004002EE,
+ LedStripe751 = 0x004002EF,
+ LedStripe752 = 0x004002F0,
+ LedStripe753 = 0x004002F1,
+ LedStripe754 = 0x004002F2,
+ LedStripe755 = 0x004002F3,
+ LedStripe756 = 0x004002F4,
+ LedStripe757 = 0x004002F5,
+ LedStripe758 = 0x004002F6,
+ LedStripe759 = 0x004002F7,
+ LedStripe760 = 0x004002F8,
+ LedStripe761 = 0x004002F9,
+ LedStripe762 = 0x004002FA,
+ LedStripe763 = 0x004002FB,
+ LedStripe764 = 0x004002FC,
+ LedStripe765 = 0x004002FD,
+ LedStripe766 = 0x004002FE,
+ LedStripe767 = 0x004002FF,
+ LedStripe768 = 0x00400300,
+ LedStripe769 = 0x00400301,
+ LedStripe770 = 0x00400302,
+ LedStripe771 = 0x00400303,
+ LedStripe772 = 0x00400304,
+ LedStripe773 = 0x00400305,
+ LedStripe774 = 0x00400306,
+ LedStripe775 = 0x00400307,
+ LedStripe776 = 0x00400308,
+ LedStripe777 = 0x00400309,
+ LedStripe778 = 0x0040030A,
+ LedStripe779 = 0x0040030B,
+ LedStripe780 = 0x0040030C,
+ LedStripe781 = 0x0040030D,
+ LedStripe782 = 0x0040030E,
+ LedStripe783 = 0x0040030F,
+ LedStripe784 = 0x00400310,
+ LedStripe785 = 0x00400311,
+ LedStripe786 = 0x00400312,
+ LedStripe787 = 0x00400313,
+ LedStripe788 = 0x00400314,
+ LedStripe789 = 0x00400315,
+ LedStripe790 = 0x00400316,
+ LedStripe791 = 0x00400317,
+ LedStripe792 = 0x00400318,
+ LedStripe793 = 0x00400319,
+ LedStripe794 = 0x0040031A,
+ LedStripe795 = 0x0040031B,
+ LedStripe796 = 0x0040031C,
+ LedStripe797 = 0x0040031D,
+ LedStripe798 = 0x0040031E,
+ LedStripe799 = 0x0040031F,
+ LedStripe800 = 0x00400320,
+ LedStripe801 = 0x00400321,
+ LedStripe802 = 0x00400322,
+ LedStripe803 = 0x00400323,
+ LedStripe804 = 0x00400324,
+ LedStripe805 = 0x00400325,
+ LedStripe806 = 0x00400326,
+ LedStripe807 = 0x00400327,
+ LedStripe808 = 0x00400328,
+ LedStripe809 = 0x00400329,
+ LedStripe810 = 0x0040032A,
+ LedStripe811 = 0x0040032B,
+ LedStripe812 = 0x0040032C,
+ LedStripe813 = 0x0040032D,
+ LedStripe814 = 0x0040032E,
+ LedStripe815 = 0x0040032F,
+ LedStripe816 = 0x00400330,
+ LedStripe817 = 0x00400331,
+ LedStripe818 = 0x00400332,
+ LedStripe819 = 0x00400333,
+ LedStripe820 = 0x00400334,
+ LedStripe821 = 0x00400335,
+ LedStripe822 = 0x00400336,
+ LedStripe823 = 0x00400337,
+ LedStripe824 = 0x00400338,
+ LedStripe825 = 0x00400339,
+ LedStripe826 = 0x0040033A,
+ LedStripe827 = 0x0040033B,
+ LedStripe828 = 0x0040033C,
+ LedStripe829 = 0x0040033D,
+ LedStripe830 = 0x0040033E,
+ LedStripe831 = 0x0040033F,
+ LedStripe832 = 0x00400340,
+ LedStripe833 = 0x00400341,
+ LedStripe834 = 0x00400342,
+ LedStripe835 = 0x00400343,
+ LedStripe836 = 0x00400344,
+ LedStripe837 = 0x00400345,
+ LedStripe838 = 0x00400346,
+ LedStripe839 = 0x00400347,
+ LedStripe840 = 0x00400348,
+ LedStripe841 = 0x00400349,
+ LedStripe842 = 0x0040034A,
+ LedStripe843 = 0x0040034B,
+ LedStripe844 = 0x0040034C,
+ LedStripe845 = 0x0040034D,
+ LedStripe846 = 0x0040034E,
+ LedStripe847 = 0x0040034F,
+ LedStripe848 = 0x00400350,
+ LedStripe849 = 0x00400351,
+ LedStripe850 = 0x00400352,
+ LedStripe851 = 0x00400353,
+ LedStripe852 = 0x00400354,
+ LedStripe853 = 0x00400355,
+ LedStripe854 = 0x00400356,
+ LedStripe855 = 0x00400357,
+ LedStripe856 = 0x00400358,
+ LedStripe857 = 0x00400359,
+ LedStripe858 = 0x0040035A,
+ LedStripe859 = 0x0040035B,
+ LedStripe860 = 0x0040035C,
+ LedStripe861 = 0x0040035D,
+ LedStripe862 = 0x0040035E,
+ LedStripe863 = 0x0040035F,
+ LedStripe864 = 0x00400360,
+ LedStripe865 = 0x00400361,
+ LedStripe866 = 0x00400362,
+ LedStripe867 = 0x00400363,
+ LedStripe868 = 0x00400364,
+ LedStripe869 = 0x00400365,
+ LedStripe870 = 0x00400366,
+ LedStripe871 = 0x00400367,
+ LedStripe872 = 0x00400368,
+ LedStripe873 = 0x00400369,
+ LedStripe874 = 0x0040036A,
+ LedStripe875 = 0x0040036B,
+ LedStripe876 = 0x0040036C,
+ LedStripe877 = 0x0040036D,
+ LedStripe878 = 0x0040036E,
+ LedStripe879 = 0x0040036F,
+ LedStripe880 = 0x00400370,
+ LedStripe881 = 0x00400371,
+ LedStripe882 = 0x00400372,
+ LedStripe883 = 0x00400373,
+ LedStripe884 = 0x00400374,
+ LedStripe885 = 0x00400375,
+ LedStripe886 = 0x00400376,
+ LedStripe887 = 0x00400377,
+ LedStripe888 = 0x00400378,
+ LedStripe889 = 0x00400379,
+ LedStripe890 = 0x0040037A,
+ LedStripe891 = 0x0040037B,
+ LedStripe892 = 0x0040037C,
+ LedStripe893 = 0x0040037D,
+ LedStripe894 = 0x0040037E,
+ LedStripe895 = 0x0040037F,
+ LedStripe896 = 0x00400380,
+ LedStripe897 = 0x00400381,
+ LedStripe898 = 0x00400382,
+ LedStripe899 = 0x00400383,
+ LedStripe900 = 0x00400384,
+ LedStripe901 = 0x00400385,
+ LedStripe902 = 0x00400386,
+ LedStripe903 = 0x00400387,
+ LedStripe904 = 0x00400388,
+ LedStripe905 = 0x00400389,
+ LedStripe906 = 0x0040038A,
+ LedStripe907 = 0x0040038B,
+ LedStripe908 = 0x0040038C,
+ LedStripe909 = 0x0040038D,
+ LedStripe910 = 0x0040038E,
+ LedStripe911 = 0x0040038F,
+ LedStripe912 = 0x00400390,
+ LedStripe913 = 0x00400391,
+ LedStripe914 = 0x00400392,
+ LedStripe915 = 0x00400393,
+ LedStripe916 = 0x00400394,
+ LedStripe917 = 0x00400395,
+ LedStripe918 = 0x00400396,
+ LedStripe919 = 0x00400397,
+ LedStripe920 = 0x00400398,
+ LedStripe921 = 0x00400399,
+ LedStripe922 = 0x0040039A,
+ LedStripe923 = 0x0040039B,
+ LedStripe924 = 0x0040039C,
+ LedStripe925 = 0x0040039D,
+ LedStripe926 = 0x0040039E,
+ LedStripe927 = 0x0040039F,
+ LedStripe928 = 0x004003A0,
+ LedStripe929 = 0x004003A1,
+ LedStripe930 = 0x004003A2,
+ LedStripe931 = 0x004003A3,
+ LedStripe932 = 0x004003A4,
+ LedStripe933 = 0x004003A5,
+ LedStripe934 = 0x004003A6,
+ LedStripe935 = 0x004003A7,
+ LedStripe936 = 0x004003A8,
+ LedStripe937 = 0x004003A9,
+ LedStripe938 = 0x004003AA,
+ LedStripe939 = 0x004003AB,
+ LedStripe940 = 0x004003AC,
+ LedStripe941 = 0x004003AD,
+ LedStripe942 = 0x004003AE,
+ LedStripe943 = 0x004003AF,
+ LedStripe944 = 0x004003B0,
+ LedStripe945 = 0x004003B1,
+ LedStripe946 = 0x004003B2,
+ LedStripe947 = 0x004003B3,
+ LedStripe948 = 0x004003B4,
+ LedStripe949 = 0x004003B5,
+ LedStripe950 = 0x004003B6,
+ LedStripe951 = 0x004003B7,
+ LedStripe952 = 0x004003B8,
+ LedStripe953 = 0x004003B9,
+ LedStripe954 = 0x004003BA,
+ LedStripe955 = 0x004003BB,
+ LedStripe956 = 0x004003BC,
+ LedStripe957 = 0x004003BD,
+ LedStripe958 = 0x004003BE,
+ LedStripe959 = 0x004003BF,
+ LedStripe960 = 0x004003C0,
+ LedStripe961 = 0x004003C1,
+ LedStripe962 = 0x004003C2,
+ LedStripe963 = 0x004003C3,
+ LedStripe964 = 0x004003C4,
+ LedStripe965 = 0x004003C5,
+ LedStripe966 = 0x004003C6,
+ LedStripe967 = 0x004003C7,
+ LedStripe968 = 0x004003C8,
+ LedStripe969 = 0x004003C9,
+ LedStripe970 = 0x004003CA,
+ LedStripe971 = 0x004003CB,
+ LedStripe972 = 0x004003CC,
+ LedStripe973 = 0x004003CD,
+ LedStripe974 = 0x004003CE,
+ LedStripe975 = 0x004003CF,
+ LedStripe976 = 0x004003D0,
+ LedStripe977 = 0x004003D1,
+ LedStripe978 = 0x004003D2,
+ LedStripe979 = 0x004003D3,
+ LedStripe980 = 0x004003D4,
+ LedStripe981 = 0x004003D5,
+ LedStripe982 = 0x004003D6,
+ LedStripe983 = 0x004003D7,
+ LedStripe984 = 0x004003D8,
+ LedStripe985 = 0x004003D9,
+ LedStripe986 = 0x004003DA,
+ LedStripe987 = 0x004003DB,
+ LedStripe988 = 0x004003DC,
+ LedStripe989 = 0x004003DD,
+ LedStripe990 = 0x004003DE,
+ LedStripe991 = 0x004003DF,
+ LedStripe992 = 0x004003E0,
+ LedStripe993 = 0x004003E1,
+ LedStripe994 = 0x004003E2,
+ LedStripe995 = 0x004003E3,
+ LedStripe996 = 0x004003E4,
+ LedStripe997 = 0x004003E5,
+ LedStripe998 = 0x004003E6,
+ LedStripe999 = 0x004003E7,
+ LedStripe1000 = 0x004003E8,
+ LedStripe1001 = 0x004003E9,
+ LedStripe1002 = 0x004003EA,
+ LedStripe1003 = 0x004003EB,
+ LedStripe1004 = 0x004003EC,
+ LedStripe1005 = 0x004003ED,
+ LedStripe1006 = 0x004003EE,
+ LedStripe1007 = 0x004003EF,
+ LedStripe1008 = 0x004003F0,
+ LedStripe1009 = 0x004003F1,
+ LedStripe1010 = 0x004003F2,
+ LedStripe1011 = 0x004003F3,
+ LedStripe1012 = 0x004003F4,
+ LedStripe1013 = 0x004003F5,
+ LedStripe1014 = 0x004003F6,
+ LedStripe1015 = 0x004003F7,
+ LedStripe1016 = 0x004003F8,
+ LedStripe1017 = 0x004003F9,
+ LedStripe1018 = 0x004003FA,
+ LedStripe1019 = 0x004003FB,
+ LedStripe1020 = 0x004003FC,
+ LedStripe1021 = 0x004003FD,
+ LedStripe1022 = 0x004003FE,
+ LedStripe1023 = 0x004003FF,
+ LedStripe1024 = 0x00400400,
+ LedStripe1025 = 0x00400401,
+ LedStripe1026 = 0x00400402,
+ LedStripe1027 = 0x00400403,
+ LedStripe1028 = 0x00400404,
+ LedStripe1029 = 0x00400405,
+ LedStripe1030 = 0x00400406,
+ LedStripe1031 = 0x00400407,
+ LedStripe1032 = 0x00400408,
+ LedStripe1033 = 0x00400409,
+ LedStripe1034 = 0x0040040A,
+ LedStripe1035 = 0x0040040B,
+ LedStripe1036 = 0x0040040C,
+ LedStripe1037 = 0x0040040D,
+ LedStripe1038 = 0x0040040E,
+ LedStripe1039 = 0x0040040F,
+ LedStripe1040 = 0x00400410,
+ LedStripe1041 = 0x00400411,
+ LedStripe1042 = 0x00400412,
+ LedStripe1043 = 0x00400413,
+ LedStripe1044 = 0x00400414,
+ LedStripe1045 = 0x00400415,
+ LedStripe1046 = 0x00400416,
+ LedStripe1047 = 0x00400417,
+ LedStripe1048 = 0x00400418,
+ LedStripe1049 = 0x00400419,
+ LedStripe1050 = 0x0040041A,
+ LedStripe1051 = 0x0040041B,
+ LedStripe1052 = 0x0040041C,
+ LedStripe1053 = 0x0040041D,
+ LedStripe1054 = 0x0040041E,
+ LedStripe1055 = 0x0040041F,
+ LedStripe1056 = 0x00400420,
+ LedStripe1057 = 0x00400421,
+ LedStripe1058 = 0x00400422,
+ LedStripe1059 = 0x00400423,
+ LedStripe1060 = 0x00400424,
+ LedStripe1061 = 0x00400425,
+ LedStripe1062 = 0x00400426,
+ LedStripe1063 = 0x00400427,
+ LedStripe1064 = 0x00400428,
+ LedStripe1065 = 0x00400429,
+ LedStripe1066 = 0x0040042A,
+ LedStripe1067 = 0x0040042B,
+ LedStripe1068 = 0x0040042C,
+ LedStripe1069 = 0x0040042D,
+ LedStripe1070 = 0x0040042E,
+ LedStripe1071 = 0x0040042F,
+ LedStripe1072 = 0x00400430,
+ LedStripe1073 = 0x00400431,
+ LedStripe1074 = 0x00400432,
+ LedStripe1075 = 0x00400433,
+ LedStripe1076 = 0x00400434,
+ LedStripe1077 = 0x00400435,
+ LedStripe1078 = 0x00400436,
+ LedStripe1079 = 0x00400437,
+ LedStripe1080 = 0x00400438,
+ LedStripe1081 = 0x00400439,
+ LedStripe1082 = 0x0040043A,
+ LedStripe1083 = 0x0040043B,
+ LedStripe1084 = 0x0040043C,
+ LedStripe1085 = 0x0040043D,
+ LedStripe1086 = 0x0040043E,
+ LedStripe1087 = 0x0040043F,
+ LedStripe1088 = 0x00400440,
+ LedStripe1089 = 0x00400441,
+ LedStripe1090 = 0x00400442,
+ LedStripe1091 = 0x00400443,
+ LedStripe1092 = 0x00400444,
+ LedStripe1093 = 0x00400445,
+ LedStripe1094 = 0x00400446,
+ LedStripe1095 = 0x00400447,
+ LedStripe1096 = 0x00400448,
+ LedStripe1097 = 0x00400449,
+ LedStripe1098 = 0x0040044A,
+ LedStripe1099 = 0x0040044B,
+ LedStripe1100 = 0x0040044C,
+ LedStripe1101 = 0x0040044D,
+ LedStripe1102 = 0x0040044E,
+ LedStripe1103 = 0x0040044F,
+ LedStripe1104 = 0x00400450,
+ LedStripe1105 = 0x00400451,
+ LedStripe1106 = 0x00400452,
+ LedStripe1107 = 0x00400453,
+ LedStripe1108 = 0x00400454,
+ LedStripe1109 = 0x00400455,
+ LedStripe1110 = 0x00400456,
+ LedStripe1111 = 0x00400457,
+ LedStripe1112 = 0x00400458,
+ LedStripe1113 = 0x00400459,
+ LedStripe1114 = 0x0040045A,
+ LedStripe1115 = 0x0040045B,
+ LedStripe1116 = 0x0040045C,
+ LedStripe1117 = 0x0040045D,
+ LedStripe1118 = 0x0040045E,
+ LedStripe1119 = 0x0040045F,
+ LedStripe1120 = 0x00400460,
+ LedStripe1121 = 0x00400461,
+ LedStripe1122 = 0x00400462,
+ LedStripe1123 = 0x00400463,
+ LedStripe1124 = 0x00400464,
+ LedStripe1125 = 0x00400465,
+ LedStripe1126 = 0x00400466,
+ LedStripe1127 = 0x00400467,
+ LedStripe1128 = 0x00400468,
+ LedStripe1129 = 0x00400469,
+ LedStripe1130 = 0x0040046A,
+ LedStripe1131 = 0x0040046B,
+ LedStripe1132 = 0x0040046C,
+ LedStripe1133 = 0x0040046D,
+ LedStripe1134 = 0x0040046E,
+ LedStripe1135 = 0x0040046F,
+ LedStripe1136 = 0x00400470,
+ LedStripe1137 = 0x00400471,
+ LedStripe1138 = 0x00400472,
+ LedStripe1139 = 0x00400473,
+ LedStripe1140 = 0x00400474,
+ LedStripe1141 = 0x00400475,
+ LedStripe1142 = 0x00400476,
+ LedStripe1143 = 0x00400477,
+ LedStripe1144 = 0x00400478,
+ LedStripe1145 = 0x00400479,
+ LedStripe1146 = 0x0040047A,
+ LedStripe1147 = 0x0040047B,
+ LedStripe1148 = 0x0040047C,
+ LedStripe1149 = 0x0040047D,
+ LedStripe1150 = 0x0040047E,
+ LedStripe1151 = 0x0040047F,
+ LedStripe1152 = 0x00400480,
+ LedStripe1153 = 0x00400481,
+ LedStripe1154 = 0x00400482,
+ LedStripe1155 = 0x00400483,
+ LedStripe1156 = 0x00400484,
+ LedStripe1157 = 0x00400485,
+ LedStripe1158 = 0x00400486,
+ LedStripe1159 = 0x00400487,
+ LedStripe1160 = 0x00400488,
+ LedStripe1161 = 0x00400489,
+ LedStripe1162 = 0x0040048A,
+ LedStripe1163 = 0x0040048B,
+ LedStripe1164 = 0x0040048C,
+ LedStripe1165 = 0x0040048D,
+ LedStripe1166 = 0x0040048E,
+ LedStripe1167 = 0x0040048F,
+ LedStripe1168 = 0x00400490,
+ LedStripe1169 = 0x00400491,
+ LedStripe1170 = 0x00400492,
+ LedStripe1171 = 0x00400493,
+ LedStripe1172 = 0x00400494,
+ LedStripe1173 = 0x00400495,
+ LedStripe1174 = 0x00400496,
+ LedStripe1175 = 0x00400497,
+ LedStripe1176 = 0x00400498,
+ LedStripe1177 = 0x00400499,
+ LedStripe1178 = 0x0040049A,
+ LedStripe1179 = 0x0040049B,
+ LedStripe1180 = 0x0040049C,
+ LedStripe1181 = 0x0040049D,
+ LedStripe1182 = 0x0040049E,
+ LedStripe1183 = 0x0040049F,
+ LedStripe1184 = 0x004004A0,
+ LedStripe1185 = 0x004004A1,
+ LedStripe1186 = 0x004004A2,
+ LedStripe1187 = 0x004004A3,
+ LedStripe1188 = 0x004004A4,
+ LedStripe1189 = 0x004004A5,
+ LedStripe1190 = 0x004004A6,
+ LedStripe1191 = 0x004004A7,
+ LedStripe1192 = 0x004004A8,
+ LedStripe1193 = 0x004004A9,
+ LedStripe1194 = 0x004004AA,
+ LedStripe1195 = 0x004004AB,
+ LedStripe1196 = 0x004004AC,
+ LedStripe1197 = 0x004004AD,
+ LedStripe1198 = 0x004004AE,
+ LedStripe1199 = 0x004004AF,
+ LedStripe1200 = 0x004004B0,
+ LedStripe1201 = 0x004004B1,
+ LedStripe1202 = 0x004004B2,
+ LedStripe1203 = 0x004004B3,
+ LedStripe1204 = 0x004004B4,
+ LedStripe1205 = 0x004004B5,
+ LedStripe1206 = 0x004004B6,
+ LedStripe1207 = 0x004004B7,
+ LedStripe1208 = 0x004004B8,
+ LedStripe1209 = 0x004004B9,
+ LedStripe1210 = 0x004004BA,
+ LedStripe1211 = 0x004004BB,
+ LedStripe1212 = 0x004004BC,
+ LedStripe1213 = 0x004004BD,
+ LedStripe1214 = 0x004004BE,
+ LedStripe1215 = 0x004004BF,
+ LedStripe1216 = 0x004004C0,
+ LedStripe1217 = 0x004004C1,
+ LedStripe1218 = 0x004004C2,
+ LedStripe1219 = 0x004004C3,
+ LedStripe1220 = 0x004004C4,
+ LedStripe1221 = 0x004004C5,
+ LedStripe1222 = 0x004004C6,
+ LedStripe1223 = 0x004004C7,
+ LedStripe1224 = 0x004004C8,
+ LedStripe1225 = 0x004004C9,
+ LedStripe1226 = 0x004004CA,
+ LedStripe1227 = 0x004004CB,
+ LedStripe1228 = 0x004004CC,
+ LedStripe1229 = 0x004004CD,
+ LedStripe1230 = 0x004004CE,
+ LedStripe1231 = 0x004004CF,
+ LedStripe1232 = 0x004004D0,
+ LedStripe1233 = 0x004004D1,
+ LedStripe1234 = 0x004004D2,
+ LedStripe1235 = 0x004004D3,
+ LedStripe1236 = 0x004004D4,
+ LedStripe1237 = 0x004004D5,
+ LedStripe1238 = 0x004004D6,
+ LedStripe1239 = 0x004004D7,
+ LedStripe1240 = 0x004004D8,
+ LedStripe1241 = 0x004004D9,
+ LedStripe1242 = 0x004004DA,
+ LedStripe1243 = 0x004004DB,
+ LedStripe1244 = 0x004004DC,
+ LedStripe1245 = 0x004004DD,
+ LedStripe1246 = 0x004004DE,
+ LedStripe1247 = 0x004004DF,
+ LedStripe1248 = 0x004004E0,
+ LedStripe1249 = 0x004004E1,
+ LedStripe1250 = 0x004004E2,
+ LedStripe1251 = 0x004004E3,
+ LedStripe1252 = 0x004004E4,
+ LedStripe1253 = 0x004004E5,
+ LedStripe1254 = 0x004004E6,
+ LedStripe1255 = 0x004004E7,
+ LedStripe1256 = 0x004004E8,
+ LedStripe1257 = 0x004004E9,
+ LedStripe1258 = 0x004004EA,
+ LedStripe1259 = 0x004004EB,
+ LedStripe1260 = 0x004004EC,
+ LedStripe1261 = 0x004004ED,
+ LedStripe1262 = 0x004004EE,
+ LedStripe1263 = 0x004004EF,
+ LedStripe1264 = 0x004004F0,
+ LedStripe1265 = 0x004004F1,
+ LedStripe1266 = 0x004004F2,
+ LedStripe1267 = 0x004004F3,
+ LedStripe1268 = 0x004004F4,
+ LedStripe1269 = 0x004004F5,
+ LedStripe1270 = 0x004004F6,
+ LedStripe1271 = 0x004004F7,
+ LedStripe1272 = 0x004004F8,
+ LedStripe1273 = 0x004004F9,
+ LedStripe1274 = 0x004004FA,
+ LedStripe1275 = 0x004004FB,
+ LedStripe1276 = 0x004004FC,
+ LedStripe1277 = 0x004004FD,
+ LedStripe1278 = 0x004004FE,
+ LedStripe1279 = 0x004004FF,
+ LedStripe1280 = 0x00400500,
+ LedStripe1281 = 0x00400501,
+ LedStripe1282 = 0x00400502,
+ LedStripe1283 = 0x00400503,
+ LedStripe1284 = 0x00400504,
+ LedStripe1285 = 0x00400505,
+ LedStripe1286 = 0x00400506,
+ LedStripe1287 = 0x00400507,
+ LedStripe1288 = 0x00400508,
+ LedStripe1289 = 0x00400509,
+ LedStripe1290 = 0x0040050A,
+ LedStripe1291 = 0x0040050B,
+ LedStripe1292 = 0x0040050C,
+ LedStripe1293 = 0x0040050D,
+ LedStripe1294 = 0x0040050E,
+ LedStripe1295 = 0x0040050F,
+ LedStripe1296 = 0x00400510,
+ LedStripe1297 = 0x00400511,
+ LedStripe1298 = 0x00400512,
+ LedStripe1299 = 0x00400513,
+ LedStripe1300 = 0x00400514,
+ LedStripe1301 = 0x00400515,
+ LedStripe1302 = 0x00400516,
+ LedStripe1303 = 0x00400517,
+ LedStripe1304 = 0x00400518,
+ LedStripe1305 = 0x00400519,
+ LedStripe1306 = 0x0040051A,
+ LedStripe1307 = 0x0040051B,
+ LedStripe1308 = 0x0040051C,
+ LedStripe1309 = 0x0040051D,
+ LedStripe1310 = 0x0040051E,
+ LedStripe1311 = 0x0040051F,
+ LedStripe1312 = 0x00400520,
+ LedStripe1313 = 0x00400521,
+ LedStripe1314 = 0x00400522,
+ LedStripe1315 = 0x00400523,
+ LedStripe1316 = 0x00400524,
+ LedStripe1317 = 0x00400525,
+ LedStripe1318 = 0x00400526,
+ LedStripe1319 = 0x00400527,
+ LedStripe1320 = 0x00400528,
+ LedStripe1321 = 0x00400529,
+ LedStripe1322 = 0x0040052A,
+ LedStripe1323 = 0x0040052B,
+ LedStripe1324 = 0x0040052C,
+ LedStripe1325 = 0x0040052D,
+ LedStripe1326 = 0x0040052E,
+ LedStripe1327 = 0x0040052F,
+ LedStripe1328 = 0x00400530,
+ LedStripe1329 = 0x00400531,
+ LedStripe1330 = 0x00400532,
+ LedStripe1331 = 0x00400533,
+ LedStripe1332 = 0x00400534,
+ LedStripe1333 = 0x00400535,
+ LedStripe1334 = 0x00400536,
+ LedStripe1335 = 0x00400537,
+ LedStripe1336 = 0x00400538,
+ LedStripe1337 = 0x00400539,
+ LedStripe1338 = 0x0040053A,
+ LedStripe1339 = 0x0040053B,
+ LedStripe1340 = 0x0040053C,
+ LedStripe1341 = 0x0040053D,
+ LedStripe1342 = 0x0040053E,
+ LedStripe1343 = 0x0040053F,
+ LedStripe1344 = 0x00400540,
+ LedStripe1345 = 0x00400541,
+ LedStripe1346 = 0x00400542,
+ LedStripe1347 = 0x00400543,
+ LedStripe1348 = 0x00400544,
+ LedStripe1349 = 0x00400545,
+ LedStripe1350 = 0x00400546,
+ LedStripe1351 = 0x00400547,
+ LedStripe1352 = 0x00400548,
+ LedStripe1353 = 0x00400549,
+ LedStripe1354 = 0x0040054A,
+ LedStripe1355 = 0x0040054B,
+ LedStripe1356 = 0x0040054C,
+ LedStripe1357 = 0x0040054D,
+ LedStripe1358 = 0x0040054E,
+ LedStripe1359 = 0x0040054F,
+ LedStripe1360 = 0x00400550,
+ LedStripe1361 = 0x00400551,
+ LedStripe1362 = 0x00400552,
+ LedStripe1363 = 0x00400553,
+ LedStripe1364 = 0x00400554,
+ LedStripe1365 = 0x00400555,
+ LedStripe1366 = 0x00400556,
+ LedStripe1367 = 0x00400557,
+ LedStripe1368 = 0x00400558,
+ LedStripe1369 = 0x00400559,
+ LedStripe1370 = 0x0040055A,
+ LedStripe1371 = 0x0040055B,
+ LedStripe1372 = 0x0040055C,
+ LedStripe1373 = 0x0040055D,
+ LedStripe1374 = 0x0040055E,
+ LedStripe1375 = 0x0040055F,
+ LedStripe1376 = 0x00400560,
+ LedStripe1377 = 0x00400561,
+ LedStripe1378 = 0x00400562,
+ LedStripe1379 = 0x00400563,
+ LedStripe1380 = 0x00400564,
+ LedStripe1381 = 0x00400565,
+ LedStripe1382 = 0x00400566,
+ LedStripe1383 = 0x00400567,
+ LedStripe1384 = 0x00400568,
+ LedStripe1385 = 0x00400569,
+ LedStripe1386 = 0x0040056A,
+ LedStripe1387 = 0x0040056B,
+ LedStripe1388 = 0x0040056C,
+ LedStripe1389 = 0x0040056D,
+ LedStripe1390 = 0x0040056E,
+ LedStripe1391 = 0x0040056F,
+ LedStripe1392 = 0x00400570,
+ LedStripe1393 = 0x00400571,
+ LedStripe1394 = 0x00400572,
+ LedStripe1395 = 0x00400573,
+ LedStripe1396 = 0x00400574,
+ LedStripe1397 = 0x00400575,
+ LedStripe1398 = 0x00400576,
+ LedStripe1399 = 0x00400577,
+ LedStripe1400 = 0x00400578,
+ LedStripe1401 = 0x00400579,
+ LedStripe1402 = 0x0040057A,
+ LedStripe1403 = 0x0040057B,
+ LedStripe1404 = 0x0040057C,
+ LedStripe1405 = 0x0040057D,
+ LedStripe1406 = 0x0040057E,
+ LedStripe1407 = 0x0040057F,
+ LedStripe1408 = 0x00400580,
+ LedStripe1409 = 0x00400581,
+ LedStripe1410 = 0x00400582,
+ LedStripe1411 = 0x00400583,
+ LedStripe1412 = 0x00400584,
+ LedStripe1413 = 0x00400585,
+ LedStripe1414 = 0x00400586,
+ LedStripe1415 = 0x00400587,
+ LedStripe1416 = 0x00400588,
+ LedStripe1417 = 0x00400589,
+ LedStripe1418 = 0x0040058A,
+ LedStripe1419 = 0x0040058B,
+ LedStripe1420 = 0x0040058C,
+ LedStripe1421 = 0x0040058D,
+ LedStripe1422 = 0x0040058E,
+ LedStripe1423 = 0x0040058F,
+ LedStripe1424 = 0x00400590,
+ LedStripe1425 = 0x00400591,
+ LedStripe1426 = 0x00400592,
+ LedStripe1427 = 0x00400593,
+ LedStripe1428 = 0x00400594,
+ LedStripe1429 = 0x00400595,
+ LedStripe1430 = 0x00400596,
+ LedStripe1431 = 0x00400597,
+ LedStripe1432 = 0x00400598,
+ LedStripe1433 = 0x00400599,
+ LedStripe1434 = 0x0040059A,
+ LedStripe1435 = 0x0040059B,
+ LedStripe1436 = 0x0040059C,
+ LedStripe1437 = 0x0040059D,
+ LedStripe1438 = 0x0040059E,
+ LedStripe1439 = 0x0040059F,
+ LedStripe1440 = 0x004005A0,
+ LedStripe1441 = 0x004005A1,
+ LedStripe1442 = 0x004005A2,
+ LedStripe1443 = 0x004005A3,
+ LedStripe1444 = 0x004005A4,
+ LedStripe1445 = 0x004005A5,
+ LedStripe1446 = 0x004005A6,
+ LedStripe1447 = 0x004005A7,
+ LedStripe1448 = 0x004005A8,
+ LedStripe1449 = 0x004005A9,
+ LedStripe1450 = 0x004005AA,
+ LedStripe1451 = 0x004005AB,
+ LedStripe1452 = 0x004005AC,
+ LedStripe1453 = 0x004005AD,
+ LedStripe1454 = 0x004005AE,
+ LedStripe1455 = 0x004005AF,
+ LedStripe1456 = 0x004005B0,
+ LedStripe1457 = 0x004005B1,
+ LedStripe1458 = 0x004005B2,
+ LedStripe1459 = 0x004005B3,
+ LedStripe1460 = 0x004005B4,
+ LedStripe1461 = 0x004005B5,
+ LedStripe1462 = 0x004005B6,
+ LedStripe1463 = 0x004005B7,
+ LedStripe1464 = 0x004005B8,
+ LedStripe1465 = 0x004005B9,
+ LedStripe1466 = 0x004005BA,
+ LedStripe1467 = 0x004005BB,
+ LedStripe1468 = 0x004005BC,
+ LedStripe1469 = 0x004005BD,
+ LedStripe1470 = 0x004005BE,
+ LedStripe1471 = 0x004005BF,
+ LedStripe1472 = 0x004005C0,
+ LedStripe1473 = 0x004005C1,
+ LedStripe1474 = 0x004005C2,
+ LedStripe1475 = 0x004005C3,
+ LedStripe1476 = 0x004005C4,
+ LedStripe1477 = 0x004005C5,
+ LedStripe1478 = 0x004005C6,
+ LedStripe1479 = 0x004005C7,
+ LedStripe1480 = 0x004005C8,
+ LedStripe1481 = 0x004005C9,
+ LedStripe1482 = 0x004005CA,
+ LedStripe1483 = 0x004005CB,
+ LedStripe1484 = 0x004005CC,
+ LedStripe1485 = 0x004005CD,
+ LedStripe1486 = 0x004005CE,
+ LedStripe1487 = 0x004005CF,
+ LedStripe1488 = 0x004005D0,
+ LedStripe1489 = 0x004005D1,
+ LedStripe1490 = 0x004005D2,
+ LedStripe1491 = 0x004005D3,
+ LedStripe1492 = 0x004005D4,
+ LedStripe1493 = 0x004005D5,
+ LedStripe1494 = 0x004005D6,
+ LedStripe1495 = 0x004005D7,
+ LedStripe1496 = 0x004005D8,
+ LedStripe1497 = 0x004005D9,
+ LedStripe1498 = 0x004005DA,
+ LedStripe1499 = 0x004005DB,
+ LedStripe1500 = 0x004005DC,
+ LedStripe1501 = 0x004005DD,
+ LedStripe1502 = 0x004005DE,
+ LedStripe1503 = 0x004005DF,
+ LedStripe1504 = 0x004005E0,
+ LedStripe1505 = 0x004005E1,
+ LedStripe1506 = 0x004005E2,
+ LedStripe1507 = 0x004005E3,
+ LedStripe1508 = 0x004005E4,
+ LedStripe1509 = 0x004005E5,
+ LedStripe1510 = 0x004005E6,
+ LedStripe1511 = 0x004005E7,
+ LedStripe1512 = 0x004005E8,
+ LedStripe1513 = 0x004005E9,
+ LedStripe1514 = 0x004005EA,
+ LedStripe1515 = 0x004005EB,
+ LedStripe1516 = 0x004005EC,
+ LedStripe1517 = 0x004005ED,
+ LedStripe1518 = 0x004005EE,
+ LedStripe1519 = 0x004005EF,
+ LedStripe1520 = 0x004005F0,
+ LedStripe1521 = 0x004005F1,
+ LedStripe1522 = 0x004005F2,
+ LedStripe1523 = 0x004005F3,
+ LedStripe1524 = 0x004005F4,
+ LedStripe1525 = 0x004005F5,
+ LedStripe1526 = 0x004005F6,
+ LedStripe1527 = 0x004005F7,
+ LedStripe1528 = 0x004005F8,
+ LedStripe1529 = 0x004005F9,
+ LedStripe1530 = 0x004005FA,
+ LedStripe1531 = 0x004005FB,
+ LedStripe1532 = 0x004005FC,
+ LedStripe1533 = 0x004005FD,
+ LedStripe1534 = 0x004005FE,
+ LedStripe1535 = 0x004005FF,
+ LedStripe1536 = 0x00400600,
+ LedStripe1537 = 0x00400601,
+ LedStripe1538 = 0x00400602,
+ LedStripe1539 = 0x00400603,
+ LedStripe1540 = 0x00400604,
+ LedStripe1541 = 0x00400605,
+ LedStripe1542 = 0x00400606,
+ LedStripe1543 = 0x00400607,
+ LedStripe1544 = 0x00400608,
+ LedStripe1545 = 0x00400609,
+ LedStripe1546 = 0x0040060A,
+ LedStripe1547 = 0x0040060B,
+ LedStripe1548 = 0x0040060C,
+ LedStripe1549 = 0x0040060D,
+ LedStripe1550 = 0x0040060E,
+ LedStripe1551 = 0x0040060F,
+ LedStripe1552 = 0x00400610,
+ LedStripe1553 = 0x00400611,
+ LedStripe1554 = 0x00400612,
+ LedStripe1555 = 0x00400613,
+ LedStripe1556 = 0x00400614,
+ LedStripe1557 = 0x00400615,
+ LedStripe1558 = 0x00400616,
+ LedStripe1559 = 0x00400617,
+ LedStripe1560 = 0x00400618,
+ LedStripe1561 = 0x00400619,
+ LedStripe1562 = 0x0040061A,
+ LedStripe1563 = 0x0040061B,
+ LedStripe1564 = 0x0040061C,
+ LedStripe1565 = 0x0040061D,
+ LedStripe1566 = 0x0040061E,
+ LedStripe1567 = 0x0040061F,
+ LedStripe1568 = 0x00400620,
+ LedStripe1569 = 0x00400621,
+ LedStripe1570 = 0x00400622,
+ LedStripe1571 = 0x00400623,
+ LedStripe1572 = 0x00400624,
+ LedStripe1573 = 0x00400625,
+ LedStripe1574 = 0x00400626,
+ LedStripe1575 = 0x00400627,
+ LedStripe1576 = 0x00400628,
+ LedStripe1577 = 0x00400629,
+ LedStripe1578 = 0x0040062A,
+ LedStripe1579 = 0x0040062B,
+ LedStripe1580 = 0x0040062C,
+ LedStripe1581 = 0x0040062D,
+ LedStripe1582 = 0x0040062E,
+ LedStripe1583 = 0x0040062F,
+ LedStripe1584 = 0x00400630,
+ LedStripe1585 = 0x00400631,
+ LedStripe1586 = 0x00400632,
+ LedStripe1587 = 0x00400633,
+ LedStripe1588 = 0x00400634,
+ LedStripe1589 = 0x00400635,
+ LedStripe1590 = 0x00400636,
+ LedStripe1591 = 0x00400637,
+ LedStripe1592 = 0x00400638,
+ LedStripe1593 = 0x00400639,
+ LedStripe1594 = 0x0040063A,
+ LedStripe1595 = 0x0040063B,
+ LedStripe1596 = 0x0040063C,
+ LedStripe1597 = 0x0040063D,
+ LedStripe1598 = 0x0040063E,
+ LedStripe1599 = 0x0040063F,
+ LedStripe1600 = 0x00400640,
+ LedStripe1601 = 0x00400641,
+ LedStripe1602 = 0x00400642,
+ LedStripe1603 = 0x00400643,
+ LedStripe1604 = 0x00400644,
+ LedStripe1605 = 0x00400645,
+ LedStripe1606 = 0x00400646,
+ LedStripe1607 = 0x00400647,
+ LedStripe1608 = 0x00400648,
+ LedStripe1609 = 0x00400649,
+ LedStripe1610 = 0x0040064A,
+ LedStripe1611 = 0x0040064B,
+ LedStripe1612 = 0x0040064C,
+ LedStripe1613 = 0x0040064D,
+ LedStripe1614 = 0x0040064E,
+ LedStripe1615 = 0x0040064F,
+ LedStripe1616 = 0x00400650,
+ LedStripe1617 = 0x00400651,
+ LedStripe1618 = 0x00400652,
+ LedStripe1619 = 0x00400653,
+ LedStripe1620 = 0x00400654,
+ LedStripe1621 = 0x00400655,
+ LedStripe1622 = 0x00400656,
+ LedStripe1623 = 0x00400657,
+ LedStripe1624 = 0x00400658,
+ LedStripe1625 = 0x00400659,
+ LedStripe1626 = 0x0040065A,
+ LedStripe1627 = 0x0040065B,
+ LedStripe1628 = 0x0040065C,
+ LedStripe1629 = 0x0040065D,
+ LedStripe1630 = 0x0040065E,
+ LedStripe1631 = 0x0040065F,
+ LedStripe1632 = 0x00400660,
+ LedStripe1633 = 0x00400661,
+ LedStripe1634 = 0x00400662,
+ LedStripe1635 = 0x00400663,
+ LedStripe1636 = 0x00400664,
+ LedStripe1637 = 0x00400665,
+ LedStripe1638 = 0x00400666,
+ LedStripe1639 = 0x00400667,
+ LedStripe1640 = 0x00400668,
+ LedStripe1641 = 0x00400669,
+ LedStripe1642 = 0x0040066A,
+ LedStripe1643 = 0x0040066B,
+ LedStripe1644 = 0x0040066C,
+ LedStripe1645 = 0x0040066D,
+ LedStripe1646 = 0x0040066E,
+ LedStripe1647 = 0x0040066F,
+ LedStripe1648 = 0x00400670,
+ LedStripe1649 = 0x00400671,
+ LedStripe1650 = 0x00400672,
+ LedStripe1651 = 0x00400673,
+ LedStripe1652 = 0x00400674,
+ LedStripe1653 = 0x00400675,
+ LedStripe1654 = 0x00400676,
+ LedStripe1655 = 0x00400677,
+ LedStripe1656 = 0x00400678,
+ LedStripe1657 = 0x00400679,
+ LedStripe1658 = 0x0040067A,
+ LedStripe1659 = 0x0040067B,
+ LedStripe1660 = 0x0040067C,
+ LedStripe1661 = 0x0040067D,
+ LedStripe1662 = 0x0040067E,
+ LedStripe1663 = 0x0040067F,
+ LedStripe1664 = 0x00400680,
+ LedStripe1665 = 0x00400681,
+ LedStripe1666 = 0x00400682,
+ LedStripe1667 = 0x00400683,
+ LedStripe1668 = 0x00400684,
+ LedStripe1669 = 0x00400685,
+ LedStripe1670 = 0x00400686,
+ LedStripe1671 = 0x00400687,
+ LedStripe1672 = 0x00400688,
+ LedStripe1673 = 0x00400689,
+ LedStripe1674 = 0x0040068A,
+ LedStripe1675 = 0x0040068B,
+ LedStripe1676 = 0x0040068C,
+ LedStripe1677 = 0x0040068D,
+ LedStripe1678 = 0x0040068E,
+ LedStripe1679 = 0x0040068F,
+ LedStripe1680 = 0x00400690,
+ LedStripe1681 = 0x00400691,
+ LedStripe1682 = 0x00400692,
+ LedStripe1683 = 0x00400693,
+ LedStripe1684 = 0x00400694,
+ LedStripe1685 = 0x00400695,
+ LedStripe1686 = 0x00400696,
+ LedStripe1687 = 0x00400697,
+ LedStripe1688 = 0x00400698,
+ LedStripe1689 = 0x00400699,
+ LedStripe1690 = 0x0040069A,
+ LedStripe1691 = 0x0040069B,
+ LedStripe1692 = 0x0040069C,
+ LedStripe1693 = 0x0040069D,
+ LedStripe1694 = 0x0040069E,
+ LedStripe1695 = 0x0040069F,
+ LedStripe1696 = 0x004006A0,
+ LedStripe1697 = 0x004006A1,
+ LedStripe1698 = 0x004006A2,
+ LedStripe1699 = 0x004006A3,
+ LedStripe1700 = 0x004006A4,
+ LedStripe1701 = 0x004006A5,
+ LedStripe1702 = 0x004006A6,
+ LedStripe1703 = 0x004006A7,
+ LedStripe1704 = 0x004006A8,
+ LedStripe1705 = 0x004006A9,
+ LedStripe1706 = 0x004006AA,
+ LedStripe1707 = 0x004006AB,
+ LedStripe1708 = 0x004006AC,
+ LedStripe1709 = 0x004006AD,
+ LedStripe1710 = 0x004006AE,
+ LedStripe1711 = 0x004006AF,
+ LedStripe1712 = 0x004006B0,
+ LedStripe1713 = 0x004006B1,
+ LedStripe1714 = 0x004006B2,
+ LedStripe1715 = 0x004006B3,
+ LedStripe1716 = 0x004006B4,
+ LedStripe1717 = 0x004006B5,
+ LedStripe1718 = 0x004006B6,
+ LedStripe1719 = 0x004006B7,
+ LedStripe1720 = 0x004006B8,
+ LedStripe1721 = 0x004006B9,
+ LedStripe1722 = 0x004006BA,
+ LedStripe1723 = 0x004006BB,
+ LedStripe1724 = 0x004006BC,
+ LedStripe1725 = 0x004006BD,
+ LedStripe1726 = 0x004006BE,
+ LedStripe1727 = 0x004006BF,
+ LedStripe1728 = 0x004006C0,
+ LedStripe1729 = 0x004006C1,
+ LedStripe1730 = 0x004006C2,
+ LedStripe1731 = 0x004006C3,
+ LedStripe1732 = 0x004006C4,
+ LedStripe1733 = 0x004006C5,
+ LedStripe1734 = 0x004006C6,
+ LedStripe1735 = 0x004006C7,
+ LedStripe1736 = 0x004006C8,
+ LedStripe1737 = 0x004006C9,
+ LedStripe1738 = 0x004006CA,
+ LedStripe1739 = 0x004006CB,
+ LedStripe1740 = 0x004006CC,
+ LedStripe1741 = 0x004006CD,
+ LedStripe1742 = 0x004006CE,
+ LedStripe1743 = 0x004006CF,
+ LedStripe1744 = 0x004006D0,
+ LedStripe1745 = 0x004006D1,
+ LedStripe1746 = 0x004006D2,
+ LedStripe1747 = 0x004006D3,
+ LedStripe1748 = 0x004006D4,
+ LedStripe1749 = 0x004006D5,
+ LedStripe1750 = 0x004006D6,
+ LedStripe1751 = 0x004006D7,
+ LedStripe1752 = 0x004006D8,
+ LedStripe1753 = 0x004006D9,
+ LedStripe1754 = 0x004006DA,
+ LedStripe1755 = 0x004006DB,
+ LedStripe1756 = 0x004006DC,
+ LedStripe1757 = 0x004006DD,
+ LedStripe1758 = 0x004006DE,
+ LedStripe1759 = 0x004006DF,
+ LedStripe1760 = 0x004006E0,
+ LedStripe1761 = 0x004006E1,
+ LedStripe1762 = 0x004006E2,
+ LedStripe1763 = 0x004006E3,
+ LedStripe1764 = 0x004006E4,
+ LedStripe1765 = 0x004006E5,
+ LedStripe1766 = 0x004006E6,
+ LedStripe1767 = 0x004006E7,
+ LedStripe1768 = 0x004006E8,
+ LedStripe1769 = 0x004006E9,
+ LedStripe1770 = 0x004006EA,
+ LedStripe1771 = 0x004006EB,
+ LedStripe1772 = 0x004006EC,
+ LedStripe1773 = 0x004006ED,
+ LedStripe1774 = 0x004006EE,
+ LedStripe1775 = 0x004006EF,
+ LedStripe1776 = 0x004006F0,
+ LedStripe1777 = 0x004006F1,
+ LedStripe1778 = 0x004006F2,
+ LedStripe1779 = 0x004006F3,
+ LedStripe1780 = 0x004006F4,
+ LedStripe1781 = 0x004006F5,
+ LedStripe1782 = 0x004006F6,
+ LedStripe1783 = 0x004006F7,
+ LedStripe1784 = 0x004006F8,
+ LedStripe1785 = 0x004006F9,
+ LedStripe1786 = 0x004006FA,
+ LedStripe1787 = 0x004006FB,
+ LedStripe1788 = 0x004006FC,
+ LedStripe1789 = 0x004006FD,
+ LedStripe1790 = 0x004006FE,
+ LedStripe1791 = 0x004006FF,
+ LedStripe1792 = 0x00400700,
+ LedStripe1793 = 0x00400701,
+ LedStripe1794 = 0x00400702,
+ LedStripe1795 = 0x00400703,
+ LedStripe1796 = 0x00400704,
+ LedStripe1797 = 0x00400705,
+ LedStripe1798 = 0x00400706,
+ LedStripe1799 = 0x00400707,
+ LedStripe1800 = 0x00400708,
+ LedStripe1801 = 0x00400709,
+ LedStripe1802 = 0x0040070A,
+ LedStripe1803 = 0x0040070B,
+ LedStripe1804 = 0x0040070C,
+ LedStripe1805 = 0x0040070D,
+ LedStripe1806 = 0x0040070E,
+ LedStripe1807 = 0x0040070F,
+ LedStripe1808 = 0x00400710,
+ LedStripe1809 = 0x00400711,
+ LedStripe1810 = 0x00400712,
+ LedStripe1811 = 0x00400713,
+ LedStripe1812 = 0x00400714,
+ LedStripe1813 = 0x00400715,
+ LedStripe1814 = 0x00400716,
+ LedStripe1815 = 0x00400717,
+ LedStripe1816 = 0x00400718,
+ LedStripe1817 = 0x00400719,
+ LedStripe1818 = 0x0040071A,
+ LedStripe1819 = 0x0040071B,
+ LedStripe1820 = 0x0040071C,
+ LedStripe1821 = 0x0040071D,
+ LedStripe1822 = 0x0040071E,
+ LedStripe1823 = 0x0040071F,
+ LedStripe1824 = 0x00400720,
+ LedStripe1825 = 0x00400721,
+ LedStripe1826 = 0x00400722,
+ LedStripe1827 = 0x00400723,
+ LedStripe1828 = 0x00400724,
+ LedStripe1829 = 0x00400725,
+ LedStripe1830 = 0x00400726,
+ LedStripe1831 = 0x00400727,
+ LedStripe1832 = 0x00400728,
+ LedStripe1833 = 0x00400729,
+ LedStripe1834 = 0x0040072A,
+ LedStripe1835 = 0x0040072B,
+ LedStripe1836 = 0x0040072C,
+ LedStripe1837 = 0x0040072D,
+ LedStripe1838 = 0x0040072E,
+ LedStripe1839 = 0x0040072F,
+ LedStripe1840 = 0x00400730,
+ LedStripe1841 = 0x00400731,
+ LedStripe1842 = 0x00400732,
+ LedStripe1843 = 0x00400733,
+ LedStripe1844 = 0x00400734,
+ LedStripe1845 = 0x00400735,
+ LedStripe1846 = 0x00400736,
+ LedStripe1847 = 0x00400737,
+ LedStripe1848 = 0x00400738,
+ LedStripe1849 = 0x00400739,
+ LedStripe1850 = 0x0040073A,
+ LedStripe1851 = 0x0040073B,
+ LedStripe1852 = 0x0040073C,
+ LedStripe1853 = 0x0040073D,
+ LedStripe1854 = 0x0040073E,
+ LedStripe1855 = 0x0040073F,
+ LedStripe1856 = 0x00400740,
+ LedStripe1857 = 0x00400741,
+ LedStripe1858 = 0x00400742,
+ LedStripe1859 = 0x00400743,
+ LedStripe1860 = 0x00400744,
+ LedStripe1861 = 0x00400745,
+ LedStripe1862 = 0x00400746,
+ LedStripe1863 = 0x00400747,
+ LedStripe1864 = 0x00400748,
+ LedStripe1865 = 0x00400749,
+ LedStripe1866 = 0x0040074A,
+ LedStripe1867 = 0x0040074B,
+ LedStripe1868 = 0x0040074C,
+ LedStripe1869 = 0x0040074D,
+ LedStripe1870 = 0x0040074E,
+ LedStripe1871 = 0x0040074F,
+ LedStripe1872 = 0x00400750,
+ LedStripe1873 = 0x00400751,
+ LedStripe1874 = 0x00400752,
+ LedStripe1875 = 0x00400753,
+ LedStripe1876 = 0x00400754,
+ LedStripe1877 = 0x00400755,
+ LedStripe1878 = 0x00400756,
+ LedStripe1879 = 0x00400757,
+ LedStripe1880 = 0x00400758,
+ LedStripe1881 = 0x00400759,
+ LedStripe1882 = 0x0040075A,
+ LedStripe1883 = 0x0040075B,
+ LedStripe1884 = 0x0040075C,
+ LedStripe1885 = 0x0040075D,
+ LedStripe1886 = 0x0040075E,
+ LedStripe1887 = 0x0040075F,
+ LedStripe1888 = 0x00400760,
+ LedStripe1889 = 0x00400761,
+ LedStripe1890 = 0x00400762,
+ LedStripe1891 = 0x00400763,
+ LedStripe1892 = 0x00400764,
+ LedStripe1893 = 0x00400765,
+ LedStripe1894 = 0x00400766,
+ LedStripe1895 = 0x00400767,
+ LedStripe1896 = 0x00400768,
+ LedStripe1897 = 0x00400769,
+ LedStripe1898 = 0x0040076A,
+ LedStripe1899 = 0x0040076B,
+ LedStripe1900 = 0x0040076C,
+ LedStripe1901 = 0x0040076D,
+ LedStripe1902 = 0x0040076E,
+ LedStripe1903 = 0x0040076F,
+ LedStripe1904 = 0x00400770,
+ LedStripe1905 = 0x00400771,
+ LedStripe1906 = 0x00400772,
+ LedStripe1907 = 0x00400773,
+ LedStripe1908 = 0x00400774,
+ LedStripe1909 = 0x00400775,
+ LedStripe1910 = 0x00400776,
+ LedStripe1911 = 0x00400777,
+ LedStripe1912 = 0x00400778,
+ LedStripe1913 = 0x00400779,
+ LedStripe1914 = 0x0040077A,
+ LedStripe1915 = 0x0040077B,
+ LedStripe1916 = 0x0040077C,
+ LedStripe1917 = 0x0040077D,
+ LedStripe1918 = 0x0040077E,
+ LedStripe1919 = 0x0040077F,
+ LedStripe1920 = 0x00400780,
+ LedStripe1921 = 0x00400781,
+ LedStripe1922 = 0x00400782,
+ LedStripe1923 = 0x00400783,
+ LedStripe1924 = 0x00400784,
+ LedStripe1925 = 0x00400785,
+ LedStripe1926 = 0x00400786,
+ LedStripe1927 = 0x00400787,
+ LedStripe1928 = 0x00400788,
+ LedStripe1929 = 0x00400789,
+ LedStripe1930 = 0x0040078A,
+ LedStripe1931 = 0x0040078B,
+ LedStripe1932 = 0x0040078C,
+ LedStripe1933 = 0x0040078D,
+ LedStripe1934 = 0x0040078E,
+ LedStripe1935 = 0x0040078F,
+ LedStripe1936 = 0x00400790,
+ LedStripe1937 = 0x00400791,
+ LedStripe1938 = 0x00400792,
+ LedStripe1939 = 0x00400793,
+ LedStripe1940 = 0x00400794,
+ LedStripe1941 = 0x00400795,
+ LedStripe1942 = 0x00400796,
+ LedStripe1943 = 0x00400797,
+ LedStripe1944 = 0x00400798,
+ LedStripe1945 = 0x00400799,
+ LedStripe1946 = 0x0040079A,
+ LedStripe1947 = 0x0040079B,
+ LedStripe1948 = 0x0040079C,
+ LedStripe1949 = 0x0040079D,
+ LedStripe1950 = 0x0040079E,
+ LedStripe1951 = 0x0040079F,
+ LedStripe1952 = 0x004007A0,
+ LedStripe1953 = 0x004007A1,
+ LedStripe1954 = 0x004007A2,
+ LedStripe1955 = 0x004007A3,
+ LedStripe1956 = 0x004007A4,
+ LedStripe1957 = 0x004007A5,
+ LedStripe1958 = 0x004007A6,
+ LedStripe1959 = 0x004007A7,
+ LedStripe1960 = 0x004007A8,
+ LedStripe1961 = 0x004007A9,
+ LedStripe1962 = 0x004007AA,
+ LedStripe1963 = 0x004007AB,
+ LedStripe1964 = 0x004007AC,
+ LedStripe1965 = 0x004007AD,
+ LedStripe1966 = 0x004007AE,
+ LedStripe1967 = 0x004007AF,
+ LedStripe1968 = 0x004007B0,
+ LedStripe1969 = 0x004007B1,
+ LedStripe1970 = 0x004007B2,
+ LedStripe1971 = 0x004007B3,
+ LedStripe1972 = 0x004007B4,
+ LedStripe1973 = 0x004007B5,
+ LedStripe1974 = 0x004007B6,
+ LedStripe1975 = 0x004007B7,
+ LedStripe1976 = 0x004007B8,
+ LedStripe1977 = 0x004007B9,
+ LedStripe1978 = 0x004007BA,
+ LedStripe1979 = 0x004007BB,
+ LedStripe1980 = 0x004007BC,
+ LedStripe1981 = 0x004007BD,
+ LedStripe1982 = 0x004007BE,
+ LedStripe1983 = 0x004007BF,
+ LedStripe1984 = 0x004007C0,
+ LedStripe1985 = 0x004007C1,
+ LedStripe1986 = 0x004007C2,
+ LedStripe1987 = 0x004007C3,
+ LedStripe1988 = 0x004007C4,
+ LedStripe1989 = 0x004007C5,
+ LedStripe1990 = 0x004007C6,
+ LedStripe1991 = 0x004007C7,
+ LedStripe1992 = 0x004007C8,
+ LedStripe1993 = 0x004007C9,
+ LedStripe1994 = 0x004007CA,
+ LedStripe1995 = 0x004007CB,
+ LedStripe1996 = 0x004007CC,
+ LedStripe1997 = 0x004007CD,
+ LedStripe1998 = 0x004007CE,
+ LedStripe1999 = 0x004007CF,
+ LedStripe2000 = 0x004007D0,
+ LedStripe2001 = 0x004007D1,
+ LedStripe2002 = 0x004007D2,
+ LedStripe2003 = 0x004007D3,
+ LedStripe2004 = 0x004007D4,
+ LedStripe2005 = 0x004007D5,
+ LedStripe2006 = 0x004007D6,
+ LedStripe2007 = 0x004007D7,
+ LedStripe2008 = 0x004007D8,
+ LedStripe2009 = 0x004007D9,
+ LedStripe2010 = 0x004007DA,
+ LedStripe2011 = 0x004007DB,
+ LedStripe2012 = 0x004007DC,
+ LedStripe2013 = 0x004007DD,
+ LedStripe2014 = 0x004007DE,
+ LedStripe2015 = 0x004007DF,
+ LedStripe2016 = 0x004007E0,
+ LedStripe2017 = 0x004007E1,
+ LedStripe2018 = 0x004007E2,
+ LedStripe2019 = 0x004007E3,
+ LedStripe2020 = 0x004007E4,
+ LedStripe2021 = 0x004007E5,
+ LedStripe2022 = 0x004007E6,
+ LedStripe2023 = 0x004007E7,
+ LedStripe2024 = 0x004007E8,
+ LedStripe2025 = 0x004007E9,
+ LedStripe2026 = 0x004007EA,
+ LedStripe2027 = 0x004007EB,
+ LedStripe2028 = 0x004007EC,
+ LedStripe2029 = 0x004007ED,
+ LedStripe2030 = 0x004007EE,
+ LedStripe2031 = 0x004007EF,
+ LedStripe2032 = 0x004007F0,
+ LedStripe2033 = 0x004007F1,
+ LedStripe2034 = 0x004007F2,
+ LedStripe2035 = 0x004007F3,
+ LedStripe2036 = 0x004007F4,
+ LedStripe2037 = 0x004007F5,
+ LedStripe2038 = 0x004007F6,
+ LedStripe2039 = 0x004007F7,
+ LedStripe2040 = 0x004007F8,
+ LedStripe2041 = 0x004007F9,
+ LedStripe2042 = 0x004007FA,
+ LedStripe2043 = 0x004007FB,
+ LedStripe2044 = 0x004007FC,
+ LedStripe2045 = 0x004007FD,
+ LedStripe2046 = 0x004007FE,
+ LedStripe2047 = 0x004007FF,
+ LedStripe2048 = 0x00400800,
- /*### LedStripe ###*/
- LedStripe1 = 0x00400001,
- LedStripe2 = 0x00400002,
- LedStripe3 = 0x00400003,
- LedStripe4 = 0x00400004,
- LedStripe5 = 0x00400005,
- LedStripe6 = 0x00400006,
- LedStripe7 = 0x00400007,
- LedStripe8 = 0x00400008,
- LedStripe9 = 0x00400009,
- LedStripe10 = 0x0040000A,
- LedStripe11 = 0x0040000B,
- LedStripe12 = 0x0040000C,
- LedStripe13 = 0x0040000D,
- LedStripe14 = 0x0040000E,
- LedStripe15 = 0x0040000F,
- LedStripe16 = 0x00400010,
- LedStripe17 = 0x00400011,
- LedStripe18 = 0x00400012,
- LedStripe19 = 0x00400013,
- LedStripe20 = 0x00400014,
- LedStripe21 = 0x00400015,
- LedStripe22 = 0x00400016,
- LedStripe23 = 0x00400017,
- LedStripe24 = 0x00400018,
- LedStripe25 = 0x00400019,
- LedStripe26 = 0x0040001A,
- LedStripe27 = 0x0040001B,
- LedStripe28 = 0x0040001C,
- LedStripe29 = 0x0040001D,
- LedStripe30 = 0x0040001E,
- LedStripe31 = 0x0040001F,
- LedStripe32 = 0x00400020,
- LedStripe33 = 0x00400021,
- LedStripe34 = 0x00400022,
- LedStripe35 = 0x00400023,
- LedStripe36 = 0x00400024,
- LedStripe37 = 0x00400025,
- LedStripe38 = 0x00400026,
- LedStripe39 = 0x00400027,
- LedStripe40 = 0x00400028,
- LedStripe41 = 0x00400029,
- LedStripe42 = 0x0040002A,
- LedStripe43 = 0x0040002B,
- LedStripe44 = 0x0040002C,
- LedStripe45 = 0x0040002D,
- LedStripe46 = 0x0040002E,
- LedStripe47 = 0x0040002F,
- LedStripe48 = 0x00400030,
- LedStripe49 = 0x00400031,
- LedStripe50 = 0x00400032,
- LedStripe51 = 0x00400033,
- LedStripe52 = 0x00400034,
- LedStripe53 = 0x00400035,
- LedStripe54 = 0x00400036,
- LedStripe55 = 0x00400037,
- LedStripe56 = 0x00400038,
- LedStripe57 = 0x00400039,
- LedStripe58 = 0x0040003A,
- LedStripe59 = 0x0040003B,
- LedStripe60 = 0x0040003C,
- LedStripe61 = 0x0040003D,
- LedStripe62 = 0x0040003E,
- LedStripe63 = 0x0040003F,
- LedStripe64 = 0x00400040,
- LedStripe65 = 0x00400041,
- LedStripe66 = 0x00400042,
- LedStripe67 = 0x00400043,
- LedStripe68 = 0x00400044,
- LedStripe69 = 0x00400045,
- LedStripe70 = 0x00400046,
- LedStripe71 = 0x00400047,
- LedStripe72 = 0x00400048,
- LedStripe73 = 0x00400049,
- LedStripe74 = 0x0040004A,
- LedStripe75 = 0x0040004B,
- LedStripe76 = 0x0040004C,
- LedStripe77 = 0x0040004D,
- LedStripe78 = 0x0040004E,
- LedStripe79 = 0x0040004F,
- LedStripe80 = 0x00400050,
- LedStripe81 = 0x00400051,
- LedStripe82 = 0x00400052,
- LedStripe83 = 0x00400053,
- LedStripe84 = 0x00400054,
- LedStripe85 = 0x00400055,
- LedStripe86 = 0x00400056,
- LedStripe87 = 0x00400057,
- LedStripe88 = 0x00400058,
- LedStripe89 = 0x00400059,
- LedStripe90 = 0x0040005A,
- LedStripe91 = 0x0040005B,
- LedStripe92 = 0x0040005C,
- LedStripe93 = 0x0040005D,
- LedStripe94 = 0x0040005E,
- LedStripe95 = 0x0040005F,
- LedStripe96 = 0x00400060,
- LedStripe97 = 0x00400061,
- LedStripe98 = 0x00400062,
- LedStripe99 = 0x00400063,
- LedStripe100 = 0x00400064,
- LedStripe101 = 0x00400065,
- LedStripe102 = 0x00400066,
- LedStripe103 = 0x00400067,
- LedStripe104 = 0x00400068,
- LedStripe105 = 0x00400069,
- LedStripe106 = 0x0040006A,
- LedStripe107 = 0x0040006B,
- LedStripe108 = 0x0040006C,
- LedStripe109 = 0x0040006D,
- LedStripe110 = 0x0040006E,
- LedStripe111 = 0x0040006F,
- LedStripe112 = 0x00400070,
- LedStripe113 = 0x00400071,
- LedStripe114 = 0x00400072,
- LedStripe115 = 0x00400073,
- LedStripe116 = 0x00400074,
- LedStripe117 = 0x00400075,
- LedStripe118 = 0x00400076,
- LedStripe119 = 0x00400077,
- LedStripe120 = 0x00400078,
- LedStripe121 = 0x00400079,
- LedStripe122 = 0x0040007A,
- LedStripe123 = 0x0040007B,
- LedStripe124 = 0x0040007C,
- LedStripe125 = 0x0040007D,
- LedStripe126 = 0x0040007E,
- LedStripe127 = 0x0040007F,
- LedStripe128 = 0x00400080,
+ /*### LedMatrix ###*/
+ LedMatrix1 = 0x00500001,
+ LedMatrix2 = 0x00500002,
+ LedMatrix3 = 0x00500003,
+ LedMatrix4 = 0x00500004,
+ LedMatrix5 = 0x00500005,
+ LedMatrix6 = 0x00500006,
+ LedMatrix7 = 0x00500007,
+ LedMatrix8 = 0x00500008,
+ LedMatrix9 = 0x00500009,
+ LedMatrix10 = 0x0050000A,
+ LedMatrix11 = 0x0050000B,
+ LedMatrix12 = 0x0050000C,
+ LedMatrix13 = 0x0050000D,
+ LedMatrix14 = 0x0050000E,
+ LedMatrix15 = 0x0050000F,
+ LedMatrix16 = 0x00500010,
+ LedMatrix17 = 0x00500011,
+ LedMatrix18 = 0x00500012,
+ LedMatrix19 = 0x00500013,
+ LedMatrix20 = 0x00500014,
+ LedMatrix21 = 0x00500015,
+ LedMatrix22 = 0x00500016,
+ LedMatrix23 = 0x00500017,
+ LedMatrix24 = 0x00500018,
+ LedMatrix25 = 0x00500019,
+ LedMatrix26 = 0x0050001A,
+ LedMatrix27 = 0x0050001B,
+ LedMatrix28 = 0x0050001C,
+ LedMatrix29 = 0x0050001D,
+ LedMatrix30 = 0x0050001E,
+ LedMatrix31 = 0x0050001F,
+ LedMatrix32 = 0x00500020,
+ LedMatrix33 = 0x00500021,
+ LedMatrix34 = 0x00500022,
+ LedMatrix35 = 0x00500023,
+ LedMatrix36 = 0x00500024,
+ LedMatrix37 = 0x00500025,
+ LedMatrix38 = 0x00500026,
+ LedMatrix39 = 0x00500027,
+ LedMatrix40 = 0x00500028,
+ LedMatrix41 = 0x00500029,
+ LedMatrix42 = 0x0050002A,
+ LedMatrix43 = 0x0050002B,
+ LedMatrix44 = 0x0050002C,
+ LedMatrix45 = 0x0050002D,
+ LedMatrix46 = 0x0050002E,
+ LedMatrix47 = 0x0050002F,
+ LedMatrix48 = 0x00500030,
+ LedMatrix49 = 0x00500031,
+ LedMatrix50 = 0x00500032,
+ LedMatrix51 = 0x00500033,
+ LedMatrix52 = 0x00500034,
+ LedMatrix53 = 0x00500035,
+ LedMatrix54 = 0x00500036,
+ LedMatrix55 = 0x00500037,
+ LedMatrix56 = 0x00500038,
+ LedMatrix57 = 0x00500039,
+ LedMatrix58 = 0x0050003A,
+ LedMatrix59 = 0x0050003B,
+ LedMatrix60 = 0x0050003C,
+ LedMatrix61 = 0x0050003D,
+ LedMatrix62 = 0x0050003E,
+ LedMatrix63 = 0x0050003F,
+ LedMatrix64 = 0x00500040,
+ LedMatrix65 = 0x00500041,
+ LedMatrix66 = 0x00500042,
+ LedMatrix67 = 0x00500043,
+ LedMatrix68 = 0x00500044,
+ LedMatrix69 = 0x00500045,
+ LedMatrix70 = 0x00500046,
+ LedMatrix71 = 0x00500047,
+ LedMatrix72 = 0x00500048,
+ LedMatrix73 = 0x00500049,
+ LedMatrix74 = 0x0050004A,
+ LedMatrix75 = 0x0050004B,
+ LedMatrix76 = 0x0050004C,
+ LedMatrix77 = 0x0050004D,
+ LedMatrix78 = 0x0050004E,
+ LedMatrix79 = 0x0050004F,
+ LedMatrix80 = 0x00500050,
+ LedMatrix81 = 0x00500051,
+ LedMatrix82 = 0x00500052,
+ LedMatrix83 = 0x00500053,
+ LedMatrix84 = 0x00500054,
+ LedMatrix85 = 0x00500055,
+ LedMatrix86 = 0x00500056,
+ LedMatrix87 = 0x00500057,
+ LedMatrix88 = 0x00500058,
+ LedMatrix89 = 0x00500059,
+ LedMatrix90 = 0x0050005A,
+ LedMatrix91 = 0x0050005B,
+ LedMatrix92 = 0x0050005C,
+ LedMatrix93 = 0x0050005D,
+ LedMatrix94 = 0x0050005E,
+ LedMatrix95 = 0x0050005F,
+ LedMatrix96 = 0x00500060,
+ LedMatrix97 = 0x00500061,
+ LedMatrix98 = 0x00500062,
+ LedMatrix99 = 0x00500063,
+ LedMatrix100 = 0x00500064,
+ LedMatrix101 = 0x00500065,
+ LedMatrix102 = 0x00500066,
+ LedMatrix103 = 0x00500067,
+ LedMatrix104 = 0x00500068,
+ LedMatrix105 = 0x00500069,
+ LedMatrix106 = 0x0050006A,
+ LedMatrix107 = 0x0050006B,
+ LedMatrix108 = 0x0050006C,
+ LedMatrix109 = 0x0050006D,
+ LedMatrix110 = 0x0050006E,
+ LedMatrix111 = 0x0050006F,
+ LedMatrix112 = 0x00500070,
+ LedMatrix113 = 0x00500071,
+ LedMatrix114 = 0x00500072,
+ LedMatrix115 = 0x00500073,
+ LedMatrix116 = 0x00500074,
+ LedMatrix117 = 0x00500075,
+ LedMatrix118 = 0x00500076,
+ LedMatrix119 = 0x00500077,
+ LedMatrix120 = 0x00500078,
+ LedMatrix121 = 0x00500079,
+ LedMatrix122 = 0x0050007A,
+ LedMatrix123 = 0x0050007B,
+ LedMatrix124 = 0x0050007C,
+ LedMatrix125 = 0x0050007D,
+ LedMatrix126 = 0x0050007E,
+ LedMatrix127 = 0x0050007F,
+ LedMatrix128 = 0x00500080,
+ LedMatrix129 = 0x00500081,
+ LedMatrix130 = 0x00500082,
+ LedMatrix131 = 0x00500083,
+ LedMatrix132 = 0x00500084,
+ LedMatrix133 = 0x00500085,
+ LedMatrix134 = 0x00500086,
+ LedMatrix135 = 0x00500087,
+ LedMatrix136 = 0x00500088,
+ LedMatrix137 = 0x00500089,
+ LedMatrix138 = 0x0050008A,
+ LedMatrix139 = 0x0050008B,
+ LedMatrix140 = 0x0050008C,
+ LedMatrix141 = 0x0050008D,
+ LedMatrix142 = 0x0050008E,
+ LedMatrix143 = 0x0050008F,
+ LedMatrix144 = 0x00500090,
+ LedMatrix145 = 0x00500091,
+ LedMatrix146 = 0x00500092,
+ LedMatrix147 = 0x00500093,
+ LedMatrix148 = 0x00500094,
+ LedMatrix149 = 0x00500095,
+ LedMatrix150 = 0x00500096,
+ LedMatrix151 = 0x00500097,
+ LedMatrix152 = 0x00500098,
+ LedMatrix153 = 0x00500099,
+ LedMatrix154 = 0x0050009A,
+ LedMatrix155 = 0x0050009B,
+ LedMatrix156 = 0x0050009C,
+ LedMatrix157 = 0x0050009D,
+ LedMatrix158 = 0x0050009E,
+ LedMatrix159 = 0x0050009F,
+ LedMatrix160 = 0x005000A0,
+ LedMatrix161 = 0x005000A1,
+ LedMatrix162 = 0x005000A2,
+ LedMatrix163 = 0x005000A3,
+ LedMatrix164 = 0x005000A4,
+ LedMatrix165 = 0x005000A5,
+ LedMatrix166 = 0x005000A6,
+ LedMatrix167 = 0x005000A7,
+ LedMatrix168 = 0x005000A8,
+ LedMatrix169 = 0x005000A9,
+ LedMatrix170 = 0x005000AA,
+ LedMatrix171 = 0x005000AB,
+ LedMatrix172 = 0x005000AC,
+ LedMatrix173 = 0x005000AD,
+ LedMatrix174 = 0x005000AE,
+ LedMatrix175 = 0x005000AF,
+ LedMatrix176 = 0x005000B0,
+ LedMatrix177 = 0x005000B1,
+ LedMatrix178 = 0x005000B2,
+ LedMatrix179 = 0x005000B3,
+ LedMatrix180 = 0x005000B4,
+ LedMatrix181 = 0x005000B5,
+ LedMatrix182 = 0x005000B6,
+ LedMatrix183 = 0x005000B7,
+ LedMatrix184 = 0x005000B8,
+ LedMatrix185 = 0x005000B9,
+ LedMatrix186 = 0x005000BA,
+ LedMatrix187 = 0x005000BB,
+ LedMatrix188 = 0x005000BC,
+ LedMatrix189 = 0x005000BD,
+ LedMatrix190 = 0x005000BE,
+ LedMatrix191 = 0x005000BF,
+ LedMatrix192 = 0x005000C0,
+ LedMatrix193 = 0x005000C1,
+ LedMatrix194 = 0x005000C2,
+ LedMatrix195 = 0x005000C3,
+ LedMatrix196 = 0x005000C4,
+ LedMatrix197 = 0x005000C5,
+ LedMatrix198 = 0x005000C6,
+ LedMatrix199 = 0x005000C7,
+ LedMatrix200 = 0x005000C8,
+ LedMatrix201 = 0x005000C9,
+ LedMatrix202 = 0x005000CA,
+ LedMatrix203 = 0x005000CB,
+ LedMatrix204 = 0x005000CC,
+ LedMatrix205 = 0x005000CD,
+ LedMatrix206 = 0x005000CE,
+ LedMatrix207 = 0x005000CF,
+ LedMatrix208 = 0x005000D0,
+ LedMatrix209 = 0x005000D1,
+ LedMatrix210 = 0x005000D2,
+ LedMatrix211 = 0x005000D3,
+ LedMatrix212 = 0x005000D4,
+ LedMatrix213 = 0x005000D5,
+ LedMatrix214 = 0x005000D6,
+ LedMatrix215 = 0x005000D7,
+ LedMatrix216 = 0x005000D8,
+ LedMatrix217 = 0x005000D9,
+ LedMatrix218 = 0x005000DA,
+ LedMatrix219 = 0x005000DB,
+ LedMatrix220 = 0x005000DC,
+ LedMatrix221 = 0x005000DD,
+ LedMatrix222 = 0x005000DE,
+ LedMatrix223 = 0x005000DF,
+ LedMatrix224 = 0x005000E0,
+ LedMatrix225 = 0x005000E1,
+ LedMatrix226 = 0x005000E2,
+ LedMatrix227 = 0x005000E3,
+ LedMatrix228 = 0x005000E4,
+ LedMatrix229 = 0x005000E5,
+ LedMatrix230 = 0x005000E6,
+ LedMatrix231 = 0x005000E7,
+ LedMatrix232 = 0x005000E8,
+ LedMatrix233 = 0x005000E9,
+ LedMatrix234 = 0x005000EA,
+ LedMatrix235 = 0x005000EB,
+ LedMatrix236 = 0x005000EC,
+ LedMatrix237 = 0x005000ED,
+ LedMatrix238 = 0x005000EE,
+ LedMatrix239 = 0x005000EF,
+ LedMatrix240 = 0x005000F0,
+ LedMatrix241 = 0x005000F1,
+ LedMatrix242 = 0x005000F2,
+ LedMatrix243 = 0x005000F3,
+ LedMatrix244 = 0x005000F4,
+ LedMatrix245 = 0x005000F5,
+ LedMatrix246 = 0x005000F6,
+ LedMatrix247 = 0x005000F7,
+ LedMatrix248 = 0x005000F8,
+ LedMatrix249 = 0x005000F9,
+ LedMatrix250 = 0x005000FA,
+ LedMatrix251 = 0x005000FB,
+ LedMatrix252 = 0x005000FC,
+ LedMatrix253 = 0x005000FD,
+ LedMatrix254 = 0x005000FE,
+ LedMatrix255 = 0x005000FF,
+ LedMatrix256 = 0x00500100,
+ LedMatrix257 = 0x00500101,
+ LedMatrix258 = 0x00500102,
+ LedMatrix259 = 0x00500103,
+ LedMatrix260 = 0x00500104,
+ LedMatrix261 = 0x00500105,
+ LedMatrix262 = 0x00500106,
+ LedMatrix263 = 0x00500107,
+ LedMatrix264 = 0x00500108,
+ LedMatrix265 = 0x00500109,
+ LedMatrix266 = 0x0050010A,
+ LedMatrix267 = 0x0050010B,
+ LedMatrix268 = 0x0050010C,
+ LedMatrix269 = 0x0050010D,
+ LedMatrix270 = 0x0050010E,
+ LedMatrix271 = 0x0050010F,
+ LedMatrix272 = 0x00500110,
+ LedMatrix273 = 0x00500111,
+ LedMatrix274 = 0x00500112,
+ LedMatrix275 = 0x00500113,
+ LedMatrix276 = 0x00500114,
+ LedMatrix277 = 0x00500115,
+ LedMatrix278 = 0x00500116,
+ LedMatrix279 = 0x00500117,
+ LedMatrix280 = 0x00500118,
+ LedMatrix281 = 0x00500119,
+ LedMatrix282 = 0x0050011A,
+ LedMatrix283 = 0x0050011B,
+ LedMatrix284 = 0x0050011C,
+ LedMatrix285 = 0x0050011D,
+ LedMatrix286 = 0x0050011E,
+ LedMatrix287 = 0x0050011F,
+ LedMatrix288 = 0x00500120,
+ LedMatrix289 = 0x00500121,
+ LedMatrix290 = 0x00500122,
+ LedMatrix291 = 0x00500123,
+ LedMatrix292 = 0x00500124,
+ LedMatrix293 = 0x00500125,
+ LedMatrix294 = 0x00500126,
+ LedMatrix295 = 0x00500127,
+ LedMatrix296 = 0x00500128,
+ LedMatrix297 = 0x00500129,
+ LedMatrix298 = 0x0050012A,
+ LedMatrix299 = 0x0050012B,
+ LedMatrix300 = 0x0050012C,
+ LedMatrix301 = 0x0050012D,
+ LedMatrix302 = 0x0050012E,
+ LedMatrix303 = 0x0050012F,
+ LedMatrix304 = 0x00500130,
+ LedMatrix305 = 0x00500131,
+ LedMatrix306 = 0x00500132,
+ LedMatrix307 = 0x00500133,
+ LedMatrix308 = 0x00500134,
+ LedMatrix309 = 0x00500135,
+ LedMatrix310 = 0x00500136,
+ LedMatrix311 = 0x00500137,
+ LedMatrix312 = 0x00500138,
+ LedMatrix313 = 0x00500139,
+ LedMatrix314 = 0x0050013A,
+ LedMatrix315 = 0x0050013B,
+ LedMatrix316 = 0x0050013C,
+ LedMatrix317 = 0x0050013D,
+ LedMatrix318 = 0x0050013E,
+ LedMatrix319 = 0x0050013F,
+ LedMatrix320 = 0x00500140,
+ LedMatrix321 = 0x00500141,
+ LedMatrix322 = 0x00500142,
+ LedMatrix323 = 0x00500143,
+ LedMatrix324 = 0x00500144,
+ LedMatrix325 = 0x00500145,
+ LedMatrix326 = 0x00500146,
+ LedMatrix327 = 0x00500147,
+ LedMatrix328 = 0x00500148,
+ LedMatrix329 = 0x00500149,
+ LedMatrix330 = 0x0050014A,
+ LedMatrix331 = 0x0050014B,
+ LedMatrix332 = 0x0050014C,
+ LedMatrix333 = 0x0050014D,
+ LedMatrix334 = 0x0050014E,
+ LedMatrix335 = 0x0050014F,
+ LedMatrix336 = 0x00500150,
+ LedMatrix337 = 0x00500151,
+ LedMatrix338 = 0x00500152,
+ LedMatrix339 = 0x00500153,
+ LedMatrix340 = 0x00500154,
+ LedMatrix341 = 0x00500155,
+ LedMatrix342 = 0x00500156,
+ LedMatrix343 = 0x00500157,
+ LedMatrix344 = 0x00500158,
+ LedMatrix345 = 0x00500159,
+ LedMatrix346 = 0x0050015A,
+ LedMatrix347 = 0x0050015B,
+ LedMatrix348 = 0x0050015C,
+ LedMatrix349 = 0x0050015D,
+ LedMatrix350 = 0x0050015E,
+ LedMatrix351 = 0x0050015F,
+ LedMatrix352 = 0x00500160,
+ LedMatrix353 = 0x00500161,
+ LedMatrix354 = 0x00500162,
+ LedMatrix355 = 0x00500163,
+ LedMatrix356 = 0x00500164,
+ LedMatrix357 = 0x00500165,
+ LedMatrix358 = 0x00500166,
+ LedMatrix359 = 0x00500167,
+ LedMatrix360 = 0x00500168,
+ LedMatrix361 = 0x00500169,
+ LedMatrix362 = 0x0050016A,
+ LedMatrix363 = 0x0050016B,
+ LedMatrix364 = 0x0050016C,
+ LedMatrix365 = 0x0050016D,
+ LedMatrix366 = 0x0050016E,
+ LedMatrix367 = 0x0050016F,
+ LedMatrix368 = 0x00500170,
+ LedMatrix369 = 0x00500171,
+ LedMatrix370 = 0x00500172,
+ LedMatrix371 = 0x00500173,
+ LedMatrix372 = 0x00500174,
+ LedMatrix373 = 0x00500175,
+ LedMatrix374 = 0x00500176,
+ LedMatrix375 = 0x00500177,
+ LedMatrix376 = 0x00500178,
+ LedMatrix377 = 0x00500179,
+ LedMatrix378 = 0x0050017A,
+ LedMatrix379 = 0x0050017B,
+ LedMatrix380 = 0x0050017C,
+ LedMatrix381 = 0x0050017D,
+ LedMatrix382 = 0x0050017E,
+ LedMatrix383 = 0x0050017F,
+ LedMatrix384 = 0x00500180,
+ LedMatrix385 = 0x00500181,
+ LedMatrix386 = 0x00500182,
+ LedMatrix387 = 0x00500183,
+ LedMatrix388 = 0x00500184,
+ LedMatrix389 = 0x00500185,
+ LedMatrix390 = 0x00500186,
+ LedMatrix391 = 0x00500187,
+ LedMatrix392 = 0x00500188,
+ LedMatrix393 = 0x00500189,
+ LedMatrix394 = 0x0050018A,
+ LedMatrix395 = 0x0050018B,
+ LedMatrix396 = 0x0050018C,
+ LedMatrix397 = 0x0050018D,
+ LedMatrix398 = 0x0050018E,
+ LedMatrix399 = 0x0050018F,
+ LedMatrix400 = 0x00500190,
+ LedMatrix401 = 0x00500191,
+ LedMatrix402 = 0x00500192,
+ LedMatrix403 = 0x00500193,
+ LedMatrix404 = 0x00500194,
+ LedMatrix405 = 0x00500195,
+ LedMatrix406 = 0x00500196,
+ LedMatrix407 = 0x00500197,
+ LedMatrix408 = 0x00500198,
+ LedMatrix409 = 0x00500199,
+ LedMatrix410 = 0x0050019A,
+ LedMatrix411 = 0x0050019B,
+ LedMatrix412 = 0x0050019C,
+ LedMatrix413 = 0x0050019D,
+ LedMatrix414 = 0x0050019E,
+ LedMatrix415 = 0x0050019F,
+ LedMatrix416 = 0x005001A0,
+ LedMatrix417 = 0x005001A1,
+ LedMatrix418 = 0x005001A2,
+ LedMatrix419 = 0x005001A3,
+ LedMatrix420 = 0x005001A4,
+ LedMatrix421 = 0x005001A5,
+ LedMatrix422 = 0x005001A6,
+ LedMatrix423 = 0x005001A7,
+ LedMatrix424 = 0x005001A8,
+ LedMatrix425 = 0x005001A9,
+ LedMatrix426 = 0x005001AA,
+ LedMatrix427 = 0x005001AB,
+ LedMatrix428 = 0x005001AC,
+ LedMatrix429 = 0x005001AD,
+ LedMatrix430 = 0x005001AE,
+ LedMatrix431 = 0x005001AF,
+ LedMatrix432 = 0x005001B0,
+ LedMatrix433 = 0x005001B1,
+ LedMatrix434 = 0x005001B2,
+ LedMatrix435 = 0x005001B3,
+ LedMatrix436 = 0x005001B4,
+ LedMatrix437 = 0x005001B5,
+ LedMatrix438 = 0x005001B6,
+ LedMatrix439 = 0x005001B7,
+ LedMatrix440 = 0x005001B8,
+ LedMatrix441 = 0x005001B9,
+ LedMatrix442 = 0x005001BA,
+ LedMatrix443 = 0x005001BB,
+ LedMatrix444 = 0x005001BC,
+ LedMatrix445 = 0x005001BD,
+ LedMatrix446 = 0x005001BE,
+ LedMatrix447 = 0x005001BF,
+ LedMatrix448 = 0x005001C0,
+ LedMatrix449 = 0x005001C1,
+ LedMatrix450 = 0x005001C2,
+ LedMatrix451 = 0x005001C3,
+ LedMatrix452 = 0x005001C4,
+ LedMatrix453 = 0x005001C5,
+ LedMatrix454 = 0x005001C6,
+ LedMatrix455 = 0x005001C7,
+ LedMatrix456 = 0x005001C8,
+ LedMatrix457 = 0x005001C9,
+ LedMatrix458 = 0x005001CA,
+ LedMatrix459 = 0x005001CB,
+ LedMatrix460 = 0x005001CC,
+ LedMatrix461 = 0x005001CD,
+ LedMatrix462 = 0x005001CE,
+ LedMatrix463 = 0x005001CF,
+ LedMatrix464 = 0x005001D0,
+ LedMatrix465 = 0x005001D1,
+ LedMatrix466 = 0x005001D2,
+ LedMatrix467 = 0x005001D3,
+ LedMatrix468 = 0x005001D4,
+ LedMatrix469 = 0x005001D5,
+ LedMatrix470 = 0x005001D6,
+ LedMatrix471 = 0x005001D7,
+ LedMatrix472 = 0x005001D8,
+ LedMatrix473 = 0x005001D9,
+ LedMatrix474 = 0x005001DA,
+ LedMatrix475 = 0x005001DB,
+ LedMatrix476 = 0x005001DC,
+ LedMatrix477 = 0x005001DD,
+ LedMatrix478 = 0x005001DE,
+ LedMatrix479 = 0x005001DF,
+ LedMatrix480 = 0x005001E0,
+ LedMatrix481 = 0x005001E1,
+ LedMatrix482 = 0x005001E2,
+ LedMatrix483 = 0x005001E3,
+ LedMatrix484 = 0x005001E4,
+ LedMatrix485 = 0x005001E5,
+ LedMatrix486 = 0x005001E6,
+ LedMatrix487 = 0x005001E7,
+ LedMatrix488 = 0x005001E8,
+ LedMatrix489 = 0x005001E9,
+ LedMatrix490 = 0x005001EA,
+ LedMatrix491 = 0x005001EB,
+ LedMatrix492 = 0x005001EC,
+ LedMatrix493 = 0x005001ED,
+ LedMatrix494 = 0x005001EE,
+ LedMatrix495 = 0x005001EF,
+ LedMatrix496 = 0x005001F0,
+ LedMatrix497 = 0x005001F1,
+ LedMatrix498 = 0x005001F2,
+ LedMatrix499 = 0x005001F3,
+ LedMatrix500 = 0x005001F4,
+ LedMatrix501 = 0x005001F5,
+ LedMatrix502 = 0x005001F6,
+ LedMatrix503 = 0x005001F7,
+ LedMatrix504 = 0x005001F8,
+ LedMatrix505 = 0x005001F9,
+ LedMatrix506 = 0x005001FA,
+ LedMatrix507 = 0x005001FB,
+ LedMatrix508 = 0x005001FC,
+ LedMatrix509 = 0x005001FD,
+ LedMatrix510 = 0x005001FE,
+ LedMatrix511 = 0x005001FF,
+ LedMatrix512 = 0x00500200,
+ LedMatrix513 = 0x00500201,
+ LedMatrix514 = 0x00500202,
+ LedMatrix515 = 0x00500203,
+ LedMatrix516 = 0x00500204,
+ LedMatrix517 = 0x00500205,
+ LedMatrix518 = 0x00500206,
+ LedMatrix519 = 0x00500207,
+ LedMatrix520 = 0x00500208,
+ LedMatrix521 = 0x00500209,
+ LedMatrix522 = 0x0050020A,
+ LedMatrix523 = 0x0050020B,
+ LedMatrix524 = 0x0050020C,
+ LedMatrix525 = 0x0050020D,
+ LedMatrix526 = 0x0050020E,
+ LedMatrix527 = 0x0050020F,
+ LedMatrix528 = 0x00500210,
+ LedMatrix529 = 0x00500211,
+ LedMatrix530 = 0x00500212,
+ LedMatrix531 = 0x00500213,
+ LedMatrix532 = 0x00500214,
+ LedMatrix533 = 0x00500215,
+ LedMatrix534 = 0x00500216,
+ LedMatrix535 = 0x00500217,
+ LedMatrix536 = 0x00500218,
+ LedMatrix537 = 0x00500219,
+ LedMatrix538 = 0x0050021A,
+ LedMatrix539 = 0x0050021B,
+ LedMatrix540 = 0x0050021C,
+ LedMatrix541 = 0x0050021D,
+ LedMatrix542 = 0x0050021E,
+ LedMatrix543 = 0x0050021F,
+ LedMatrix544 = 0x00500220,
+ LedMatrix545 = 0x00500221,
+ LedMatrix546 = 0x00500222,
+ LedMatrix547 = 0x00500223,
+ LedMatrix548 = 0x00500224,
+ LedMatrix549 = 0x00500225,
+ LedMatrix550 = 0x00500226,
+ LedMatrix551 = 0x00500227,
+ LedMatrix552 = 0x00500228,
+ LedMatrix553 = 0x00500229,
+ LedMatrix554 = 0x0050022A,
+ LedMatrix555 = 0x0050022B,
+ LedMatrix556 = 0x0050022C,
+ LedMatrix557 = 0x0050022D,
+ LedMatrix558 = 0x0050022E,
+ LedMatrix559 = 0x0050022F,
+ LedMatrix560 = 0x00500230,
+ LedMatrix561 = 0x00500231,
+ LedMatrix562 = 0x00500232,
+ LedMatrix563 = 0x00500233,
+ LedMatrix564 = 0x00500234,
+ LedMatrix565 = 0x00500235,
+ LedMatrix566 = 0x00500236,
+ LedMatrix567 = 0x00500237,
+ LedMatrix568 = 0x00500238,
+ LedMatrix569 = 0x00500239,
+ LedMatrix570 = 0x0050023A,
+ LedMatrix571 = 0x0050023B,
+ LedMatrix572 = 0x0050023C,
+ LedMatrix573 = 0x0050023D,
+ LedMatrix574 = 0x0050023E,
+ LedMatrix575 = 0x0050023F,
+ LedMatrix576 = 0x00500240,
+ LedMatrix577 = 0x00500241,
+ LedMatrix578 = 0x00500242,
+ LedMatrix579 = 0x00500243,
+ LedMatrix580 = 0x00500244,
+ LedMatrix581 = 0x00500245,
+ LedMatrix582 = 0x00500246,
+ LedMatrix583 = 0x00500247,
+ LedMatrix584 = 0x00500248,
+ LedMatrix585 = 0x00500249,
+ LedMatrix586 = 0x0050024A,
+ LedMatrix587 = 0x0050024B,
+ LedMatrix588 = 0x0050024C,
+ LedMatrix589 = 0x0050024D,
+ LedMatrix590 = 0x0050024E,
+ LedMatrix591 = 0x0050024F,
+ LedMatrix592 = 0x00500250,
+ LedMatrix593 = 0x00500251,
+ LedMatrix594 = 0x00500252,
+ LedMatrix595 = 0x00500253,
+ LedMatrix596 = 0x00500254,
+ LedMatrix597 = 0x00500255,
+ LedMatrix598 = 0x00500256,
+ LedMatrix599 = 0x00500257,
+ LedMatrix600 = 0x00500258,
+ LedMatrix601 = 0x00500259,
+ LedMatrix602 = 0x0050025A,
+ LedMatrix603 = 0x0050025B,
+ LedMatrix604 = 0x0050025C,
+ LedMatrix605 = 0x0050025D,
+ LedMatrix606 = 0x0050025E,
+ LedMatrix607 = 0x0050025F,
+ LedMatrix608 = 0x00500260,
+ LedMatrix609 = 0x00500261,
+ LedMatrix610 = 0x00500262,
+ LedMatrix611 = 0x00500263,
+ LedMatrix612 = 0x00500264,
+ LedMatrix613 = 0x00500265,
+ LedMatrix614 = 0x00500266,
+ LedMatrix615 = 0x00500267,
+ LedMatrix616 = 0x00500268,
+ LedMatrix617 = 0x00500269,
+ LedMatrix618 = 0x0050026A,
+ LedMatrix619 = 0x0050026B,
+ LedMatrix620 = 0x0050026C,
+ LedMatrix621 = 0x0050026D,
+ LedMatrix622 = 0x0050026E,
+ LedMatrix623 = 0x0050026F,
+ LedMatrix624 = 0x00500270,
+ LedMatrix625 = 0x00500271,
+ LedMatrix626 = 0x00500272,
+ LedMatrix627 = 0x00500273,
+ LedMatrix628 = 0x00500274,
+ LedMatrix629 = 0x00500275,
+ LedMatrix630 = 0x00500276,
+ LedMatrix631 = 0x00500277,
+ LedMatrix632 = 0x00500278,
+ LedMatrix633 = 0x00500279,
+ LedMatrix634 = 0x0050027A,
+ LedMatrix635 = 0x0050027B,
+ LedMatrix636 = 0x0050027C,
+ LedMatrix637 = 0x0050027D,
+ LedMatrix638 = 0x0050027E,
+ LedMatrix639 = 0x0050027F,
+ LedMatrix640 = 0x00500280,
+ LedMatrix641 = 0x00500281,
+ LedMatrix642 = 0x00500282,
+ LedMatrix643 = 0x00500283,
+ LedMatrix644 = 0x00500284,
+ LedMatrix645 = 0x00500285,
+ LedMatrix646 = 0x00500286,
+ LedMatrix647 = 0x00500287,
+ LedMatrix648 = 0x00500288,
+ LedMatrix649 = 0x00500289,
+ LedMatrix650 = 0x0050028A,
+ LedMatrix651 = 0x0050028B,
+ LedMatrix652 = 0x0050028C,
+ LedMatrix653 = 0x0050028D,
+ LedMatrix654 = 0x0050028E,
+ LedMatrix655 = 0x0050028F,
+ LedMatrix656 = 0x00500290,
+ LedMatrix657 = 0x00500291,
+ LedMatrix658 = 0x00500292,
+ LedMatrix659 = 0x00500293,
+ LedMatrix660 = 0x00500294,
+ LedMatrix661 = 0x00500295,
+ LedMatrix662 = 0x00500296,
+ LedMatrix663 = 0x00500297,
+ LedMatrix664 = 0x00500298,
+ LedMatrix665 = 0x00500299,
+ LedMatrix666 = 0x0050029A,
+ LedMatrix667 = 0x0050029B,
+ LedMatrix668 = 0x0050029C,
+ LedMatrix669 = 0x0050029D,
+ LedMatrix670 = 0x0050029E,
+ LedMatrix671 = 0x0050029F,
+ LedMatrix672 = 0x005002A0,
+ LedMatrix673 = 0x005002A1,
+ LedMatrix674 = 0x005002A2,
+ LedMatrix675 = 0x005002A3,
+ LedMatrix676 = 0x005002A4,
+ LedMatrix677 = 0x005002A5,
+ LedMatrix678 = 0x005002A6,
+ LedMatrix679 = 0x005002A7,
+ LedMatrix680 = 0x005002A8,
+ LedMatrix681 = 0x005002A9,
+ LedMatrix682 = 0x005002AA,
+ LedMatrix683 = 0x005002AB,
+ LedMatrix684 = 0x005002AC,
+ LedMatrix685 = 0x005002AD,
+ LedMatrix686 = 0x005002AE,
+ LedMatrix687 = 0x005002AF,
+ LedMatrix688 = 0x005002B0,
+ LedMatrix689 = 0x005002B1,
+ LedMatrix690 = 0x005002B2,
+ LedMatrix691 = 0x005002B3,
+ LedMatrix692 = 0x005002B4,
+ LedMatrix693 = 0x005002B5,
+ LedMatrix694 = 0x005002B6,
+ LedMatrix695 = 0x005002B7,
+ LedMatrix696 = 0x005002B8,
+ LedMatrix697 = 0x005002B9,
+ LedMatrix698 = 0x005002BA,
+ LedMatrix699 = 0x005002BB,
+ LedMatrix700 = 0x005002BC,
+ LedMatrix701 = 0x005002BD,
+ LedMatrix702 = 0x005002BE,
+ LedMatrix703 = 0x005002BF,
+ LedMatrix704 = 0x005002C0,
+ LedMatrix705 = 0x005002C1,
+ LedMatrix706 = 0x005002C2,
+ LedMatrix707 = 0x005002C3,
+ LedMatrix708 = 0x005002C4,
+ LedMatrix709 = 0x005002C5,
+ LedMatrix710 = 0x005002C6,
+ LedMatrix711 = 0x005002C7,
+ LedMatrix712 = 0x005002C8,
+ LedMatrix713 = 0x005002C9,
+ LedMatrix714 = 0x005002CA,
+ LedMatrix715 = 0x005002CB,
+ LedMatrix716 = 0x005002CC,
+ LedMatrix717 = 0x005002CD,
+ LedMatrix718 = 0x005002CE,
+ LedMatrix719 = 0x005002CF,
+ LedMatrix720 = 0x005002D0,
+ LedMatrix721 = 0x005002D1,
+ LedMatrix722 = 0x005002D2,
+ LedMatrix723 = 0x005002D3,
+ LedMatrix724 = 0x005002D4,
+ LedMatrix725 = 0x005002D5,
+ LedMatrix726 = 0x005002D6,
+ LedMatrix727 = 0x005002D7,
+ LedMatrix728 = 0x005002D8,
+ LedMatrix729 = 0x005002D9,
+ LedMatrix730 = 0x005002DA,
+ LedMatrix731 = 0x005002DB,
+ LedMatrix732 = 0x005002DC,
+ LedMatrix733 = 0x005002DD,
+ LedMatrix734 = 0x005002DE,
+ LedMatrix735 = 0x005002DF,
+ LedMatrix736 = 0x005002E0,
+ LedMatrix737 = 0x005002E1,
+ LedMatrix738 = 0x005002E2,
+ LedMatrix739 = 0x005002E3,
+ LedMatrix740 = 0x005002E4,
+ LedMatrix741 = 0x005002E5,
+ LedMatrix742 = 0x005002E6,
+ LedMatrix743 = 0x005002E7,
+ LedMatrix744 = 0x005002E8,
+ LedMatrix745 = 0x005002E9,
+ LedMatrix746 = 0x005002EA,
+ LedMatrix747 = 0x005002EB,
+ LedMatrix748 = 0x005002EC,
+ LedMatrix749 = 0x005002ED,
+ LedMatrix750 = 0x005002EE,
+ LedMatrix751 = 0x005002EF,
+ LedMatrix752 = 0x005002F0,
+ LedMatrix753 = 0x005002F1,
+ LedMatrix754 = 0x005002F2,
+ LedMatrix755 = 0x005002F3,
+ LedMatrix756 = 0x005002F4,
+ LedMatrix757 = 0x005002F5,
+ LedMatrix758 = 0x005002F6,
+ LedMatrix759 = 0x005002F7,
+ LedMatrix760 = 0x005002F8,
+ LedMatrix761 = 0x005002F9,
+ LedMatrix762 = 0x005002FA,
+ LedMatrix763 = 0x005002FB,
+ LedMatrix764 = 0x005002FC,
+ LedMatrix765 = 0x005002FD,
+ LedMatrix766 = 0x005002FE,
+ LedMatrix767 = 0x005002FF,
+ LedMatrix768 = 0x00500300,
+ LedMatrix769 = 0x00500301,
+ LedMatrix770 = 0x00500302,
+ LedMatrix771 = 0x00500303,
+ LedMatrix772 = 0x00500304,
+ LedMatrix773 = 0x00500305,
+ LedMatrix774 = 0x00500306,
+ LedMatrix775 = 0x00500307,
+ LedMatrix776 = 0x00500308,
+ LedMatrix777 = 0x00500309,
+ LedMatrix778 = 0x0050030A,
+ LedMatrix779 = 0x0050030B,
+ LedMatrix780 = 0x0050030C,
+ LedMatrix781 = 0x0050030D,
+ LedMatrix782 = 0x0050030E,
+ LedMatrix783 = 0x0050030F,
+ LedMatrix784 = 0x00500310,
+ LedMatrix785 = 0x00500311,
+ LedMatrix786 = 0x00500312,
+ LedMatrix787 = 0x00500313,
+ LedMatrix788 = 0x00500314,
+ LedMatrix789 = 0x00500315,
+ LedMatrix790 = 0x00500316,
+ LedMatrix791 = 0x00500317,
+ LedMatrix792 = 0x00500318,
+ LedMatrix793 = 0x00500319,
+ LedMatrix794 = 0x0050031A,
+ LedMatrix795 = 0x0050031B,
+ LedMatrix796 = 0x0050031C,
+ LedMatrix797 = 0x0050031D,
+ LedMatrix798 = 0x0050031E,
+ LedMatrix799 = 0x0050031F,
+ LedMatrix800 = 0x00500320,
+ LedMatrix801 = 0x00500321,
+ LedMatrix802 = 0x00500322,
+ LedMatrix803 = 0x00500323,
+ LedMatrix804 = 0x00500324,
+ LedMatrix805 = 0x00500325,
+ LedMatrix806 = 0x00500326,
+ LedMatrix807 = 0x00500327,
+ LedMatrix808 = 0x00500328,
+ LedMatrix809 = 0x00500329,
+ LedMatrix810 = 0x0050032A,
+ LedMatrix811 = 0x0050032B,
+ LedMatrix812 = 0x0050032C,
+ LedMatrix813 = 0x0050032D,
+ LedMatrix814 = 0x0050032E,
+ LedMatrix815 = 0x0050032F,
+ LedMatrix816 = 0x00500330,
+ LedMatrix817 = 0x00500331,
+ LedMatrix818 = 0x00500332,
+ LedMatrix819 = 0x00500333,
+ LedMatrix820 = 0x00500334,
+ LedMatrix821 = 0x00500335,
+ LedMatrix822 = 0x00500336,
+ LedMatrix823 = 0x00500337,
+ LedMatrix824 = 0x00500338,
+ LedMatrix825 = 0x00500339,
+ LedMatrix826 = 0x0050033A,
+ LedMatrix827 = 0x0050033B,
+ LedMatrix828 = 0x0050033C,
+ LedMatrix829 = 0x0050033D,
+ LedMatrix830 = 0x0050033E,
+ LedMatrix831 = 0x0050033F,
+ LedMatrix832 = 0x00500340,
+ LedMatrix833 = 0x00500341,
+ LedMatrix834 = 0x00500342,
+ LedMatrix835 = 0x00500343,
+ LedMatrix836 = 0x00500344,
+ LedMatrix837 = 0x00500345,
+ LedMatrix838 = 0x00500346,
+ LedMatrix839 = 0x00500347,
+ LedMatrix840 = 0x00500348,
+ LedMatrix841 = 0x00500349,
+ LedMatrix842 = 0x0050034A,
+ LedMatrix843 = 0x0050034B,
+ LedMatrix844 = 0x0050034C,
+ LedMatrix845 = 0x0050034D,
+ LedMatrix846 = 0x0050034E,
+ LedMatrix847 = 0x0050034F,
+ LedMatrix848 = 0x00500350,
+ LedMatrix849 = 0x00500351,
+ LedMatrix850 = 0x00500352,
+ LedMatrix851 = 0x00500353,
+ LedMatrix852 = 0x00500354,
+ LedMatrix853 = 0x00500355,
+ LedMatrix854 = 0x00500356,
+ LedMatrix855 = 0x00500357,
+ LedMatrix856 = 0x00500358,
+ LedMatrix857 = 0x00500359,
+ LedMatrix858 = 0x0050035A,
+ LedMatrix859 = 0x0050035B,
+ LedMatrix860 = 0x0050035C,
+ LedMatrix861 = 0x0050035D,
+ LedMatrix862 = 0x0050035E,
+ LedMatrix863 = 0x0050035F,
+ LedMatrix864 = 0x00500360,
+ LedMatrix865 = 0x00500361,
+ LedMatrix866 = 0x00500362,
+ LedMatrix867 = 0x00500363,
+ LedMatrix868 = 0x00500364,
+ LedMatrix869 = 0x00500365,
+ LedMatrix870 = 0x00500366,
+ LedMatrix871 = 0x00500367,
+ LedMatrix872 = 0x00500368,
+ LedMatrix873 = 0x00500369,
+ LedMatrix874 = 0x0050036A,
+ LedMatrix875 = 0x0050036B,
+ LedMatrix876 = 0x0050036C,
+ LedMatrix877 = 0x0050036D,
+ LedMatrix878 = 0x0050036E,
+ LedMatrix879 = 0x0050036F,
+ LedMatrix880 = 0x00500370,
+ LedMatrix881 = 0x00500371,
+ LedMatrix882 = 0x00500372,
+ LedMatrix883 = 0x00500373,
+ LedMatrix884 = 0x00500374,
+ LedMatrix885 = 0x00500375,
+ LedMatrix886 = 0x00500376,
+ LedMatrix887 = 0x00500377,
+ LedMatrix888 = 0x00500378,
+ LedMatrix889 = 0x00500379,
+ LedMatrix890 = 0x0050037A,
+ LedMatrix891 = 0x0050037B,
+ LedMatrix892 = 0x0050037C,
+ LedMatrix893 = 0x0050037D,
+ LedMatrix894 = 0x0050037E,
+ LedMatrix895 = 0x0050037F,
+ LedMatrix896 = 0x00500380,
+ LedMatrix897 = 0x00500381,
+ LedMatrix898 = 0x00500382,
+ LedMatrix899 = 0x00500383,
+ LedMatrix900 = 0x00500384,
+ LedMatrix901 = 0x00500385,
+ LedMatrix902 = 0x00500386,
+ LedMatrix903 = 0x00500387,
+ LedMatrix904 = 0x00500388,
+ LedMatrix905 = 0x00500389,
+ LedMatrix906 = 0x0050038A,
+ LedMatrix907 = 0x0050038B,
+ LedMatrix908 = 0x0050038C,
+ LedMatrix909 = 0x0050038D,
+ LedMatrix910 = 0x0050038E,
+ LedMatrix911 = 0x0050038F,
+ LedMatrix912 = 0x00500390,
+ LedMatrix913 = 0x00500391,
+ LedMatrix914 = 0x00500392,
+ LedMatrix915 = 0x00500393,
+ LedMatrix916 = 0x00500394,
+ LedMatrix917 = 0x00500395,
+ LedMatrix918 = 0x00500396,
+ LedMatrix919 = 0x00500397,
+ LedMatrix920 = 0x00500398,
+ LedMatrix921 = 0x00500399,
+ LedMatrix922 = 0x0050039A,
+ LedMatrix923 = 0x0050039B,
+ LedMatrix924 = 0x0050039C,
+ LedMatrix925 = 0x0050039D,
+ LedMatrix926 = 0x0050039E,
+ LedMatrix927 = 0x0050039F,
+ LedMatrix928 = 0x005003A0,
+ LedMatrix929 = 0x005003A1,
+ LedMatrix930 = 0x005003A2,
+ LedMatrix931 = 0x005003A3,
+ LedMatrix932 = 0x005003A4,
+ LedMatrix933 = 0x005003A5,
+ LedMatrix934 = 0x005003A6,
+ LedMatrix935 = 0x005003A7,
+ LedMatrix936 = 0x005003A8,
+ LedMatrix937 = 0x005003A9,
+ LedMatrix938 = 0x005003AA,
+ LedMatrix939 = 0x005003AB,
+ LedMatrix940 = 0x005003AC,
+ LedMatrix941 = 0x005003AD,
+ LedMatrix942 = 0x005003AE,
+ LedMatrix943 = 0x005003AF,
+ LedMatrix944 = 0x005003B0,
+ LedMatrix945 = 0x005003B1,
+ LedMatrix946 = 0x005003B2,
+ LedMatrix947 = 0x005003B3,
+ LedMatrix948 = 0x005003B4,
+ LedMatrix949 = 0x005003B5,
+ LedMatrix950 = 0x005003B6,
+ LedMatrix951 = 0x005003B7,
+ LedMatrix952 = 0x005003B8,
+ LedMatrix953 = 0x005003B9,
+ LedMatrix954 = 0x005003BA,
+ LedMatrix955 = 0x005003BB,
+ LedMatrix956 = 0x005003BC,
+ LedMatrix957 = 0x005003BD,
+ LedMatrix958 = 0x005003BE,
+ LedMatrix959 = 0x005003BF,
+ LedMatrix960 = 0x005003C0,
+ LedMatrix961 = 0x005003C1,
+ LedMatrix962 = 0x005003C2,
+ LedMatrix963 = 0x005003C3,
+ LedMatrix964 = 0x005003C4,
+ LedMatrix965 = 0x005003C5,
+ LedMatrix966 = 0x005003C6,
+ LedMatrix967 = 0x005003C7,
+ LedMatrix968 = 0x005003C8,
+ LedMatrix969 = 0x005003C9,
+ LedMatrix970 = 0x005003CA,
+ LedMatrix971 = 0x005003CB,
+ LedMatrix972 = 0x005003CC,
+ LedMatrix973 = 0x005003CD,
+ LedMatrix974 = 0x005003CE,
+ LedMatrix975 = 0x005003CF,
+ LedMatrix976 = 0x005003D0,
+ LedMatrix977 = 0x005003D1,
+ LedMatrix978 = 0x005003D2,
+ LedMatrix979 = 0x005003D3,
+ LedMatrix980 = 0x005003D4,
+ LedMatrix981 = 0x005003D5,
+ LedMatrix982 = 0x005003D6,
+ LedMatrix983 = 0x005003D7,
+ LedMatrix984 = 0x005003D8,
+ LedMatrix985 = 0x005003D9,
+ LedMatrix986 = 0x005003DA,
+ LedMatrix987 = 0x005003DB,
+ LedMatrix988 = 0x005003DC,
+ LedMatrix989 = 0x005003DD,
+ LedMatrix990 = 0x005003DE,
+ LedMatrix991 = 0x005003DF,
+ LedMatrix992 = 0x005003E0,
+ LedMatrix993 = 0x005003E1,
+ LedMatrix994 = 0x005003E2,
+ LedMatrix995 = 0x005003E3,
+ LedMatrix996 = 0x005003E4,
+ LedMatrix997 = 0x005003E5,
+ LedMatrix998 = 0x005003E6,
+ LedMatrix999 = 0x005003E7,
+ LedMatrix1000 = 0x005003E8,
+ LedMatrix1001 = 0x005003E9,
+ LedMatrix1002 = 0x005003EA,
+ LedMatrix1003 = 0x005003EB,
+ LedMatrix1004 = 0x005003EC,
+ LedMatrix1005 = 0x005003ED,
+ LedMatrix1006 = 0x005003EE,
+ LedMatrix1007 = 0x005003EF,
+ LedMatrix1008 = 0x005003F0,
+ LedMatrix1009 = 0x005003F1,
+ LedMatrix1010 = 0x005003F2,
+ LedMatrix1011 = 0x005003F3,
+ LedMatrix1012 = 0x005003F4,
+ LedMatrix1013 = 0x005003F5,
+ LedMatrix1014 = 0x005003F6,
+ LedMatrix1015 = 0x005003F7,
+ LedMatrix1016 = 0x005003F8,
+ LedMatrix1017 = 0x005003F9,
+ LedMatrix1018 = 0x005003FA,
+ LedMatrix1019 = 0x005003FB,
+ LedMatrix1020 = 0x005003FC,
+ LedMatrix1021 = 0x005003FD,
+ LedMatrix1022 = 0x005003FE,
+ LedMatrix1023 = 0x005003FF,
+ LedMatrix1024 = 0x00500400,
+ LedMatrix1025 = 0x00500401,
+ LedMatrix1026 = 0x00500402,
+ LedMatrix1027 = 0x00500403,
+ LedMatrix1028 = 0x00500404,
+ LedMatrix1029 = 0x00500405,
+ LedMatrix1030 = 0x00500406,
+ LedMatrix1031 = 0x00500407,
+ LedMatrix1032 = 0x00500408,
+ LedMatrix1033 = 0x00500409,
+ LedMatrix1034 = 0x0050040A,
+ LedMatrix1035 = 0x0050040B,
+ LedMatrix1036 = 0x0050040C,
+ LedMatrix1037 = 0x0050040D,
+ LedMatrix1038 = 0x0050040E,
+ LedMatrix1039 = 0x0050040F,
+ LedMatrix1040 = 0x00500410,
+ LedMatrix1041 = 0x00500411,
+ LedMatrix1042 = 0x00500412,
+ LedMatrix1043 = 0x00500413,
+ LedMatrix1044 = 0x00500414,
+ LedMatrix1045 = 0x00500415,
+ LedMatrix1046 = 0x00500416,
+ LedMatrix1047 = 0x00500417,
+ LedMatrix1048 = 0x00500418,
+ LedMatrix1049 = 0x00500419,
+ LedMatrix1050 = 0x0050041A,
+ LedMatrix1051 = 0x0050041B,
+ LedMatrix1052 = 0x0050041C,
+ LedMatrix1053 = 0x0050041D,
+ LedMatrix1054 = 0x0050041E,
+ LedMatrix1055 = 0x0050041F,
+ LedMatrix1056 = 0x00500420,
+ LedMatrix1057 = 0x00500421,
+ LedMatrix1058 = 0x00500422,
+ LedMatrix1059 = 0x00500423,
+ LedMatrix1060 = 0x00500424,
+ LedMatrix1061 = 0x00500425,
+ LedMatrix1062 = 0x00500426,
+ LedMatrix1063 = 0x00500427,
+ LedMatrix1064 = 0x00500428,
+ LedMatrix1065 = 0x00500429,
+ LedMatrix1066 = 0x0050042A,
+ LedMatrix1067 = 0x0050042B,
+ LedMatrix1068 = 0x0050042C,
+ LedMatrix1069 = 0x0050042D,
+ LedMatrix1070 = 0x0050042E,
+ LedMatrix1071 = 0x0050042F,
+ LedMatrix1072 = 0x00500430,
+ LedMatrix1073 = 0x00500431,
+ LedMatrix1074 = 0x00500432,
+ LedMatrix1075 = 0x00500433,
+ LedMatrix1076 = 0x00500434,
+ LedMatrix1077 = 0x00500435,
+ LedMatrix1078 = 0x00500436,
+ LedMatrix1079 = 0x00500437,
+ LedMatrix1080 = 0x00500438,
+ LedMatrix1081 = 0x00500439,
+ LedMatrix1082 = 0x0050043A,
+ LedMatrix1083 = 0x0050043B,
+ LedMatrix1084 = 0x0050043C,
+ LedMatrix1085 = 0x0050043D,
+ LedMatrix1086 = 0x0050043E,
+ LedMatrix1087 = 0x0050043F,
+ LedMatrix1088 = 0x00500440,
+ LedMatrix1089 = 0x00500441,
+ LedMatrix1090 = 0x00500442,
+ LedMatrix1091 = 0x00500443,
+ LedMatrix1092 = 0x00500444,
+ LedMatrix1093 = 0x00500445,
+ LedMatrix1094 = 0x00500446,
+ LedMatrix1095 = 0x00500447,
+ LedMatrix1096 = 0x00500448,
+ LedMatrix1097 = 0x00500449,
+ LedMatrix1098 = 0x0050044A,
+ LedMatrix1099 = 0x0050044B,
+ LedMatrix1100 = 0x0050044C,
+ LedMatrix1101 = 0x0050044D,
+ LedMatrix1102 = 0x0050044E,
+ LedMatrix1103 = 0x0050044F,
+ LedMatrix1104 = 0x00500450,
+ LedMatrix1105 = 0x00500451,
+ LedMatrix1106 = 0x00500452,
+ LedMatrix1107 = 0x00500453,
+ LedMatrix1108 = 0x00500454,
+ LedMatrix1109 = 0x00500455,
+ LedMatrix1110 = 0x00500456,
+ LedMatrix1111 = 0x00500457,
+ LedMatrix1112 = 0x00500458,
+ LedMatrix1113 = 0x00500459,
+ LedMatrix1114 = 0x0050045A,
+ LedMatrix1115 = 0x0050045B,
+ LedMatrix1116 = 0x0050045C,
+ LedMatrix1117 = 0x0050045D,
+ LedMatrix1118 = 0x0050045E,
+ LedMatrix1119 = 0x0050045F,
+ LedMatrix1120 = 0x00500460,
+ LedMatrix1121 = 0x00500461,
+ LedMatrix1122 = 0x00500462,
+ LedMatrix1123 = 0x00500463,
+ LedMatrix1124 = 0x00500464,
+ LedMatrix1125 = 0x00500465,
+ LedMatrix1126 = 0x00500466,
+ LedMatrix1127 = 0x00500467,
+ LedMatrix1128 = 0x00500468,
+ LedMatrix1129 = 0x00500469,
+ LedMatrix1130 = 0x0050046A,
+ LedMatrix1131 = 0x0050046B,
+ LedMatrix1132 = 0x0050046C,
+ LedMatrix1133 = 0x0050046D,
+ LedMatrix1134 = 0x0050046E,
+ LedMatrix1135 = 0x0050046F,
+ LedMatrix1136 = 0x00500470,
+ LedMatrix1137 = 0x00500471,
+ LedMatrix1138 = 0x00500472,
+ LedMatrix1139 = 0x00500473,
+ LedMatrix1140 = 0x00500474,
+ LedMatrix1141 = 0x00500475,
+ LedMatrix1142 = 0x00500476,
+ LedMatrix1143 = 0x00500477,
+ LedMatrix1144 = 0x00500478,
+ LedMatrix1145 = 0x00500479,
+ LedMatrix1146 = 0x0050047A,
+ LedMatrix1147 = 0x0050047B,
+ LedMatrix1148 = 0x0050047C,
+ LedMatrix1149 = 0x0050047D,
+ LedMatrix1150 = 0x0050047E,
+ LedMatrix1151 = 0x0050047F,
+ LedMatrix1152 = 0x00500480,
+ LedMatrix1153 = 0x00500481,
+ LedMatrix1154 = 0x00500482,
+ LedMatrix1155 = 0x00500483,
+ LedMatrix1156 = 0x00500484,
+ LedMatrix1157 = 0x00500485,
+ LedMatrix1158 = 0x00500486,
+ LedMatrix1159 = 0x00500487,
+ LedMatrix1160 = 0x00500488,
+ LedMatrix1161 = 0x00500489,
+ LedMatrix1162 = 0x0050048A,
+ LedMatrix1163 = 0x0050048B,
+ LedMatrix1164 = 0x0050048C,
+ LedMatrix1165 = 0x0050048D,
+ LedMatrix1166 = 0x0050048E,
+ LedMatrix1167 = 0x0050048F,
+ LedMatrix1168 = 0x00500490,
+ LedMatrix1169 = 0x00500491,
+ LedMatrix1170 = 0x00500492,
+ LedMatrix1171 = 0x00500493,
+ LedMatrix1172 = 0x00500494,
+ LedMatrix1173 = 0x00500495,
+ LedMatrix1174 = 0x00500496,
+ LedMatrix1175 = 0x00500497,
+ LedMatrix1176 = 0x00500498,
+ LedMatrix1177 = 0x00500499,
+ LedMatrix1178 = 0x0050049A,
+ LedMatrix1179 = 0x0050049B,
+ LedMatrix1180 = 0x0050049C,
+ LedMatrix1181 = 0x0050049D,
+ LedMatrix1182 = 0x0050049E,
+ LedMatrix1183 = 0x0050049F,
+ LedMatrix1184 = 0x005004A0,
+ LedMatrix1185 = 0x005004A1,
+ LedMatrix1186 = 0x005004A2,
+ LedMatrix1187 = 0x005004A3,
+ LedMatrix1188 = 0x005004A4,
+ LedMatrix1189 = 0x005004A5,
+ LedMatrix1190 = 0x005004A6,
+ LedMatrix1191 = 0x005004A7,
+ LedMatrix1192 = 0x005004A8,
+ LedMatrix1193 = 0x005004A9,
+ LedMatrix1194 = 0x005004AA,
+ LedMatrix1195 = 0x005004AB,
+ LedMatrix1196 = 0x005004AC,
+ LedMatrix1197 = 0x005004AD,
+ LedMatrix1198 = 0x005004AE,
+ LedMatrix1199 = 0x005004AF,
+ LedMatrix1200 = 0x005004B0,
+ LedMatrix1201 = 0x005004B1,
+ LedMatrix1202 = 0x005004B2,
+ LedMatrix1203 = 0x005004B3,
+ LedMatrix1204 = 0x005004B4,
+ LedMatrix1205 = 0x005004B5,
+ LedMatrix1206 = 0x005004B6,
+ LedMatrix1207 = 0x005004B7,
+ LedMatrix1208 = 0x005004B8,
+ LedMatrix1209 = 0x005004B9,
+ LedMatrix1210 = 0x005004BA,
+ LedMatrix1211 = 0x005004BB,
+ LedMatrix1212 = 0x005004BC,
+ LedMatrix1213 = 0x005004BD,
+ LedMatrix1214 = 0x005004BE,
+ LedMatrix1215 = 0x005004BF,
+ LedMatrix1216 = 0x005004C0,
+ LedMatrix1217 = 0x005004C1,
+ LedMatrix1218 = 0x005004C2,
+ LedMatrix1219 = 0x005004C3,
+ LedMatrix1220 = 0x005004C4,
+ LedMatrix1221 = 0x005004C5,
+ LedMatrix1222 = 0x005004C6,
+ LedMatrix1223 = 0x005004C7,
+ LedMatrix1224 = 0x005004C8,
+ LedMatrix1225 = 0x005004C9,
+ LedMatrix1226 = 0x005004CA,
+ LedMatrix1227 = 0x005004CB,
+ LedMatrix1228 = 0x005004CC,
+ LedMatrix1229 = 0x005004CD,
+ LedMatrix1230 = 0x005004CE,
+ LedMatrix1231 = 0x005004CF,
+ LedMatrix1232 = 0x005004D0,
+ LedMatrix1233 = 0x005004D1,
+ LedMatrix1234 = 0x005004D2,
+ LedMatrix1235 = 0x005004D3,
+ LedMatrix1236 = 0x005004D4,
+ LedMatrix1237 = 0x005004D5,
+ LedMatrix1238 = 0x005004D6,
+ LedMatrix1239 = 0x005004D7,
+ LedMatrix1240 = 0x005004D8,
+ LedMatrix1241 = 0x005004D9,
+ LedMatrix1242 = 0x005004DA,
+ LedMatrix1243 = 0x005004DB,
+ LedMatrix1244 = 0x005004DC,
+ LedMatrix1245 = 0x005004DD,
+ LedMatrix1246 = 0x005004DE,
+ LedMatrix1247 = 0x005004DF,
+ LedMatrix1248 = 0x005004E0,
+ LedMatrix1249 = 0x005004E1,
+ LedMatrix1250 = 0x005004E2,
+ LedMatrix1251 = 0x005004E3,
+ LedMatrix1252 = 0x005004E4,
+ LedMatrix1253 = 0x005004E5,
+ LedMatrix1254 = 0x005004E6,
+ LedMatrix1255 = 0x005004E7,
+ LedMatrix1256 = 0x005004E8,
+ LedMatrix1257 = 0x005004E9,
+ LedMatrix1258 = 0x005004EA,
+ LedMatrix1259 = 0x005004EB,
+ LedMatrix1260 = 0x005004EC,
+ LedMatrix1261 = 0x005004ED,
+ LedMatrix1262 = 0x005004EE,
+ LedMatrix1263 = 0x005004EF,
+ LedMatrix1264 = 0x005004F0,
+ LedMatrix1265 = 0x005004F1,
+ LedMatrix1266 = 0x005004F2,
+ LedMatrix1267 = 0x005004F3,
+ LedMatrix1268 = 0x005004F4,
+ LedMatrix1269 = 0x005004F5,
+ LedMatrix1270 = 0x005004F6,
+ LedMatrix1271 = 0x005004F7,
+ LedMatrix1272 = 0x005004F8,
+ LedMatrix1273 = 0x005004F9,
+ LedMatrix1274 = 0x005004FA,
+ LedMatrix1275 = 0x005004FB,
+ LedMatrix1276 = 0x005004FC,
+ LedMatrix1277 = 0x005004FD,
+ LedMatrix1278 = 0x005004FE,
+ LedMatrix1279 = 0x005004FF,
+ LedMatrix1280 = 0x00500500,
+ LedMatrix1281 = 0x00500501,
+ LedMatrix1282 = 0x00500502,
+ LedMatrix1283 = 0x00500503,
+ LedMatrix1284 = 0x00500504,
+ LedMatrix1285 = 0x00500505,
+ LedMatrix1286 = 0x00500506,
+ LedMatrix1287 = 0x00500507,
+ LedMatrix1288 = 0x00500508,
+ LedMatrix1289 = 0x00500509,
+ LedMatrix1290 = 0x0050050A,
+ LedMatrix1291 = 0x0050050B,
+ LedMatrix1292 = 0x0050050C,
+ LedMatrix1293 = 0x0050050D,
+ LedMatrix1294 = 0x0050050E,
+ LedMatrix1295 = 0x0050050F,
+ LedMatrix1296 = 0x00500510,
+ LedMatrix1297 = 0x00500511,
+ LedMatrix1298 = 0x00500512,
+ LedMatrix1299 = 0x00500513,
+ LedMatrix1300 = 0x00500514,
+ LedMatrix1301 = 0x00500515,
+ LedMatrix1302 = 0x00500516,
+ LedMatrix1303 = 0x00500517,
+ LedMatrix1304 = 0x00500518,
+ LedMatrix1305 = 0x00500519,
+ LedMatrix1306 = 0x0050051A,
+ LedMatrix1307 = 0x0050051B,
+ LedMatrix1308 = 0x0050051C,
+ LedMatrix1309 = 0x0050051D,
+ LedMatrix1310 = 0x0050051E,
+ LedMatrix1311 = 0x0050051F,
+ LedMatrix1312 = 0x00500520,
+ LedMatrix1313 = 0x00500521,
+ LedMatrix1314 = 0x00500522,
+ LedMatrix1315 = 0x00500523,
+ LedMatrix1316 = 0x00500524,
+ LedMatrix1317 = 0x00500525,
+ LedMatrix1318 = 0x00500526,
+ LedMatrix1319 = 0x00500527,
+ LedMatrix1320 = 0x00500528,
+ LedMatrix1321 = 0x00500529,
+ LedMatrix1322 = 0x0050052A,
+ LedMatrix1323 = 0x0050052B,
+ LedMatrix1324 = 0x0050052C,
+ LedMatrix1325 = 0x0050052D,
+ LedMatrix1326 = 0x0050052E,
+ LedMatrix1327 = 0x0050052F,
+ LedMatrix1328 = 0x00500530,
+ LedMatrix1329 = 0x00500531,
+ LedMatrix1330 = 0x00500532,
+ LedMatrix1331 = 0x00500533,
+ LedMatrix1332 = 0x00500534,
+ LedMatrix1333 = 0x00500535,
+ LedMatrix1334 = 0x00500536,
+ LedMatrix1335 = 0x00500537,
+ LedMatrix1336 = 0x00500538,
+ LedMatrix1337 = 0x00500539,
+ LedMatrix1338 = 0x0050053A,
+ LedMatrix1339 = 0x0050053B,
+ LedMatrix1340 = 0x0050053C,
+ LedMatrix1341 = 0x0050053D,
+ LedMatrix1342 = 0x0050053E,
+ LedMatrix1343 = 0x0050053F,
+ LedMatrix1344 = 0x00500540,
+ LedMatrix1345 = 0x00500541,
+ LedMatrix1346 = 0x00500542,
+ LedMatrix1347 = 0x00500543,
+ LedMatrix1348 = 0x00500544,
+ LedMatrix1349 = 0x00500545,
+ LedMatrix1350 = 0x00500546,
+ LedMatrix1351 = 0x00500547,
+ LedMatrix1352 = 0x00500548,
+ LedMatrix1353 = 0x00500549,
+ LedMatrix1354 = 0x0050054A,
+ LedMatrix1355 = 0x0050054B,
+ LedMatrix1356 = 0x0050054C,
+ LedMatrix1357 = 0x0050054D,
+ LedMatrix1358 = 0x0050054E,
+ LedMatrix1359 = 0x0050054F,
+ LedMatrix1360 = 0x00500550,
+ LedMatrix1361 = 0x00500551,
+ LedMatrix1362 = 0x00500552,
+ LedMatrix1363 = 0x00500553,
+ LedMatrix1364 = 0x00500554,
+ LedMatrix1365 = 0x00500555,
+ LedMatrix1366 = 0x00500556,
+ LedMatrix1367 = 0x00500557,
+ LedMatrix1368 = 0x00500558,
+ LedMatrix1369 = 0x00500559,
+ LedMatrix1370 = 0x0050055A,
+ LedMatrix1371 = 0x0050055B,
+ LedMatrix1372 = 0x0050055C,
+ LedMatrix1373 = 0x0050055D,
+ LedMatrix1374 = 0x0050055E,
+ LedMatrix1375 = 0x0050055F,
+ LedMatrix1376 = 0x00500560,
+ LedMatrix1377 = 0x00500561,
+ LedMatrix1378 = 0x00500562,
+ LedMatrix1379 = 0x00500563,
+ LedMatrix1380 = 0x00500564,
+ LedMatrix1381 = 0x00500565,
+ LedMatrix1382 = 0x00500566,
+ LedMatrix1383 = 0x00500567,
+ LedMatrix1384 = 0x00500568,
+ LedMatrix1385 = 0x00500569,
+ LedMatrix1386 = 0x0050056A,
+ LedMatrix1387 = 0x0050056B,
+ LedMatrix1388 = 0x0050056C,
+ LedMatrix1389 = 0x0050056D,
+ LedMatrix1390 = 0x0050056E,
+ LedMatrix1391 = 0x0050056F,
+ LedMatrix1392 = 0x00500570,
+ LedMatrix1393 = 0x00500571,
+ LedMatrix1394 = 0x00500572,
+ LedMatrix1395 = 0x00500573,
+ LedMatrix1396 = 0x00500574,
+ LedMatrix1397 = 0x00500575,
+ LedMatrix1398 = 0x00500576,
+ LedMatrix1399 = 0x00500577,
+ LedMatrix1400 = 0x00500578,
+ LedMatrix1401 = 0x00500579,
+ LedMatrix1402 = 0x0050057A,
+ LedMatrix1403 = 0x0050057B,
+ LedMatrix1404 = 0x0050057C,
+ LedMatrix1405 = 0x0050057D,
+ LedMatrix1406 = 0x0050057E,
+ LedMatrix1407 = 0x0050057F,
+ LedMatrix1408 = 0x00500580,
+ LedMatrix1409 = 0x00500581,
+ LedMatrix1410 = 0x00500582,
+ LedMatrix1411 = 0x00500583,
+ LedMatrix1412 = 0x00500584,
+ LedMatrix1413 = 0x00500585,
+ LedMatrix1414 = 0x00500586,
+ LedMatrix1415 = 0x00500587,
+ LedMatrix1416 = 0x00500588,
+ LedMatrix1417 = 0x00500589,
+ LedMatrix1418 = 0x0050058A,
+ LedMatrix1419 = 0x0050058B,
+ LedMatrix1420 = 0x0050058C,
+ LedMatrix1421 = 0x0050058D,
+ LedMatrix1422 = 0x0050058E,
+ LedMatrix1423 = 0x0050058F,
+ LedMatrix1424 = 0x00500590,
+ LedMatrix1425 = 0x00500591,
+ LedMatrix1426 = 0x00500592,
+ LedMatrix1427 = 0x00500593,
+ LedMatrix1428 = 0x00500594,
+ LedMatrix1429 = 0x00500595,
+ LedMatrix1430 = 0x00500596,
+ LedMatrix1431 = 0x00500597,
+ LedMatrix1432 = 0x00500598,
+ LedMatrix1433 = 0x00500599,
+ LedMatrix1434 = 0x0050059A,
+ LedMatrix1435 = 0x0050059B,
+ LedMatrix1436 = 0x0050059C,
+ LedMatrix1437 = 0x0050059D,
+ LedMatrix1438 = 0x0050059E,
+ LedMatrix1439 = 0x0050059F,
+ LedMatrix1440 = 0x005005A0,
+ LedMatrix1441 = 0x005005A1,
+ LedMatrix1442 = 0x005005A2,
+ LedMatrix1443 = 0x005005A3,
+ LedMatrix1444 = 0x005005A4,
+ LedMatrix1445 = 0x005005A5,
+ LedMatrix1446 = 0x005005A6,
+ LedMatrix1447 = 0x005005A7,
+ LedMatrix1448 = 0x005005A8,
+ LedMatrix1449 = 0x005005A9,
+ LedMatrix1450 = 0x005005AA,
+ LedMatrix1451 = 0x005005AB,
+ LedMatrix1452 = 0x005005AC,
+ LedMatrix1453 = 0x005005AD,
+ LedMatrix1454 = 0x005005AE,
+ LedMatrix1455 = 0x005005AF,
+ LedMatrix1456 = 0x005005B0,
+ LedMatrix1457 = 0x005005B1,
+ LedMatrix1458 = 0x005005B2,
+ LedMatrix1459 = 0x005005B3,
+ LedMatrix1460 = 0x005005B4,
+ LedMatrix1461 = 0x005005B5,
+ LedMatrix1462 = 0x005005B6,
+ LedMatrix1463 = 0x005005B7,
+ LedMatrix1464 = 0x005005B8,
+ LedMatrix1465 = 0x005005B9,
+ LedMatrix1466 = 0x005005BA,
+ LedMatrix1467 = 0x005005BB,
+ LedMatrix1468 = 0x005005BC,
+ LedMatrix1469 = 0x005005BD,
+ LedMatrix1470 = 0x005005BE,
+ LedMatrix1471 = 0x005005BF,
+ LedMatrix1472 = 0x005005C0,
+ LedMatrix1473 = 0x005005C1,
+ LedMatrix1474 = 0x005005C2,
+ LedMatrix1475 = 0x005005C3,
+ LedMatrix1476 = 0x005005C4,
+ LedMatrix1477 = 0x005005C5,
+ LedMatrix1478 = 0x005005C6,
+ LedMatrix1479 = 0x005005C7,
+ LedMatrix1480 = 0x005005C8,
+ LedMatrix1481 = 0x005005C9,
+ LedMatrix1482 = 0x005005CA,
+ LedMatrix1483 = 0x005005CB,
+ LedMatrix1484 = 0x005005CC,
+ LedMatrix1485 = 0x005005CD,
+ LedMatrix1486 = 0x005005CE,
+ LedMatrix1487 = 0x005005CF,
+ LedMatrix1488 = 0x005005D0,
+ LedMatrix1489 = 0x005005D1,
+ LedMatrix1490 = 0x005005D2,
+ LedMatrix1491 = 0x005005D3,
+ LedMatrix1492 = 0x005005D4,
+ LedMatrix1493 = 0x005005D5,
+ LedMatrix1494 = 0x005005D6,
+ LedMatrix1495 = 0x005005D7,
+ LedMatrix1496 = 0x005005D8,
+ LedMatrix1497 = 0x005005D9,
+ LedMatrix1498 = 0x005005DA,
+ LedMatrix1499 = 0x005005DB,
+ LedMatrix1500 = 0x005005DC,
+ LedMatrix1501 = 0x005005DD,
+ LedMatrix1502 = 0x005005DE,
+ LedMatrix1503 = 0x005005DF,
+ LedMatrix1504 = 0x005005E0,
+ LedMatrix1505 = 0x005005E1,
+ LedMatrix1506 = 0x005005E2,
+ LedMatrix1507 = 0x005005E3,
+ LedMatrix1508 = 0x005005E4,
+ LedMatrix1509 = 0x005005E5,
+ LedMatrix1510 = 0x005005E6,
+ LedMatrix1511 = 0x005005E7,
+ LedMatrix1512 = 0x005005E8,
+ LedMatrix1513 = 0x005005E9,
+ LedMatrix1514 = 0x005005EA,
+ LedMatrix1515 = 0x005005EB,
+ LedMatrix1516 = 0x005005EC,
+ LedMatrix1517 = 0x005005ED,
+ LedMatrix1518 = 0x005005EE,
+ LedMatrix1519 = 0x005005EF,
+ LedMatrix1520 = 0x005005F0,
+ LedMatrix1521 = 0x005005F1,
+ LedMatrix1522 = 0x005005F2,
+ LedMatrix1523 = 0x005005F3,
+ LedMatrix1524 = 0x005005F4,
+ LedMatrix1525 = 0x005005F5,
+ LedMatrix1526 = 0x005005F6,
+ LedMatrix1527 = 0x005005F7,
+ LedMatrix1528 = 0x005005F8,
+ LedMatrix1529 = 0x005005F9,
+ LedMatrix1530 = 0x005005FA,
+ LedMatrix1531 = 0x005005FB,
+ LedMatrix1532 = 0x005005FC,
+ LedMatrix1533 = 0x005005FD,
+ LedMatrix1534 = 0x005005FE,
+ LedMatrix1535 = 0x005005FF,
+ LedMatrix1536 = 0x00500600,
+ LedMatrix1537 = 0x00500601,
+ LedMatrix1538 = 0x00500602,
+ LedMatrix1539 = 0x00500603,
+ LedMatrix1540 = 0x00500604,
+ LedMatrix1541 = 0x00500605,
+ LedMatrix1542 = 0x00500606,
+ LedMatrix1543 = 0x00500607,
+ LedMatrix1544 = 0x00500608,
+ LedMatrix1545 = 0x00500609,
+ LedMatrix1546 = 0x0050060A,
+ LedMatrix1547 = 0x0050060B,
+ LedMatrix1548 = 0x0050060C,
+ LedMatrix1549 = 0x0050060D,
+ LedMatrix1550 = 0x0050060E,
+ LedMatrix1551 = 0x0050060F,
+ LedMatrix1552 = 0x00500610,
+ LedMatrix1553 = 0x00500611,
+ LedMatrix1554 = 0x00500612,
+ LedMatrix1555 = 0x00500613,
+ LedMatrix1556 = 0x00500614,
+ LedMatrix1557 = 0x00500615,
+ LedMatrix1558 = 0x00500616,
+ LedMatrix1559 = 0x00500617,
+ LedMatrix1560 = 0x00500618,
+ LedMatrix1561 = 0x00500619,
+ LedMatrix1562 = 0x0050061A,
+ LedMatrix1563 = 0x0050061B,
+ LedMatrix1564 = 0x0050061C,
+ LedMatrix1565 = 0x0050061D,
+ LedMatrix1566 = 0x0050061E,
+ LedMatrix1567 = 0x0050061F,
+ LedMatrix1568 = 0x00500620,
+ LedMatrix1569 = 0x00500621,
+ LedMatrix1570 = 0x00500622,
+ LedMatrix1571 = 0x00500623,
+ LedMatrix1572 = 0x00500624,
+ LedMatrix1573 = 0x00500625,
+ LedMatrix1574 = 0x00500626,
+ LedMatrix1575 = 0x00500627,
+ LedMatrix1576 = 0x00500628,
+ LedMatrix1577 = 0x00500629,
+ LedMatrix1578 = 0x0050062A,
+ LedMatrix1579 = 0x0050062B,
+ LedMatrix1580 = 0x0050062C,
+ LedMatrix1581 = 0x0050062D,
+ LedMatrix1582 = 0x0050062E,
+ LedMatrix1583 = 0x0050062F,
+ LedMatrix1584 = 0x00500630,
+ LedMatrix1585 = 0x00500631,
+ LedMatrix1586 = 0x00500632,
+ LedMatrix1587 = 0x00500633,
+ LedMatrix1588 = 0x00500634,
+ LedMatrix1589 = 0x00500635,
+ LedMatrix1590 = 0x00500636,
+ LedMatrix1591 = 0x00500637,
+ LedMatrix1592 = 0x00500638,
+ LedMatrix1593 = 0x00500639,
+ LedMatrix1594 = 0x0050063A,
+ LedMatrix1595 = 0x0050063B,
+ LedMatrix1596 = 0x0050063C,
+ LedMatrix1597 = 0x0050063D,
+ LedMatrix1598 = 0x0050063E,
+ LedMatrix1599 = 0x0050063F,
+ LedMatrix1600 = 0x00500640,
+ LedMatrix1601 = 0x00500641,
+ LedMatrix1602 = 0x00500642,
+ LedMatrix1603 = 0x00500643,
+ LedMatrix1604 = 0x00500644,
+ LedMatrix1605 = 0x00500645,
+ LedMatrix1606 = 0x00500646,
+ LedMatrix1607 = 0x00500647,
+ LedMatrix1608 = 0x00500648,
+ LedMatrix1609 = 0x00500649,
+ LedMatrix1610 = 0x0050064A,
+ LedMatrix1611 = 0x0050064B,
+ LedMatrix1612 = 0x0050064C,
+ LedMatrix1613 = 0x0050064D,
+ LedMatrix1614 = 0x0050064E,
+ LedMatrix1615 = 0x0050064F,
+ LedMatrix1616 = 0x00500650,
+ LedMatrix1617 = 0x00500651,
+ LedMatrix1618 = 0x00500652,
+ LedMatrix1619 = 0x00500653,
+ LedMatrix1620 = 0x00500654,
+ LedMatrix1621 = 0x00500655,
+ LedMatrix1622 = 0x00500656,
+ LedMatrix1623 = 0x00500657,
+ LedMatrix1624 = 0x00500658,
+ LedMatrix1625 = 0x00500659,
+ LedMatrix1626 = 0x0050065A,
+ LedMatrix1627 = 0x0050065B,
+ LedMatrix1628 = 0x0050065C,
+ LedMatrix1629 = 0x0050065D,
+ LedMatrix1630 = 0x0050065E,
+ LedMatrix1631 = 0x0050065F,
+ LedMatrix1632 = 0x00500660,
+ LedMatrix1633 = 0x00500661,
+ LedMatrix1634 = 0x00500662,
+ LedMatrix1635 = 0x00500663,
+ LedMatrix1636 = 0x00500664,
+ LedMatrix1637 = 0x00500665,
+ LedMatrix1638 = 0x00500666,
+ LedMatrix1639 = 0x00500667,
+ LedMatrix1640 = 0x00500668,
+ LedMatrix1641 = 0x00500669,
+ LedMatrix1642 = 0x0050066A,
+ LedMatrix1643 = 0x0050066B,
+ LedMatrix1644 = 0x0050066C,
+ LedMatrix1645 = 0x0050066D,
+ LedMatrix1646 = 0x0050066E,
+ LedMatrix1647 = 0x0050066F,
+ LedMatrix1648 = 0x00500670,
+ LedMatrix1649 = 0x00500671,
+ LedMatrix1650 = 0x00500672,
+ LedMatrix1651 = 0x00500673,
+ LedMatrix1652 = 0x00500674,
+ LedMatrix1653 = 0x00500675,
+ LedMatrix1654 = 0x00500676,
+ LedMatrix1655 = 0x00500677,
+ LedMatrix1656 = 0x00500678,
+ LedMatrix1657 = 0x00500679,
+ LedMatrix1658 = 0x0050067A,
+ LedMatrix1659 = 0x0050067B,
+ LedMatrix1660 = 0x0050067C,
+ LedMatrix1661 = 0x0050067D,
+ LedMatrix1662 = 0x0050067E,
+ LedMatrix1663 = 0x0050067F,
+ LedMatrix1664 = 0x00500680,
+ LedMatrix1665 = 0x00500681,
+ LedMatrix1666 = 0x00500682,
+ LedMatrix1667 = 0x00500683,
+ LedMatrix1668 = 0x00500684,
+ LedMatrix1669 = 0x00500685,
+ LedMatrix1670 = 0x00500686,
+ LedMatrix1671 = 0x00500687,
+ LedMatrix1672 = 0x00500688,
+ LedMatrix1673 = 0x00500689,
+ LedMatrix1674 = 0x0050068A,
+ LedMatrix1675 = 0x0050068B,
+ LedMatrix1676 = 0x0050068C,
+ LedMatrix1677 = 0x0050068D,
+ LedMatrix1678 = 0x0050068E,
+ LedMatrix1679 = 0x0050068F,
+ LedMatrix1680 = 0x00500690,
+ LedMatrix1681 = 0x00500691,
+ LedMatrix1682 = 0x00500692,
+ LedMatrix1683 = 0x00500693,
+ LedMatrix1684 = 0x00500694,
+ LedMatrix1685 = 0x00500695,
+ LedMatrix1686 = 0x00500696,
+ LedMatrix1687 = 0x00500697,
+ LedMatrix1688 = 0x00500698,
+ LedMatrix1689 = 0x00500699,
+ LedMatrix1690 = 0x0050069A,
+ LedMatrix1691 = 0x0050069B,
+ LedMatrix1692 = 0x0050069C,
+ LedMatrix1693 = 0x0050069D,
+ LedMatrix1694 = 0x0050069E,
+ LedMatrix1695 = 0x0050069F,
+ LedMatrix1696 = 0x005006A0,
+ LedMatrix1697 = 0x005006A1,
+ LedMatrix1698 = 0x005006A2,
+ LedMatrix1699 = 0x005006A3,
+ LedMatrix1700 = 0x005006A4,
+ LedMatrix1701 = 0x005006A5,
+ LedMatrix1702 = 0x005006A6,
+ LedMatrix1703 = 0x005006A7,
+ LedMatrix1704 = 0x005006A8,
+ LedMatrix1705 = 0x005006A9,
+ LedMatrix1706 = 0x005006AA,
+ LedMatrix1707 = 0x005006AB,
+ LedMatrix1708 = 0x005006AC,
+ LedMatrix1709 = 0x005006AD,
+ LedMatrix1710 = 0x005006AE,
+ LedMatrix1711 = 0x005006AF,
+ LedMatrix1712 = 0x005006B0,
+ LedMatrix1713 = 0x005006B1,
+ LedMatrix1714 = 0x005006B2,
+ LedMatrix1715 = 0x005006B3,
+ LedMatrix1716 = 0x005006B4,
+ LedMatrix1717 = 0x005006B5,
+ LedMatrix1718 = 0x005006B6,
+ LedMatrix1719 = 0x005006B7,
+ LedMatrix1720 = 0x005006B8,
+ LedMatrix1721 = 0x005006B9,
+ LedMatrix1722 = 0x005006BA,
+ LedMatrix1723 = 0x005006BB,
+ LedMatrix1724 = 0x005006BC,
+ LedMatrix1725 = 0x005006BD,
+ LedMatrix1726 = 0x005006BE,
+ LedMatrix1727 = 0x005006BF,
+ LedMatrix1728 = 0x005006C0,
+ LedMatrix1729 = 0x005006C1,
+ LedMatrix1730 = 0x005006C2,
+ LedMatrix1731 = 0x005006C3,
+ LedMatrix1732 = 0x005006C4,
+ LedMatrix1733 = 0x005006C5,
+ LedMatrix1734 = 0x005006C6,
+ LedMatrix1735 = 0x005006C7,
+ LedMatrix1736 = 0x005006C8,
+ LedMatrix1737 = 0x005006C9,
+ LedMatrix1738 = 0x005006CA,
+ LedMatrix1739 = 0x005006CB,
+ LedMatrix1740 = 0x005006CC,
+ LedMatrix1741 = 0x005006CD,
+ LedMatrix1742 = 0x005006CE,
+ LedMatrix1743 = 0x005006CF,
+ LedMatrix1744 = 0x005006D0,
+ LedMatrix1745 = 0x005006D1,
+ LedMatrix1746 = 0x005006D2,
+ LedMatrix1747 = 0x005006D3,
+ LedMatrix1748 = 0x005006D4,
+ LedMatrix1749 = 0x005006D5,
+ LedMatrix1750 = 0x005006D6,
+ LedMatrix1751 = 0x005006D7,
+ LedMatrix1752 = 0x005006D8,
+ LedMatrix1753 = 0x005006D9,
+ LedMatrix1754 = 0x005006DA,
+ LedMatrix1755 = 0x005006DB,
+ LedMatrix1756 = 0x005006DC,
+ LedMatrix1757 = 0x005006DD,
+ LedMatrix1758 = 0x005006DE,
+ LedMatrix1759 = 0x005006DF,
+ LedMatrix1760 = 0x005006E0,
+ LedMatrix1761 = 0x005006E1,
+ LedMatrix1762 = 0x005006E2,
+ LedMatrix1763 = 0x005006E3,
+ LedMatrix1764 = 0x005006E4,
+ LedMatrix1765 = 0x005006E5,
+ LedMatrix1766 = 0x005006E6,
+ LedMatrix1767 = 0x005006E7,
+ LedMatrix1768 = 0x005006E8,
+ LedMatrix1769 = 0x005006E9,
+ LedMatrix1770 = 0x005006EA,
+ LedMatrix1771 = 0x005006EB,
+ LedMatrix1772 = 0x005006EC,
+ LedMatrix1773 = 0x005006ED,
+ LedMatrix1774 = 0x005006EE,
+ LedMatrix1775 = 0x005006EF,
+ LedMatrix1776 = 0x005006F0,
+ LedMatrix1777 = 0x005006F1,
+ LedMatrix1778 = 0x005006F2,
+ LedMatrix1779 = 0x005006F3,
+ LedMatrix1780 = 0x005006F4,
+ LedMatrix1781 = 0x005006F5,
+ LedMatrix1782 = 0x005006F6,
+ LedMatrix1783 = 0x005006F7,
+ LedMatrix1784 = 0x005006F8,
+ LedMatrix1785 = 0x005006F9,
+ LedMatrix1786 = 0x005006FA,
+ LedMatrix1787 = 0x005006FB,
+ LedMatrix1788 = 0x005006FC,
+ LedMatrix1789 = 0x005006FD,
+ LedMatrix1790 = 0x005006FE,
+ LedMatrix1791 = 0x005006FF,
+ LedMatrix1792 = 0x00500700,
+ LedMatrix1793 = 0x00500701,
+ LedMatrix1794 = 0x00500702,
+ LedMatrix1795 = 0x00500703,
+ LedMatrix1796 = 0x00500704,
+ LedMatrix1797 = 0x00500705,
+ LedMatrix1798 = 0x00500706,
+ LedMatrix1799 = 0x00500707,
+ LedMatrix1800 = 0x00500708,
+ LedMatrix1801 = 0x00500709,
+ LedMatrix1802 = 0x0050070A,
+ LedMatrix1803 = 0x0050070B,
+ LedMatrix1804 = 0x0050070C,
+ LedMatrix1805 = 0x0050070D,
+ LedMatrix1806 = 0x0050070E,
+ LedMatrix1807 = 0x0050070F,
+ LedMatrix1808 = 0x00500710,
+ LedMatrix1809 = 0x00500711,
+ LedMatrix1810 = 0x00500712,
+ LedMatrix1811 = 0x00500713,
+ LedMatrix1812 = 0x00500714,
+ LedMatrix1813 = 0x00500715,
+ LedMatrix1814 = 0x00500716,
+ LedMatrix1815 = 0x00500717,
+ LedMatrix1816 = 0x00500718,
+ LedMatrix1817 = 0x00500719,
+ LedMatrix1818 = 0x0050071A,
+ LedMatrix1819 = 0x0050071B,
+ LedMatrix1820 = 0x0050071C,
+ LedMatrix1821 = 0x0050071D,
+ LedMatrix1822 = 0x0050071E,
+ LedMatrix1823 = 0x0050071F,
+ LedMatrix1824 = 0x00500720,
+ LedMatrix1825 = 0x00500721,
+ LedMatrix1826 = 0x00500722,
+ LedMatrix1827 = 0x00500723,
+ LedMatrix1828 = 0x00500724,
+ LedMatrix1829 = 0x00500725,
+ LedMatrix1830 = 0x00500726,
+ LedMatrix1831 = 0x00500727,
+ LedMatrix1832 = 0x00500728,
+ LedMatrix1833 = 0x00500729,
+ LedMatrix1834 = 0x0050072A,
+ LedMatrix1835 = 0x0050072B,
+ LedMatrix1836 = 0x0050072C,
+ LedMatrix1837 = 0x0050072D,
+ LedMatrix1838 = 0x0050072E,
+ LedMatrix1839 = 0x0050072F,
+ LedMatrix1840 = 0x00500730,
+ LedMatrix1841 = 0x00500731,
+ LedMatrix1842 = 0x00500732,
+ LedMatrix1843 = 0x00500733,
+ LedMatrix1844 = 0x00500734,
+ LedMatrix1845 = 0x00500735,
+ LedMatrix1846 = 0x00500736,
+ LedMatrix1847 = 0x00500737,
+ LedMatrix1848 = 0x00500738,
+ LedMatrix1849 = 0x00500739,
+ LedMatrix1850 = 0x0050073A,
+ LedMatrix1851 = 0x0050073B,
+ LedMatrix1852 = 0x0050073C,
+ LedMatrix1853 = 0x0050073D,
+ LedMatrix1854 = 0x0050073E,
+ LedMatrix1855 = 0x0050073F,
+ LedMatrix1856 = 0x00500740,
+ LedMatrix1857 = 0x00500741,
+ LedMatrix1858 = 0x00500742,
+ LedMatrix1859 = 0x00500743,
+ LedMatrix1860 = 0x00500744,
+ LedMatrix1861 = 0x00500745,
+ LedMatrix1862 = 0x00500746,
+ LedMatrix1863 = 0x00500747,
+ LedMatrix1864 = 0x00500748,
+ LedMatrix1865 = 0x00500749,
+ LedMatrix1866 = 0x0050074A,
+ LedMatrix1867 = 0x0050074B,
+ LedMatrix1868 = 0x0050074C,
+ LedMatrix1869 = 0x0050074D,
+ LedMatrix1870 = 0x0050074E,
+ LedMatrix1871 = 0x0050074F,
+ LedMatrix1872 = 0x00500750,
+ LedMatrix1873 = 0x00500751,
+ LedMatrix1874 = 0x00500752,
+ LedMatrix1875 = 0x00500753,
+ LedMatrix1876 = 0x00500754,
+ LedMatrix1877 = 0x00500755,
+ LedMatrix1878 = 0x00500756,
+ LedMatrix1879 = 0x00500757,
+ LedMatrix1880 = 0x00500758,
+ LedMatrix1881 = 0x00500759,
+ LedMatrix1882 = 0x0050075A,
+ LedMatrix1883 = 0x0050075B,
+ LedMatrix1884 = 0x0050075C,
+ LedMatrix1885 = 0x0050075D,
+ LedMatrix1886 = 0x0050075E,
+ LedMatrix1887 = 0x0050075F,
+ LedMatrix1888 = 0x00500760,
+ LedMatrix1889 = 0x00500761,
+ LedMatrix1890 = 0x00500762,
+ LedMatrix1891 = 0x00500763,
+ LedMatrix1892 = 0x00500764,
+ LedMatrix1893 = 0x00500765,
+ LedMatrix1894 = 0x00500766,
+ LedMatrix1895 = 0x00500767,
+ LedMatrix1896 = 0x00500768,
+ LedMatrix1897 = 0x00500769,
+ LedMatrix1898 = 0x0050076A,
+ LedMatrix1899 = 0x0050076B,
+ LedMatrix1900 = 0x0050076C,
+ LedMatrix1901 = 0x0050076D,
+ LedMatrix1902 = 0x0050076E,
+ LedMatrix1903 = 0x0050076F,
+ LedMatrix1904 = 0x00500770,
+ LedMatrix1905 = 0x00500771,
+ LedMatrix1906 = 0x00500772,
+ LedMatrix1907 = 0x00500773,
+ LedMatrix1908 = 0x00500774,
+ LedMatrix1909 = 0x00500775,
+ LedMatrix1910 = 0x00500776,
+ LedMatrix1911 = 0x00500777,
+ LedMatrix1912 = 0x00500778,
+ LedMatrix1913 = 0x00500779,
+ LedMatrix1914 = 0x0050077A,
+ LedMatrix1915 = 0x0050077B,
+ LedMatrix1916 = 0x0050077C,
+ LedMatrix1917 = 0x0050077D,
+ LedMatrix1918 = 0x0050077E,
+ LedMatrix1919 = 0x0050077F,
+ LedMatrix1920 = 0x00500780,
+ LedMatrix1921 = 0x00500781,
+ LedMatrix1922 = 0x00500782,
+ LedMatrix1923 = 0x00500783,
+ LedMatrix1924 = 0x00500784,
+ LedMatrix1925 = 0x00500785,
+ LedMatrix1926 = 0x00500786,
+ LedMatrix1927 = 0x00500787,
+ LedMatrix1928 = 0x00500788,
+ LedMatrix1929 = 0x00500789,
+ LedMatrix1930 = 0x0050078A,
+ LedMatrix1931 = 0x0050078B,
+ LedMatrix1932 = 0x0050078C,
+ LedMatrix1933 = 0x0050078D,
+ LedMatrix1934 = 0x0050078E,
+ LedMatrix1935 = 0x0050078F,
+ LedMatrix1936 = 0x00500790,
+ LedMatrix1937 = 0x00500791,
+ LedMatrix1938 = 0x00500792,
+ LedMatrix1939 = 0x00500793,
+ LedMatrix1940 = 0x00500794,
+ LedMatrix1941 = 0x00500795,
+ LedMatrix1942 = 0x00500796,
+ LedMatrix1943 = 0x00500797,
+ LedMatrix1944 = 0x00500798,
+ LedMatrix1945 = 0x00500799,
+ LedMatrix1946 = 0x0050079A,
+ LedMatrix1947 = 0x0050079B,
+ LedMatrix1948 = 0x0050079C,
+ LedMatrix1949 = 0x0050079D,
+ LedMatrix1950 = 0x0050079E,
+ LedMatrix1951 = 0x0050079F,
+ LedMatrix1952 = 0x005007A0,
+ LedMatrix1953 = 0x005007A1,
+ LedMatrix1954 = 0x005007A2,
+ LedMatrix1955 = 0x005007A3,
+ LedMatrix1956 = 0x005007A4,
+ LedMatrix1957 = 0x005007A5,
+ LedMatrix1958 = 0x005007A6,
+ LedMatrix1959 = 0x005007A7,
+ LedMatrix1960 = 0x005007A8,
+ LedMatrix1961 = 0x005007A9,
+ LedMatrix1962 = 0x005007AA,
+ LedMatrix1963 = 0x005007AB,
+ LedMatrix1964 = 0x005007AC,
+ LedMatrix1965 = 0x005007AD,
+ LedMatrix1966 = 0x005007AE,
+ LedMatrix1967 = 0x005007AF,
+ LedMatrix1968 = 0x005007B0,
+ LedMatrix1969 = 0x005007B1,
+ LedMatrix1970 = 0x005007B2,
+ LedMatrix1971 = 0x005007B3,
+ LedMatrix1972 = 0x005007B4,
+ LedMatrix1973 = 0x005007B5,
+ LedMatrix1974 = 0x005007B6,
+ LedMatrix1975 = 0x005007B7,
+ LedMatrix1976 = 0x005007B8,
+ LedMatrix1977 = 0x005007B9,
+ LedMatrix1978 = 0x005007BA,
+ LedMatrix1979 = 0x005007BB,
+ LedMatrix1980 = 0x005007BC,
+ LedMatrix1981 = 0x005007BD,
+ LedMatrix1982 = 0x005007BE,
+ LedMatrix1983 = 0x005007BF,
+ LedMatrix1984 = 0x005007C0,
+ LedMatrix1985 = 0x005007C1,
+ LedMatrix1986 = 0x005007C2,
+ LedMatrix1987 = 0x005007C3,
+ LedMatrix1988 = 0x005007C4,
+ LedMatrix1989 = 0x005007C5,
+ LedMatrix1990 = 0x005007C6,
+ LedMatrix1991 = 0x005007C7,
+ LedMatrix1992 = 0x005007C8,
+ LedMatrix1993 = 0x005007C9,
+ LedMatrix1994 = 0x005007CA,
+ LedMatrix1995 = 0x005007CB,
+ LedMatrix1996 = 0x005007CC,
+ LedMatrix1997 = 0x005007CD,
+ LedMatrix1998 = 0x005007CE,
+ LedMatrix1999 = 0x005007CF,
+ LedMatrix2000 = 0x005007D0,
+ LedMatrix2001 = 0x005007D1,
+ LedMatrix2002 = 0x005007D2,
+ LedMatrix2003 = 0x005007D3,
+ LedMatrix2004 = 0x005007D4,
+ LedMatrix2005 = 0x005007D5,
+ LedMatrix2006 = 0x005007D6,
+ LedMatrix2007 = 0x005007D7,
+ LedMatrix2008 = 0x005007D8,
+ LedMatrix2009 = 0x005007D9,
+ LedMatrix2010 = 0x005007DA,
+ LedMatrix2011 = 0x005007DB,
+ LedMatrix2012 = 0x005007DC,
+ LedMatrix2013 = 0x005007DD,
+ LedMatrix2014 = 0x005007DE,
+ LedMatrix2015 = 0x005007DF,
+ LedMatrix2016 = 0x005007E0,
+ LedMatrix2017 = 0x005007E1,
+ LedMatrix2018 = 0x005007E2,
+ LedMatrix2019 = 0x005007E3,
+ LedMatrix2020 = 0x005007E4,
+ LedMatrix2021 = 0x005007E5,
+ LedMatrix2022 = 0x005007E6,
+ LedMatrix2023 = 0x005007E7,
+ LedMatrix2024 = 0x005007E8,
+ LedMatrix2025 = 0x005007E9,
+ LedMatrix2026 = 0x005007EA,
+ LedMatrix2027 = 0x005007EB,
+ LedMatrix2028 = 0x005007EC,
+ LedMatrix2029 = 0x005007ED,
+ LedMatrix2030 = 0x005007EE,
+ LedMatrix2031 = 0x005007EF,
+ LedMatrix2032 = 0x005007F0,
+ LedMatrix2033 = 0x005007F1,
+ LedMatrix2034 = 0x005007F2,
+ LedMatrix2035 = 0x005007F3,
+ LedMatrix2036 = 0x005007F4,
+ LedMatrix2037 = 0x005007F5,
+ LedMatrix2038 = 0x005007F6,
+ LedMatrix2039 = 0x005007F7,
+ LedMatrix2040 = 0x005007F8,
+ LedMatrix2041 = 0x005007F9,
+ LedMatrix2042 = 0x005007FA,
+ LedMatrix2043 = 0x005007FB,
+ LedMatrix2044 = 0x005007FC,
+ LedMatrix2045 = 0x005007FD,
+ LedMatrix2046 = 0x005007FE,
+ LedMatrix2047 = 0x005007FF,
+ LedMatrix2048 = 0x00500800,
- /*### LedMatrix ###*/
- LedMatrix1 = 0x00500001,
- LedMatrix2 = 0x00500002,
- LedMatrix3 = 0x00500003,
- LedMatrix4 = 0x00500004,
- LedMatrix5 = 0x00500005,
- LedMatrix6 = 0x00500006,
- LedMatrix7 = 0x00500007,
- LedMatrix8 = 0x00500008,
- LedMatrix9 = 0x00500009,
- LedMatrix10 = 0x0050000A,
- LedMatrix11 = 0x0050000B,
- LedMatrix12 = 0x0050000C,
- LedMatrix13 = 0x0050000D,
- LedMatrix14 = 0x0050000E,
- LedMatrix15 = 0x0050000F,
- LedMatrix16 = 0x00500010,
- LedMatrix17 = 0x00500011,
- LedMatrix18 = 0x00500012,
- LedMatrix19 = 0x00500013,
- LedMatrix20 = 0x00500014,
- LedMatrix21 = 0x00500015,
- LedMatrix22 = 0x00500016,
- LedMatrix23 = 0x00500017,
- LedMatrix24 = 0x00500018,
- LedMatrix25 = 0x00500019,
- LedMatrix26 = 0x0050001A,
- LedMatrix27 = 0x0050001B,
- LedMatrix28 = 0x0050001C,
- LedMatrix29 = 0x0050001D,
- LedMatrix30 = 0x0050001E,
- LedMatrix31 = 0x0050001F,
- LedMatrix32 = 0x00500020,
- LedMatrix33 = 0x00500021,
- LedMatrix34 = 0x00500022,
- LedMatrix35 = 0x00500023,
- LedMatrix36 = 0x00500024,
- LedMatrix37 = 0x00500025,
- LedMatrix38 = 0x00500026,
- LedMatrix39 = 0x00500027,
- LedMatrix40 = 0x00500028,
- LedMatrix41 = 0x00500029,
- LedMatrix42 = 0x0050002A,
- LedMatrix43 = 0x0050002B,
- LedMatrix44 = 0x0050002C,
- LedMatrix45 = 0x0050002D,
- LedMatrix46 = 0x0050002E,
- LedMatrix47 = 0x0050002F,
- LedMatrix48 = 0x00500030,
- LedMatrix49 = 0x00500031,
- LedMatrix50 = 0x00500032,
- LedMatrix51 = 0x00500033,
- LedMatrix52 = 0x00500034,
- LedMatrix53 = 0x00500035,
- LedMatrix54 = 0x00500036,
- LedMatrix55 = 0x00500037,
- LedMatrix56 = 0x00500038,
- LedMatrix57 = 0x00500039,
- LedMatrix58 = 0x0050003A,
- LedMatrix59 = 0x0050003B,
- LedMatrix60 = 0x0050003C,
- LedMatrix61 = 0x0050003D,
- LedMatrix62 = 0x0050003E,
- LedMatrix63 = 0x0050003F,
- LedMatrix64 = 0x00500040,
- LedMatrix665 = 0x00500041,
- LedMatrix666 = 0x00500042,
- LedMatrix667 = 0x00500043,
- LedMatrix668 = 0x00500044,
- LedMatrix669 = 0x00500045,
- LedMatrix670 = 0x00500046,
- LedMatrix671 = 0x00500047,
- LedMatrix672 = 0x00500048,
- LedMatrix673 = 0x00500049,
- LedMatrix674 = 0x0050004A,
- LedMatrix675 = 0x0050004B,
- LedMatrix676 = 0x0050004C,
- LedMatrix677 = 0x0050004D,
- LedMatrix678 = 0x0050004E,
- LedMatrix679 = 0x0050004F,
- LedMatrix680 = 0x00500050,
- LedMatrix681 = 0x00500051,
- LedMatrix682 = 0x00500052,
- LedMatrix683 = 0x00500053,
- LedMatrix684 = 0x00500054,
- LedMatrix685 = 0x00500055,
- LedMatrix686 = 0x00500056,
- LedMatrix687 = 0x00500057,
- LedMatrix688 = 0x00500058,
- LedMatrix689 = 0x00500059,
- LedMatrix690 = 0x0050005A,
- LedMatrix691 = 0x0050005B,
- LedMatrix692 = 0x0050005C,
- LedMatrix693 = 0x0050005D,
- LedMatrix694 = 0x0050005E,
- LedMatrix695 = 0x0050005F,
- LedMatrix696 = 0x00500060,
- LedMatrix697 = 0x00500061,
- LedMatrix698 = 0x00500062,
- LedMatrix699 = 0x00500063,
- LedMatrix6100 = 0x00500064,
- LedMatrix6101 = 0x00500065,
- LedMatrix6102 = 0x00500066,
- LedMatrix6103 = 0x00500067,
- LedMatrix6104 = 0x00500068,
- LedMatrix6105 = 0x00500069,
- LedMatrix6106 = 0x0050006A,
- LedMatrix6107 = 0x0050006B,
- LedMatrix6108 = 0x0050006C,
- LedMatrix6109 = 0x0050006D,
- LedMatrix6110 = 0x0050006E,
- LedMatrix6111 = 0x0050006F,
- LedMatrix6112 = 0x00500070,
- LedMatrix6113 = 0x00500071,
- LedMatrix6114 = 0x00500072,
- LedMatrix6115 = 0x00500073,
- LedMatrix6116 = 0x00500074,
- LedMatrix6117 = 0x00500075,
- LedMatrix6118 = 0x00500076,
- LedMatrix6119 = 0x00500077,
- LedMatrix6120 = 0x00500078,
- LedMatrix6121 = 0x00500079,
- LedMatrix6122 = 0x0050007A,
- LedMatrix6123 = 0x0050007B,
- LedMatrix6124 = 0x0050007C,
- LedMatrix6125 = 0x0050007D,
- LedMatrix6126 = 0x0050007E,
- LedMatrix6127 = 0x0050007F,
- LedMatrix6128 = 0x00500080,
+ /*### Mainboard ###*/
+ Mainboard1 = 0x00600001,
+ Mainboard2 = 0x00600002,
+ Mainboard3 = 0x00600003,
+ Mainboard4 = 0x00600004,
+ Mainboard5 = 0x00600005,
+ Mainboard6 = 0x00600006,
+ Mainboard7 = 0x00600007,
+ Mainboard8 = 0x00600008,
+ Mainboard9 = 0x00600009,
+ Mainboard10 = 0x0060000A,
+ Mainboard11 = 0x0060000B,
+ Mainboard12 = 0x0060000C,
+ Mainboard13 = 0x0060000D,
+ Mainboard14 = 0x0060000E,
+ Mainboard15 = 0x0060000F,
+ Mainboard16 = 0x00600010,
+ Mainboard17 = 0x00600011,
+ Mainboard18 = 0x00600012,
+ Mainboard19 = 0x00600013,
+ Mainboard20 = 0x00600014,
+ Mainboard21 = 0x00600015,
+ Mainboard22 = 0x00600016,
+ Mainboard23 = 0x00600017,
+ Mainboard24 = 0x00600018,
+ Mainboard25 = 0x00600019,
+ Mainboard26 = 0x0060001A,
+ Mainboard27 = 0x0060001B,
+ Mainboard28 = 0x0060001C,
+ Mainboard29 = 0x0060001D,
+ Mainboard30 = 0x0060001E,
+ Mainboard31 = 0x0060001F,
+ Mainboard32 = 0x00600020,
+ Mainboard33 = 0x00600021,
+ Mainboard34 = 0x00600022,
+ Mainboard35 = 0x00600023,
+ Mainboard36 = 0x00600024,
+ Mainboard37 = 0x00600025,
+ Mainboard38 = 0x00600026,
+ Mainboard39 = 0x00600027,
+ Mainboard40 = 0x00600028,
+ Mainboard41 = 0x00600029,
+ Mainboard42 = 0x0060002A,
+ Mainboard43 = 0x0060002B,
+ Mainboard44 = 0x0060002C,
+ Mainboard45 = 0x0060002D,
+ Mainboard46 = 0x0060002E,
+ Mainboard47 = 0x0060002F,
+ Mainboard48 = 0x00600030,
+ Mainboard49 = 0x00600031,
+ Mainboard50 = 0x00600032,
+ Mainboard51 = 0x00600033,
+ Mainboard52 = 0x00600034,
+ Mainboard53 = 0x00600035,
+ Mainboard54 = 0x00600036,
+ Mainboard55 = 0x00600037,
+ Mainboard56 = 0x00600038,
+ Mainboard57 = 0x00600039,
+ Mainboard58 = 0x0060003A,
+ Mainboard59 = 0x0060003B,
+ Mainboard60 = 0x0060003C,
+ Mainboard61 = 0x0060003D,
+ Mainboard62 = 0x0060003E,
+ Mainboard63 = 0x0060003F,
+ Mainboard64 = 0x00600040,
+ Mainboard65 = 0x00600041,
+ Mainboard66 = 0x00600042,
+ Mainboard67 = 0x00600043,
+ Mainboard68 = 0x00600044,
+ Mainboard69 = 0x00600045,
+ Mainboard70 = 0x00600046,
+ Mainboard71 = 0x00600047,
+ Mainboard72 = 0x00600048,
+ Mainboard73 = 0x00600049,
+ Mainboard74 = 0x0060004A,
+ Mainboard75 = 0x0060004B,
+ Mainboard76 = 0x0060004C,
+ Mainboard77 = 0x0060004D,
+ Mainboard78 = 0x0060004E,
+ Mainboard79 = 0x0060004F,
+ Mainboard80 = 0x00600050,
+ Mainboard81 = 0x00600051,
+ Mainboard82 = 0x00600052,
+ Mainboard83 = 0x00600053,
+ Mainboard84 = 0x00600054,
+ Mainboard85 = 0x00600055,
+ Mainboard86 = 0x00600056,
+ Mainboard87 = 0x00600057,
+ Mainboard88 = 0x00600058,
+ Mainboard89 = 0x00600059,
+ Mainboard90 = 0x0060005A,
+ Mainboard91 = 0x0060005B,
+ Mainboard92 = 0x0060005C,
+ Mainboard93 = 0x0060005D,
+ Mainboard94 = 0x0060005E,
+ Mainboard95 = 0x0060005F,
+ Mainboard96 = 0x00600060,
+ Mainboard97 = 0x00600061,
+ Mainboard98 = 0x00600062,
+ Mainboard99 = 0x00600063,
+ Mainboard100 = 0x00600064,
+ Mainboard101 = 0x00600065,
+ Mainboard102 = 0x00600066,
+ Mainboard103 = 0x00600067,
+ Mainboard104 = 0x00600068,
+ Mainboard105 = 0x00600069,
+ Mainboard106 = 0x0060006A,
+ Mainboard107 = 0x0060006B,
+ Mainboard108 = 0x0060006C,
+ Mainboard109 = 0x0060006D,
+ Mainboard110 = 0x0060006E,
+ Mainboard111 = 0x0060006F,
+ Mainboard112 = 0x00600070,
+ Mainboard113 = 0x00600071,
+ Mainboard114 = 0x00600072,
+ Mainboard115 = 0x00600073,
+ Mainboard116 = 0x00600074,
+ Mainboard117 = 0x00600075,
+ Mainboard118 = 0x00600076,
+ Mainboard119 = 0x00600077,
+ Mainboard120 = 0x00600078,
+ Mainboard121 = 0x00600079,
+ Mainboard122 = 0x0060007A,
+ Mainboard123 = 0x0060007B,
+ Mainboard124 = 0x0060007C,
+ Mainboard125 = 0x0060007D,
+ Mainboard126 = 0x0060007E,
+ Mainboard127 = 0x0060007F,
+ Mainboard128 = 0x00600080,
+ Mainboard129 = 0x00600081,
+ Mainboard130 = 0x00600082,
+ Mainboard131 = 0x00600083,
+ Mainboard132 = 0x00600084,
+ Mainboard133 = 0x00600085,
+ Mainboard134 = 0x00600086,
+ Mainboard135 = 0x00600087,
+ Mainboard136 = 0x00600088,
+ Mainboard137 = 0x00600089,
+ Mainboard138 = 0x0060008A,
+ Mainboard139 = 0x0060008B,
+ Mainboard140 = 0x0060008C,
+ Mainboard141 = 0x0060008D,
+ Mainboard142 = 0x0060008E,
+ Mainboard143 = 0x0060008F,
+ Mainboard144 = 0x00600090,
+ Mainboard145 = 0x00600091,
+ Mainboard146 = 0x00600092,
+ Mainboard147 = 0x00600093,
+ Mainboard148 = 0x00600094,
+ Mainboard149 = 0x00600095,
+ Mainboard150 = 0x00600096,
+ Mainboard151 = 0x00600097,
+ Mainboard152 = 0x00600098,
+ Mainboard153 = 0x00600099,
+ Mainboard154 = 0x0060009A,
+ Mainboard155 = 0x0060009B,
+ Mainboard156 = 0x0060009C,
+ Mainboard157 = 0x0060009D,
+ Mainboard158 = 0x0060009E,
+ Mainboard159 = 0x0060009F,
+ Mainboard160 = 0x006000A0,
+ Mainboard161 = 0x006000A1,
+ Mainboard162 = 0x006000A2,
+ Mainboard163 = 0x006000A3,
+ Mainboard164 = 0x006000A4,
+ Mainboard165 = 0x006000A5,
+ Mainboard166 = 0x006000A6,
+ Mainboard167 = 0x006000A7,
+ Mainboard168 = 0x006000A8,
+ Mainboard169 = 0x006000A9,
+ Mainboard170 = 0x006000AA,
+ Mainboard171 = 0x006000AB,
+ Mainboard172 = 0x006000AC,
+ Mainboard173 = 0x006000AD,
+ Mainboard174 = 0x006000AE,
+ Mainboard175 = 0x006000AF,
+ Mainboard176 = 0x006000B0,
+ Mainboard177 = 0x006000B1,
+ Mainboard178 = 0x006000B2,
+ Mainboard179 = 0x006000B3,
+ Mainboard180 = 0x006000B4,
+ Mainboard181 = 0x006000B5,
+ Mainboard182 = 0x006000B6,
+ Mainboard183 = 0x006000B7,
+ Mainboard184 = 0x006000B8,
+ Mainboard185 = 0x006000B9,
+ Mainboard186 = 0x006000BA,
+ Mainboard187 = 0x006000BB,
+ Mainboard188 = 0x006000BC,
+ Mainboard189 = 0x006000BD,
+ Mainboard190 = 0x006000BE,
+ Mainboard191 = 0x006000BF,
+ Mainboard192 = 0x006000C0,
+ Mainboard193 = 0x006000C1,
+ Mainboard194 = 0x006000C2,
+ Mainboard195 = 0x006000C3,
+ Mainboard196 = 0x006000C4,
+ Mainboard197 = 0x006000C5,
+ Mainboard198 = 0x006000C6,
+ Mainboard199 = 0x006000C7,
+ Mainboard200 = 0x006000C8,
+ Mainboard201 = 0x006000C9,
+ Mainboard202 = 0x006000CA,
+ Mainboard203 = 0x006000CB,
+ Mainboard204 = 0x006000CC,
+ Mainboard205 = 0x006000CD,
+ Mainboard206 = 0x006000CE,
+ Mainboard207 = 0x006000CF,
+ Mainboard208 = 0x006000D0,
+ Mainboard209 = 0x006000D1,
+ Mainboard210 = 0x006000D2,
+ Mainboard211 = 0x006000D3,
+ Mainboard212 = 0x006000D4,
+ Mainboard213 = 0x006000D5,
+ Mainboard214 = 0x006000D6,
+ Mainboard215 = 0x006000D7,
+ Mainboard216 = 0x006000D8,
+ Mainboard217 = 0x006000D9,
+ Mainboard218 = 0x006000DA,
+ Mainboard219 = 0x006000DB,
+ Mainboard220 = 0x006000DC,
+ Mainboard221 = 0x006000DD,
+ Mainboard222 = 0x006000DE,
+ Mainboard223 = 0x006000DF,
+ Mainboard224 = 0x006000E0,
+ Mainboard225 = 0x006000E1,
+ Mainboard226 = 0x006000E2,
+ Mainboard227 = 0x006000E3,
+ Mainboard228 = 0x006000E4,
+ Mainboard229 = 0x006000E5,
+ Mainboard230 = 0x006000E6,
+ Mainboard231 = 0x006000E7,
+ Mainboard232 = 0x006000E8,
+ Mainboard233 = 0x006000E9,
+ Mainboard234 = 0x006000EA,
+ Mainboard235 = 0x006000EB,
+ Mainboard236 = 0x006000EC,
+ Mainboard237 = 0x006000ED,
+ Mainboard238 = 0x006000EE,
+ Mainboard239 = 0x006000EF,
+ Mainboard240 = 0x006000F0,
+ Mainboard241 = 0x006000F1,
+ Mainboard242 = 0x006000F2,
+ Mainboard243 = 0x006000F3,
+ Mainboard244 = 0x006000F4,
+ Mainboard245 = 0x006000F5,
+ Mainboard246 = 0x006000F6,
+ Mainboard247 = 0x006000F7,
+ Mainboard248 = 0x006000F8,
+ Mainboard249 = 0x006000F9,
+ Mainboard250 = 0x006000FA,
+ Mainboard251 = 0x006000FB,
+ Mainboard252 = 0x006000FC,
+ Mainboard253 = 0x006000FD,
+ Mainboard254 = 0x006000FE,
+ Mainboard255 = 0x006000FF,
+ Mainboard256 = 0x00600100,
+ Mainboard257 = 0x00600101,
+ Mainboard258 = 0x00600102,
+ Mainboard259 = 0x00600103,
+ Mainboard260 = 0x00600104,
+ Mainboard261 = 0x00600105,
+ Mainboard262 = 0x00600106,
+ Mainboard263 = 0x00600107,
+ Mainboard264 = 0x00600108,
+ Mainboard265 = 0x00600109,
+ Mainboard266 = 0x0060010A,
+ Mainboard267 = 0x0060010B,
+ Mainboard268 = 0x0060010C,
+ Mainboard269 = 0x0060010D,
+ Mainboard270 = 0x0060010E,
+ Mainboard271 = 0x0060010F,
+ Mainboard272 = 0x00600110,
+ Mainboard273 = 0x00600111,
+ Mainboard274 = 0x00600112,
+ Mainboard275 = 0x00600113,
+ Mainboard276 = 0x00600114,
+ Mainboard277 = 0x00600115,
+ Mainboard278 = 0x00600116,
+ Mainboard279 = 0x00600117,
+ Mainboard280 = 0x00600118,
+ Mainboard281 = 0x00600119,
+ Mainboard282 = 0x0060011A,
+ Mainboard283 = 0x0060011B,
+ Mainboard284 = 0x0060011C,
+ Mainboard285 = 0x0060011D,
+ Mainboard286 = 0x0060011E,
+ Mainboard287 = 0x0060011F,
+ Mainboard288 = 0x00600120,
+ Mainboard289 = 0x00600121,
+ Mainboard290 = 0x00600122,
+ Mainboard291 = 0x00600123,
+ Mainboard292 = 0x00600124,
+ Mainboard293 = 0x00600125,
+ Mainboard294 = 0x00600126,
+ Mainboard295 = 0x00600127,
+ Mainboard296 = 0x00600128,
+ Mainboard297 = 0x00600129,
+ Mainboard298 = 0x0060012A,
+ Mainboard299 = 0x0060012B,
+ Mainboard300 = 0x0060012C,
+ Mainboard301 = 0x0060012D,
+ Mainboard302 = 0x0060012E,
+ Mainboard303 = 0x0060012F,
+ Mainboard304 = 0x00600130,
+ Mainboard305 = 0x00600131,
+ Mainboard306 = 0x00600132,
+ Mainboard307 = 0x00600133,
+ Mainboard308 = 0x00600134,
+ Mainboard309 = 0x00600135,
+ Mainboard310 = 0x00600136,
+ Mainboard311 = 0x00600137,
+ Mainboard312 = 0x00600138,
+ Mainboard313 = 0x00600139,
+ Mainboard314 = 0x0060013A,
+ Mainboard315 = 0x0060013B,
+ Mainboard316 = 0x0060013C,
+ Mainboard317 = 0x0060013D,
+ Mainboard318 = 0x0060013E,
+ Mainboard319 = 0x0060013F,
+ Mainboard320 = 0x00600140,
+ Mainboard321 = 0x00600141,
+ Mainboard322 = 0x00600142,
+ Mainboard323 = 0x00600143,
+ Mainboard324 = 0x00600144,
+ Mainboard325 = 0x00600145,
+ Mainboard326 = 0x00600146,
+ Mainboard327 = 0x00600147,
+ Mainboard328 = 0x00600148,
+ Mainboard329 = 0x00600149,
+ Mainboard330 = 0x0060014A,
+ Mainboard331 = 0x0060014B,
+ Mainboard332 = 0x0060014C,
+ Mainboard333 = 0x0060014D,
+ Mainboard334 = 0x0060014E,
+ Mainboard335 = 0x0060014F,
+ Mainboard336 = 0x00600150,
+ Mainboard337 = 0x00600151,
+ Mainboard338 = 0x00600152,
+ Mainboard339 = 0x00600153,
+ Mainboard340 = 0x00600154,
+ Mainboard341 = 0x00600155,
+ Mainboard342 = 0x00600156,
+ Mainboard343 = 0x00600157,
+ Mainboard344 = 0x00600158,
+ Mainboard345 = 0x00600159,
+ Mainboard346 = 0x0060015A,
+ Mainboard347 = 0x0060015B,
+ Mainboard348 = 0x0060015C,
+ Mainboard349 = 0x0060015D,
+ Mainboard350 = 0x0060015E,
+ Mainboard351 = 0x0060015F,
+ Mainboard352 = 0x00600160,
+ Mainboard353 = 0x00600161,
+ Mainboard354 = 0x00600162,
+ Mainboard355 = 0x00600163,
+ Mainboard356 = 0x00600164,
+ Mainboard357 = 0x00600165,
+ Mainboard358 = 0x00600166,
+ Mainboard359 = 0x00600167,
+ Mainboard360 = 0x00600168,
+ Mainboard361 = 0x00600169,
+ Mainboard362 = 0x0060016A,
+ Mainboard363 = 0x0060016B,
+ Mainboard364 = 0x0060016C,
+ Mainboard365 = 0x0060016D,
+ Mainboard366 = 0x0060016E,
+ Mainboard367 = 0x0060016F,
+ Mainboard368 = 0x00600170,
+ Mainboard369 = 0x00600171,
+ Mainboard370 = 0x00600172,
+ Mainboard371 = 0x00600173,
+ Mainboard372 = 0x00600174,
+ Mainboard373 = 0x00600175,
+ Mainboard374 = 0x00600176,
+ Mainboard375 = 0x00600177,
+ Mainboard376 = 0x00600178,
+ Mainboard377 = 0x00600179,
+ Mainboard378 = 0x0060017A,
+ Mainboard379 = 0x0060017B,
+ Mainboard380 = 0x0060017C,
+ Mainboard381 = 0x0060017D,
+ Mainboard382 = 0x0060017E,
+ Mainboard383 = 0x0060017F,
+ Mainboard384 = 0x00600180,
+ Mainboard385 = 0x00600181,
+ Mainboard386 = 0x00600182,
+ Mainboard387 = 0x00600183,
+ Mainboard388 = 0x00600184,
+ Mainboard389 = 0x00600185,
+ Mainboard390 = 0x00600186,
+ Mainboard391 = 0x00600187,
+ Mainboard392 = 0x00600188,
+ Mainboard393 = 0x00600189,
+ Mainboard394 = 0x0060018A,
+ Mainboard395 = 0x0060018B,
+ Mainboard396 = 0x0060018C,
+ Mainboard397 = 0x0060018D,
+ Mainboard398 = 0x0060018E,
+ Mainboard399 = 0x0060018F,
+ Mainboard400 = 0x00600190,
+ Mainboard401 = 0x00600191,
+ Mainboard402 = 0x00600192,
+ Mainboard403 = 0x00600193,
+ Mainboard404 = 0x00600194,
+ Mainboard405 = 0x00600195,
+ Mainboard406 = 0x00600196,
+ Mainboard407 = 0x00600197,
+ Mainboard408 = 0x00600198,
+ Mainboard409 = 0x00600199,
+ Mainboard410 = 0x0060019A,
+ Mainboard411 = 0x0060019B,
+ Mainboard412 = 0x0060019C,
+ Mainboard413 = 0x0060019D,
+ Mainboard414 = 0x0060019E,
+ Mainboard415 = 0x0060019F,
+ Mainboard416 = 0x006001A0,
+ Mainboard417 = 0x006001A1,
+ Mainboard418 = 0x006001A2,
+ Mainboard419 = 0x006001A3,
+ Mainboard420 = 0x006001A4,
+ Mainboard421 = 0x006001A5,
+ Mainboard422 = 0x006001A6,
+ Mainboard423 = 0x006001A7,
+ Mainboard424 = 0x006001A8,
+ Mainboard425 = 0x006001A9,
+ Mainboard426 = 0x006001AA,
+ Mainboard427 = 0x006001AB,
+ Mainboard428 = 0x006001AC,
+ Mainboard429 = 0x006001AD,
+ Mainboard430 = 0x006001AE,
+ Mainboard431 = 0x006001AF,
+ Mainboard432 = 0x006001B0,
+ Mainboard433 = 0x006001B1,
+ Mainboard434 = 0x006001B2,
+ Mainboard435 = 0x006001B3,
+ Mainboard436 = 0x006001B4,
+ Mainboard437 = 0x006001B5,
+ Mainboard438 = 0x006001B6,
+ Mainboard439 = 0x006001B7,
+ Mainboard440 = 0x006001B8,
+ Mainboard441 = 0x006001B9,
+ Mainboard442 = 0x006001BA,
+ Mainboard443 = 0x006001BB,
+ Mainboard444 = 0x006001BC,
+ Mainboard445 = 0x006001BD,
+ Mainboard446 = 0x006001BE,
+ Mainboard447 = 0x006001BF,
+ Mainboard448 = 0x006001C0,
+ Mainboard449 = 0x006001C1,
+ Mainboard450 = 0x006001C2,
+ Mainboard451 = 0x006001C3,
+ Mainboard452 = 0x006001C4,
+ Mainboard453 = 0x006001C5,
+ Mainboard454 = 0x006001C6,
+ Mainboard455 = 0x006001C7,
+ Mainboard456 = 0x006001C8,
+ Mainboard457 = 0x006001C9,
+ Mainboard458 = 0x006001CA,
+ Mainboard459 = 0x006001CB,
+ Mainboard460 = 0x006001CC,
+ Mainboard461 = 0x006001CD,
+ Mainboard462 = 0x006001CE,
+ Mainboard463 = 0x006001CF,
+ Mainboard464 = 0x006001D0,
+ Mainboard465 = 0x006001D1,
+ Mainboard466 = 0x006001D2,
+ Mainboard467 = 0x006001D3,
+ Mainboard468 = 0x006001D4,
+ Mainboard469 = 0x006001D5,
+ Mainboard470 = 0x006001D6,
+ Mainboard471 = 0x006001D7,
+ Mainboard472 = 0x006001D8,
+ Mainboard473 = 0x006001D9,
+ Mainboard474 = 0x006001DA,
+ Mainboard475 = 0x006001DB,
+ Mainboard476 = 0x006001DC,
+ Mainboard477 = 0x006001DD,
+ Mainboard478 = 0x006001DE,
+ Mainboard479 = 0x006001DF,
+ Mainboard480 = 0x006001E0,
+ Mainboard481 = 0x006001E1,
+ Mainboard482 = 0x006001E2,
+ Mainboard483 = 0x006001E3,
+ Mainboard484 = 0x006001E4,
+ Mainboard485 = 0x006001E5,
+ Mainboard486 = 0x006001E6,
+ Mainboard487 = 0x006001E7,
+ Mainboard488 = 0x006001E8,
+ Mainboard489 = 0x006001E9,
+ Mainboard490 = 0x006001EA,
+ Mainboard491 = 0x006001EB,
+ Mainboard492 = 0x006001EC,
+ Mainboard493 = 0x006001ED,
+ Mainboard494 = 0x006001EE,
+ Mainboard495 = 0x006001EF,
+ Mainboard496 = 0x006001F0,
+ Mainboard497 = 0x006001F1,
+ Mainboard498 = 0x006001F2,
+ Mainboard499 = 0x006001F3,
+ Mainboard500 = 0x006001F4,
+ Mainboard501 = 0x006001F5,
+ Mainboard502 = 0x006001F6,
+ Mainboard503 = 0x006001F7,
+ Mainboard504 = 0x006001F8,
+ Mainboard505 = 0x006001F9,
+ Mainboard506 = 0x006001FA,
+ Mainboard507 = 0x006001FB,
+ Mainboard508 = 0x006001FC,
+ Mainboard509 = 0x006001FD,
+ Mainboard510 = 0x006001FE,
+ Mainboard511 = 0x006001FF,
+ Mainboard512 = 0x00600200,
- /*### Mainboard ###*/
- Mainboard1 = 0x00600001,
- Mainboard2 = 0x00600002,
- Mainboard3 = 0x00600003,
- Mainboard4 = 0x00600004,
- Mainboard5 = 0x00600005,
- Mainboard6 = 0x00600006,
- Mainboard7 = 0x00600007,
- Mainboard8 = 0x00600008,
- Mainboard9 = 0x00600009,
- Mainboard10 = 0x0060000A,
- Mainboard11 = 0x0060000B,
- Mainboard12 = 0x0060000C,
- Mainboard13 = 0x0060000D,
- Mainboard14 = 0x0060000E,
- Mainboard15 = 0x0060000F,
- Mainboard16 = 0x00600010,
- Mainboard17 = 0x00600011,
- Mainboard18 = 0x00600012,
- Mainboard19 = 0x00600013,
- Mainboard20 = 0x00600014,
- Mainboard21 = 0x00600015,
- Mainboard22 = 0x00600016,
- Mainboard23 = 0x00600017,
- Mainboard24 = 0x00600018,
- Mainboard25 = 0x00600019,
- Mainboard26 = 0x0060001A,
- Mainboard27 = 0x0060001B,
- Mainboard28 = 0x0060001C,
- Mainboard29 = 0x0060001D,
- Mainboard30 = 0x0060001E,
- Mainboard31 = 0x0060001F,
- Mainboard32 = 0x00600020,
- Mainboard33 = 0x00600021,
- Mainboard34 = 0x00600022,
- Mainboard35 = 0x00600023,
- Mainboard36 = 0x00600024,
- Mainboard37 = 0x00600025,
- Mainboard38 = 0x00600026,
- Mainboard39 = 0x00600027,
- Mainboard40 = 0x00600028,
- Mainboard41 = 0x00600029,
- Mainboard42 = 0x0060002A,
- Mainboard43 = 0x0060002B,
- Mainboard44 = 0x0060002C,
- Mainboard45 = 0x0060002D,
- Mainboard46 = 0x0060002E,
- Mainboard47 = 0x0060002F,
- Mainboard48 = 0x00600030,
- Mainboard49 = 0x00600031,
- Mainboard50 = 0x00600032,
- Mainboard51 = 0x00600033,
- Mainboard52 = 0x00600034,
- Mainboard53 = 0x00600035,
- Mainboard54 = 0x00600036,
- Mainboard55 = 0x00600037,
- Mainboard56 = 0x00600038,
- Mainboard57 = 0x00600039,
- Mainboard58 = 0x0060003A,
- Mainboard59 = 0x0060003B,
- Mainboard60 = 0x0060003C,
- Mainboard61 = 0x0060003D,
- Mainboard62 = 0x0060003E,
- Mainboard63 = 0x0060003F,
- Mainboard64 = 0x00600040,
+ /*### GraphicsCard ###*/
+ GraphicsCard1 = 0x00700001,
+ GraphicsCard2 = 0x00700002,
+ GraphicsCard3 = 0x00700003,
+ GraphicsCard4 = 0x00700004,
+ GraphicsCard5 = 0x00700005,
+ GraphicsCard6 = 0x00700006,
+ GraphicsCard7 = 0x00700007,
+ GraphicsCard8 = 0x00700008,
+ GraphicsCard9 = 0x00700009,
+ GraphicsCard10 = 0x0070000A,
+ GraphicsCard11 = 0x0070000B,
+ GraphicsCard12 = 0x0070000C,
+ GraphicsCard13 = 0x0070000D,
+ GraphicsCard14 = 0x0070000E,
+ GraphicsCard15 = 0x0070000F,
+ GraphicsCard16 = 0x00700010,
+ GraphicsCard17 = 0x00700011,
+ GraphicsCard18 = 0x00700012,
+ GraphicsCard19 = 0x00700013,
+ GraphicsCard20 = 0x00700014,
+ GraphicsCard21 = 0x00700015,
+ GraphicsCard22 = 0x00700016,
+ GraphicsCard23 = 0x00700017,
+ GraphicsCard24 = 0x00700018,
+ GraphicsCard25 = 0x00700019,
+ GraphicsCard26 = 0x0070001A,
+ GraphicsCard27 = 0x0070001B,
+ GraphicsCard28 = 0x0070001C,
+ GraphicsCard29 = 0x0070001D,
+ GraphicsCard30 = 0x0070001E,
+ GraphicsCard31 = 0x0070001F,
+ GraphicsCard32 = 0x00700020,
+ GraphicsCard33 = 0x00700021,
+ GraphicsCard34 = 0x00700022,
+ GraphicsCard35 = 0x00700023,
+ GraphicsCard36 = 0x00700024,
+ GraphicsCard37 = 0x00700025,
+ GraphicsCard38 = 0x00700026,
+ GraphicsCard39 = 0x00700027,
+ GraphicsCard40 = 0x00700028,
+ GraphicsCard41 = 0x00700029,
+ GraphicsCard42 = 0x0070002A,
+ GraphicsCard43 = 0x0070002B,
+ GraphicsCard44 = 0x0070002C,
+ GraphicsCard45 = 0x0070002D,
+ GraphicsCard46 = 0x0070002E,
+ GraphicsCard47 = 0x0070002F,
+ GraphicsCard48 = 0x00700030,
+ GraphicsCard49 = 0x00700031,
+ GraphicsCard50 = 0x00700032,
+ GraphicsCard51 = 0x00700033,
+ GraphicsCard52 = 0x00700034,
+ GraphicsCard53 = 0x00700035,
+ GraphicsCard54 = 0x00700036,
+ GraphicsCard55 = 0x00700037,
+ GraphicsCard56 = 0x00700038,
+ GraphicsCard57 = 0x00700039,
+ GraphicsCard58 = 0x0070003A,
+ GraphicsCard59 = 0x0070003B,
+ GraphicsCard60 = 0x0070003C,
+ GraphicsCard61 = 0x0070003D,
+ GraphicsCard62 = 0x0070003E,
+ GraphicsCard63 = 0x0070003F,
+ GraphicsCard64 = 0x00700040,
+ GraphicsCard65 = 0x00700041,
+ GraphicsCard66 = 0x00700042,
+ GraphicsCard67 = 0x00700043,
+ GraphicsCard68 = 0x00700044,
+ GraphicsCard69 = 0x00700045,
+ GraphicsCard70 = 0x00700046,
+ GraphicsCard71 = 0x00700047,
+ GraphicsCard72 = 0x00700048,
+ GraphicsCard73 = 0x00700049,
+ GraphicsCard74 = 0x0070004A,
+ GraphicsCard75 = 0x0070004B,
+ GraphicsCard76 = 0x0070004C,
+ GraphicsCard77 = 0x0070004D,
+ GraphicsCard78 = 0x0070004E,
+ GraphicsCard79 = 0x0070004F,
+ GraphicsCard80 = 0x00700050,
+ GraphicsCard81 = 0x00700051,
+ GraphicsCard82 = 0x00700052,
+ GraphicsCard83 = 0x00700053,
+ GraphicsCard84 = 0x00700054,
+ GraphicsCard85 = 0x00700055,
+ GraphicsCard86 = 0x00700056,
+ GraphicsCard87 = 0x00700057,
+ GraphicsCard88 = 0x00700058,
+ GraphicsCard89 = 0x00700059,
+ GraphicsCard90 = 0x0070005A,
+ GraphicsCard91 = 0x0070005B,
+ GraphicsCard92 = 0x0070005C,
+ GraphicsCard93 = 0x0070005D,
+ GraphicsCard94 = 0x0070005E,
+ GraphicsCard95 = 0x0070005F,
+ GraphicsCard96 = 0x00700060,
+ GraphicsCard97 = 0x00700061,
+ GraphicsCard98 = 0x00700062,
+ GraphicsCard99 = 0x00700063,
+ GraphicsCard100 = 0x00700064,
+ GraphicsCard101 = 0x00700065,
+ GraphicsCard102 = 0x00700066,
+ GraphicsCard103 = 0x00700067,
+ GraphicsCard104 = 0x00700068,
+ GraphicsCard105 = 0x00700069,
+ GraphicsCard106 = 0x0070006A,
+ GraphicsCard107 = 0x0070006B,
+ GraphicsCard108 = 0x0070006C,
+ GraphicsCard109 = 0x0070006D,
+ GraphicsCard110 = 0x0070006E,
+ GraphicsCard111 = 0x0070006F,
+ GraphicsCard112 = 0x00700070,
+ GraphicsCard113 = 0x00700071,
+ GraphicsCard114 = 0x00700072,
+ GraphicsCard115 = 0x00700073,
+ GraphicsCard116 = 0x00700074,
+ GraphicsCard117 = 0x00700075,
+ GraphicsCard118 = 0x00700076,
+ GraphicsCard119 = 0x00700077,
+ GraphicsCard120 = 0x00700078,
+ GraphicsCard121 = 0x00700079,
+ GraphicsCard122 = 0x0070007A,
+ GraphicsCard123 = 0x0070007B,
+ GraphicsCard124 = 0x0070007C,
+ GraphicsCard125 = 0x0070007D,
+ GraphicsCard126 = 0x0070007E,
+ GraphicsCard127 = 0x0070007F,
+ GraphicsCard128 = 0x00700080,
- /*### GraphicsCard ###*/
- GraphicsCard1 = 0x00700001,
- GraphicsCard2 = 0x00700002,
- GraphicsCard3 = 0x00700003,
- GraphicsCard4 = 0x00700004,
- GraphicsCard5 = 0x00700005,
- GraphicsCard6 = 0x00700006,
- GraphicsCard7 = 0x00700007,
- GraphicsCard8 = 0x00700008,
- GraphicsCard9 = 0x00700009,
- GraphicsCard10 = 0x0070000A,
- GraphicsCard11 = 0x0070000B,
- GraphicsCard12 = 0x0070000C,
- GraphicsCard13 = 0x0070000D,
- GraphicsCard14 = 0x0070000E,
- GraphicsCard15 = 0x0070000F,
- GraphicsCard16 = 0x00700010,
- GraphicsCard17 = 0x00700011,
- GraphicsCard18 = 0x00700012,
- GraphicsCard19 = 0x00700013,
- GraphicsCard20 = 0x00700014,
- GraphicsCard21 = 0x00700015,
- GraphicsCard22 = 0x00700016,
- GraphicsCard23 = 0x00700017,
- GraphicsCard24 = 0x00700018,
- GraphicsCard25 = 0x00700019,
- GraphicsCard26 = 0x0070001A,
- GraphicsCard27 = 0x0070001B,
- GraphicsCard28 = 0x0070001C,
- GraphicsCard29 = 0x0070001D,
- GraphicsCard30 = 0x0070001E,
- GraphicsCard31 = 0x0070001F,
- GraphicsCard32 = 0x00700020,
- GraphicsCard33 = 0x00700021,
- GraphicsCard34 = 0x00700022,
- GraphicsCard35 = 0x00700023,
- GraphicsCard36 = 0x00700024,
- GraphicsCard37 = 0x00700025,
- GraphicsCard38 = 0x00700026,
- GraphicsCard39 = 0x00700027,
- GraphicsCard40 = 0x00700028,
- GraphicsCard41 = 0x00700029,
- GraphicsCard42 = 0x0070002A,
- GraphicsCard43 = 0x0070002B,
- GraphicsCard44 = 0x0070002C,
- GraphicsCard45 = 0x0070002D,
- GraphicsCard46 = 0x0070002E,
- GraphicsCard47 = 0x0070002F,
- GraphicsCard48 = 0x00700030,
- GraphicsCard49 = 0x00700031,
- GraphicsCard50 = 0x00700032,
- GraphicsCard51 = 0x00700033,
- GraphicsCard52 = 0x00700034,
- GraphicsCard53 = 0x00700035,
- GraphicsCard54 = 0x00700036,
- GraphicsCard55 = 0x00700037,
- GraphicsCard56 = 0x00700038,
- GraphicsCard57 = 0x00700039,
- GraphicsCard58 = 0x0070003A,
- GraphicsCard59 = 0x0070003B,
- GraphicsCard60 = 0x0070003C,
- GraphicsCard61 = 0x0070003D,
- GraphicsCard62 = 0x0070003E,
- GraphicsCard63 = 0x0070003F,
- GraphicsCard64 = 0x00700040,
+ /*### DRAM ###*/
+ DRAM1 = 0x00800001,
+ DRAM2 = 0x00800002,
+ DRAM3 = 0x00800003,
+ DRAM4 = 0x00800004,
+ DRAM5 = 0x00800005,
+ DRAM6 = 0x00800006,
+ DRAM7 = 0x00800007,
+ DRAM8 = 0x00800008,
+ DRAM9 = 0x00800009,
+ DRAM10 = 0x0080000A,
+ DRAM11 = 0x0080000B,
+ DRAM12 = 0x0080000C,
+ DRAM13 = 0x0080000D,
+ DRAM14 = 0x0080000E,
+ DRAM15 = 0x0080000F,
+ DRAM16 = 0x00800010,
+ DRAM17 = 0x00800011,
+ DRAM18 = 0x00800012,
+ DRAM19 = 0x00800013,
+ DRAM20 = 0x00800014,
+ DRAM21 = 0x00800015,
+ DRAM22 = 0x00800016,
+ DRAM23 = 0x00800017,
+ DRAM24 = 0x00800018,
+ DRAM25 = 0x00800019,
+ DRAM26 = 0x0080001A,
+ DRAM27 = 0x0080001B,
+ DRAM28 = 0x0080001C,
+ DRAM29 = 0x0080001D,
+ DRAM30 = 0x0080001E,
+ DRAM31 = 0x0080001F,
+ DRAM32 = 0x00800020,
+ DRAM33 = 0x00800021,
+ DRAM34 = 0x00800022,
+ DRAM35 = 0x00800023,
+ DRAM36 = 0x00800024,
+ DRAM37 = 0x00800025,
+ DRAM38 = 0x00800026,
+ DRAM39 = 0x00800027,
+ DRAM40 = 0x00800028,
+ DRAM41 = 0x00800029,
+ DRAM42 = 0x0080002A,
+ DRAM43 = 0x0080002B,
+ DRAM44 = 0x0080002C,
+ DRAM45 = 0x0080002D,
+ DRAM46 = 0x0080002E,
+ DRAM47 = 0x0080002F,
+ DRAM48 = 0x00800030,
+ DRAM49 = 0x00800031,
+ DRAM50 = 0x00800032,
+ DRAM51 = 0x00800033,
+ DRAM52 = 0x00800034,
+ DRAM53 = 0x00800035,
+ DRAM54 = 0x00800036,
+ DRAM55 = 0x00800037,
+ DRAM56 = 0x00800038,
+ DRAM57 = 0x00800039,
+ DRAM58 = 0x0080003A,
+ DRAM59 = 0x0080003B,
+ DRAM60 = 0x0080003C,
+ DRAM61 = 0x0080003D,
+ DRAM62 = 0x0080003E,
+ DRAM63 = 0x0080003F,
+ DRAM64 = 0x00800040,
+ DRAM65 = 0x00800041,
+ DRAM66 = 0x00800042,
+ DRAM67 = 0x00800043,
+ DRAM68 = 0x00800044,
+ DRAM69 = 0x00800045,
+ DRAM70 = 0x00800046,
+ DRAM71 = 0x00800047,
+ DRAM72 = 0x00800048,
+ DRAM73 = 0x00800049,
+ DRAM74 = 0x0080004A,
+ DRAM75 = 0x0080004B,
+ DRAM76 = 0x0080004C,
+ DRAM77 = 0x0080004D,
+ DRAM78 = 0x0080004E,
+ DRAM79 = 0x0080004F,
+ DRAM80 = 0x00800050,
+ DRAM81 = 0x00800051,
+ DRAM82 = 0x00800052,
+ DRAM83 = 0x00800053,
+ DRAM84 = 0x00800054,
+ DRAM85 = 0x00800055,
+ DRAM86 = 0x00800056,
+ DRAM87 = 0x00800057,
+ DRAM88 = 0x00800058,
+ DRAM89 = 0x00800059,
+ DRAM90 = 0x0080005A,
+ DRAM91 = 0x0080005B,
+ DRAM92 = 0x0080005C,
+ DRAM93 = 0x0080005D,
+ DRAM94 = 0x0080005E,
+ DRAM95 = 0x0080005F,
+ DRAM96 = 0x00800060,
+ DRAM97 = 0x00800061,
+ DRAM98 = 0x00800062,
+ DRAM99 = 0x00800063,
+ DRAM100 = 0x00800064,
+ DRAM101 = 0x00800065,
+ DRAM102 = 0x00800066,
+ DRAM103 = 0x00800067,
+ DRAM104 = 0x00800068,
+ DRAM105 = 0x00800069,
+ DRAM106 = 0x0080006A,
+ DRAM107 = 0x0080006B,
+ DRAM108 = 0x0080006C,
+ DRAM109 = 0x0080006D,
+ DRAM110 = 0x0080006E,
+ DRAM111 = 0x0080006F,
+ DRAM112 = 0x00800070,
+ DRAM113 = 0x00800071,
+ DRAM114 = 0x00800072,
+ DRAM115 = 0x00800073,
+ DRAM116 = 0x00800074,
+ DRAM117 = 0x00800075,
+ DRAM118 = 0x00800076,
+ DRAM119 = 0x00800077,
+ DRAM120 = 0x00800078,
+ DRAM121 = 0x00800079,
+ DRAM122 = 0x0080007A,
+ DRAM123 = 0x0080007B,
+ DRAM124 = 0x0080007C,
+ DRAM125 = 0x0080007D,
+ DRAM126 = 0x0080007E,
+ DRAM127 = 0x0080007F,
+ DRAM128 = 0x00800080,
- /*### DRAM ###*/
- DRAM1 = 0x00800001,
- DRAM2 = 0x00800002,
- DRAM3 = 0x00800003,
- DRAM4 = 0x00800004,
- DRAM5 = 0x00800005,
- DRAM6 = 0x00800006,
- DRAM7 = 0x00800007,
- DRAM8 = 0x00800008,
- DRAM9 = 0x00800009,
- DRAM10 = 0x0080000A,
- DRAM11 = 0x0080000B,
- DRAM12 = 0x0080000C,
- DRAM13 = 0x0080000D,
- DRAM14 = 0x0080000E,
- DRAM15 = 0x0080000F,
- DRAM16 = 0x00800010,
- DRAM17 = 0x00800011,
- DRAM18 = 0x00800012,
- DRAM19 = 0x00800013,
- DRAM20 = 0x00800014,
- DRAM21 = 0x00800015,
- DRAM22 = 0x00800016,
- DRAM23 = 0x00800017,
- DRAM24 = 0x00800018,
- DRAM25 = 0x00800019,
- DRAM26 = 0x0080001A,
- DRAM27 = 0x0080001B,
- DRAM28 = 0x0080001C,
- DRAM29 = 0x0080001D,
- DRAM30 = 0x0080001E,
- DRAM31 = 0x0080001F,
- DRAM32 = 0x00800020,
- DRAM33 = 0x00800021,
- DRAM34 = 0x00800022,
- DRAM35 = 0x00800023,
- DRAM36 = 0x00800024,
- DRAM37 = 0x00800025,
- DRAM38 = 0x00800026,
- DRAM39 = 0x00800027,
- DRAM40 = 0x00800028,
- DRAM41 = 0x00800029,
- DRAM42 = 0x0080002A,
- DRAM43 = 0x0080002B,
- DRAM44 = 0x0080002C,
- DRAM45 = 0x0080002D,
- DRAM46 = 0x0080002E,
- DRAM47 = 0x0080002F,
- DRAM48 = 0x00800030,
- DRAM49 = 0x00800031,
- DRAM50 = 0x00800032,
- DRAM51 = 0x00800033,
- DRAM52 = 0x00800034,
- DRAM53 = 0x00800035,
- DRAM54 = 0x00800036,
- DRAM55 = 0x00800037,
- DRAM56 = 0x00800038,
- DRAM57 = 0x00800039,
- DRAM58 = 0x0080003A,
- DRAM59 = 0x0080003B,
- DRAM60 = 0x0080003C,
- DRAM61 = 0x0080003D,
- DRAM62 = 0x0080003E,
- DRAM63 = 0x0080003F,
- DRAM64 = 0x00800040,
+ /*### HeadsetStand ###*/
+ HeadsetStand1 = 0x00900001,
+ HeadsetStand2 = 0x00900002,
+ HeadsetStand3 = 0x00900003,
+ HeadsetStand4 = 0x00900004,
+ HeadsetStand5 = 0x00900005,
+ HeadsetStand6 = 0x00900006,
+ HeadsetStand7 = 0x00900007,
+ HeadsetStand8 = 0x00900008,
+ HeadsetStand9 = 0x00900009,
+ HeadsetStand10 = 0x0090000A,
+ HeadsetStand11 = 0x0090000B,
+ HeadsetStand12 = 0x0090000C,
+ HeadsetStand13 = 0x0090000D,
+ HeadsetStand14 = 0x0090000E,
+ HeadsetStand15 = 0x0090000F,
+ HeadsetStand16 = 0x00900010,
+ HeadsetStand17 = 0x00900011,
+ HeadsetStand18 = 0x00900012,
+ HeadsetStand19 = 0x00900013,
+ HeadsetStand20 = 0x00900014,
+ HeadsetStand21 = 0x00900015,
+ HeadsetStand22 = 0x00900016,
+ HeadsetStand23 = 0x00900017,
+ HeadsetStand24 = 0x00900018,
+ HeadsetStand25 = 0x00900019,
+ HeadsetStand26 = 0x0090001A,
+ HeadsetStand27 = 0x0090001B,
+ HeadsetStand28 = 0x0090001C,
+ HeadsetStand29 = 0x0090001D,
+ HeadsetStand30 = 0x0090001E,
+ HeadsetStand31 = 0x0090001F,
+ HeadsetStand32 = 0x00900020,
+ HeadsetStand33 = 0x00900021,
+ HeadsetStand34 = 0x00900022,
+ HeadsetStand35 = 0x00900023,
+ HeadsetStand36 = 0x00900024,
+ HeadsetStand37 = 0x00900025,
+ HeadsetStand38 = 0x00900026,
+ HeadsetStand39 = 0x00900027,
+ HeadsetStand40 = 0x00900028,
+ HeadsetStand41 = 0x00900029,
+ HeadsetStand42 = 0x0090002A,
+ HeadsetStand43 = 0x0090002B,
+ HeadsetStand44 = 0x0090002C,
+ HeadsetStand45 = 0x0090002D,
+ HeadsetStand46 = 0x0090002E,
+ HeadsetStand47 = 0x0090002F,
+ HeadsetStand48 = 0x00900030,
+ HeadsetStand49 = 0x00900031,
+ HeadsetStand50 = 0x00900032,
+ HeadsetStand51 = 0x00900033,
+ HeadsetStand52 = 0x00900034,
+ HeadsetStand53 = 0x00900035,
+ HeadsetStand54 = 0x00900036,
+ HeadsetStand55 = 0x00900037,
+ HeadsetStand56 = 0x00900038,
+ HeadsetStand57 = 0x00900039,
+ HeadsetStand58 = 0x0090003A,
+ HeadsetStand59 = 0x0090003B,
+ HeadsetStand60 = 0x0090003C,
+ HeadsetStand61 = 0x0090003D,
+ HeadsetStand62 = 0x0090003E,
+ HeadsetStand63 = 0x0090003F,
+ HeadsetStand64 = 0x00900040,
+ HeadsetStand65 = 0x00900041,
+ HeadsetStand66 = 0x00900042,
+ HeadsetStand67 = 0x00900043,
+ HeadsetStand68 = 0x00900044,
+ HeadsetStand69 = 0x00900045,
+ HeadsetStand70 = 0x00900046,
+ HeadsetStand71 = 0x00900047,
+ HeadsetStand72 = 0x00900048,
+ HeadsetStand73 = 0x00900049,
+ HeadsetStand74 = 0x0090004A,
+ HeadsetStand75 = 0x0090004B,
+ HeadsetStand76 = 0x0090004C,
+ HeadsetStand77 = 0x0090004D,
+ HeadsetStand78 = 0x0090004E,
+ HeadsetStand79 = 0x0090004F,
+ HeadsetStand80 = 0x00900050,
+ HeadsetStand81 = 0x00900051,
+ HeadsetStand82 = 0x00900052,
+ HeadsetStand83 = 0x00900053,
+ HeadsetStand84 = 0x00900054,
+ HeadsetStand85 = 0x00900055,
+ HeadsetStand86 = 0x00900056,
+ HeadsetStand87 = 0x00900057,
+ HeadsetStand88 = 0x00900058,
+ HeadsetStand89 = 0x00900059,
+ HeadsetStand90 = 0x0090005A,
+ HeadsetStand91 = 0x0090005B,
+ HeadsetStand92 = 0x0090005C,
+ HeadsetStand93 = 0x0090005D,
+ HeadsetStand94 = 0x0090005E,
+ HeadsetStand95 = 0x0090005F,
+ HeadsetStand96 = 0x00900060,
+ HeadsetStand97 = 0x00900061,
+ HeadsetStand98 = 0x00900062,
+ HeadsetStand99 = 0x00900063,
+ HeadsetStand100 = 0x00900064,
+ HeadsetStand101 = 0x00900065,
+ HeadsetStand102 = 0x00900066,
+ HeadsetStand103 = 0x00900067,
+ HeadsetStand104 = 0x00900068,
+ HeadsetStand105 = 0x00900069,
+ HeadsetStand106 = 0x0090006A,
+ HeadsetStand107 = 0x0090006B,
+ HeadsetStand108 = 0x0090006C,
+ HeadsetStand109 = 0x0090006D,
+ HeadsetStand110 = 0x0090006E,
+ HeadsetStand111 = 0x0090006F,
+ HeadsetStand112 = 0x00900070,
+ HeadsetStand113 = 0x00900071,
+ HeadsetStand114 = 0x00900072,
+ HeadsetStand115 = 0x00900073,
+ HeadsetStand116 = 0x00900074,
+ HeadsetStand117 = 0x00900075,
+ HeadsetStand118 = 0x00900076,
+ HeadsetStand119 = 0x00900077,
+ HeadsetStand120 = 0x00900078,
+ HeadsetStand121 = 0x00900079,
+ HeadsetStand122 = 0x0090007A,
+ HeadsetStand123 = 0x0090007B,
+ HeadsetStand124 = 0x0090007C,
+ HeadsetStand125 = 0x0090007D,
+ HeadsetStand126 = 0x0090007E,
+ HeadsetStand127 = 0x0090007F,
+ HeadsetStand128 = 0x00900080,
- /*### HeadsetStand ###*/
- HeadsetStand1 = 0x00900001,
- HeadsetStand2 = 0x00900002,
- HeadsetStand3 = 0x00900003,
- HeadsetStand4 = 0x00900004,
- HeadsetStand5 = 0x00900005,
- HeadsetStand6 = 0x00900006,
- HeadsetStand7 = 0x00900007,
- HeadsetStand8 = 0x00900008,
- HeadsetStand9 = 0x00900009,
- HeadsetStand10 = 0x0090000A,
- HeadsetStand11 = 0x0090000B,
- HeadsetStand12 = 0x0090000C,
- HeadsetStand13 = 0x0090000D,
- HeadsetStand14 = 0x0090000E,
- HeadsetStand15 = 0x0090000F,
- HeadsetStand16 = 0x00900010,
- HeadsetStand17 = 0x00900011,
- HeadsetStand18 = 0x00900012,
- HeadsetStand19 = 0x00900013,
- HeadsetStand20 = 0x00900014,
- HeadsetStand21 = 0x00900015,
- HeadsetStand22 = 0x00900016,
- HeadsetStand23 = 0x00900017,
- HeadsetStand24 = 0x00900018,
- HeadsetStand25 = 0x00900019,
- HeadsetStand26 = 0x0090001A,
- HeadsetStand27 = 0x0090001B,
- HeadsetStand28 = 0x0090001C,
- HeadsetStand29 = 0x0090001D,
- HeadsetStand30 = 0x0090001E,
- HeadsetStand31 = 0x0090001F,
- HeadsetStand32 = 0x00900020,
- HeadsetStand33 = 0x00900021,
- HeadsetStand34 = 0x00900022,
- HeadsetStand35 = 0x00900023,
- HeadsetStand36 = 0x00900024,
- HeadsetStand37 = 0x00900025,
- HeadsetStand38 = 0x00900026,
- HeadsetStand39 = 0x00900027,
- HeadsetStand40 = 0x00900028,
- HeadsetStand41 = 0x00900029,
- HeadsetStand42 = 0x0090002A,
- HeadsetStand43 = 0x0090002B,
- HeadsetStand44 = 0x0090002C,
- HeadsetStand45 = 0x0090002D,
- HeadsetStand46 = 0x0090002E,
- HeadsetStand47 = 0x0090002F,
- HeadsetStand48 = 0x00900030,
- HeadsetStand49 = 0x00900031,
- HeadsetStand50 = 0x00900032,
- HeadsetStand51 = 0x00900033,
- HeadsetStand52 = 0x00900034,
- HeadsetStand53 = 0x00900035,
- HeadsetStand54 = 0x00900036,
- HeadsetStand55 = 0x00900037,
- HeadsetStand56 = 0x00900038,
- HeadsetStand57 = 0x00900039,
- HeadsetStand58 = 0x0090003A,
- HeadsetStand59 = 0x0090003B,
- HeadsetStand60 = 0x0090003C,
- HeadsetStand61 = 0x0090003D,
- HeadsetStand62 = 0x0090003E,
- HeadsetStand63 = 0x0090003F,
- HeadsetStand64 = 0x00900040,
+ /*### Keypad ###*/
+ Keypad1 = 0x00A00001,
+ Keypad2 = 0x00A00002,
+ Keypad3 = 0x00A00003,
+ Keypad4 = 0x00A00004,
+ Keypad5 = 0x00A00005,
+ Keypad6 = 0x00A00006,
+ Keypad7 = 0x00A00007,
+ Keypad8 = 0x00A00008,
+ Keypad9 = 0x00A00009,
+ Keypad10 = 0x00A0000A,
+ Keypad11 = 0x00A0000B,
+ Keypad12 = 0x00A0000C,
+ Keypad13 = 0x00A0000D,
+ Keypad14 = 0x00A0000E,
+ Keypad15 = 0x00A0000F,
+ Keypad16 = 0x00A00010,
+ Keypad17 = 0x00A00011,
+ Keypad18 = 0x00A00012,
+ Keypad19 = 0x00A00013,
+ Keypad20 = 0x00A00014,
+ Keypad21 = 0x00A00015,
+ Keypad22 = 0x00A00016,
+ Keypad23 = 0x00A00017,
+ Keypad24 = 0x00A00018,
+ Keypad25 = 0x00A00019,
+ Keypad26 = 0x00A0001A,
+ Keypad27 = 0x00A0001B,
+ Keypad28 = 0x00A0001C,
+ Keypad29 = 0x00A0001D,
+ Keypad30 = 0x00A0001E,
+ Keypad31 = 0x00A0001F,
+ Keypad32 = 0x00A00020,
+ Keypad33 = 0x00A00021,
+ Keypad34 = 0x00A00022,
+ Keypad35 = 0x00A00023,
+ Keypad36 = 0x00A00024,
+ Keypad37 = 0x00A00025,
+ Keypad38 = 0x00A00026,
+ Keypad39 = 0x00A00027,
+ Keypad40 = 0x00A00028,
+ Keypad41 = 0x00A00029,
+ Keypad42 = 0x00A0002A,
+ Keypad43 = 0x00A0002B,
+ Keypad44 = 0x00A0002C,
+ Keypad45 = 0x00A0002D,
+ Keypad46 = 0x00A0002E,
+ Keypad47 = 0x00A0002F,
+ Keypad48 = 0x00A00030,
+ Keypad49 = 0x00A00031,
+ Keypad50 = 0x00A00032,
+ Keypad51 = 0x00A00033,
+ Keypad52 = 0x00A00034,
+ Keypad53 = 0x00A00035,
+ Keypad54 = 0x00A00036,
+ Keypad55 = 0x00A00037,
+ Keypad56 = 0x00A00038,
+ Keypad57 = 0x00A00039,
+ Keypad58 = 0x00A0003A,
+ Keypad59 = 0x00A0003B,
+ Keypad60 = 0x00A0003C,
+ Keypad61 = 0x00A0003D,
+ Keypad62 = 0x00A0003E,
+ Keypad63 = 0x00A0003F,
+ Keypad64 = 0x00A00040,
+ Keypad65 = 0x00A00041,
+ Keypad66 = 0x00A00042,
+ Keypad67 = 0x00A00043,
+ Keypad68 = 0x00A00044,
+ Keypad69 = 0x00A00045,
+ Keypad70 = 0x00A00046,
+ Keypad71 = 0x00A00047,
+ Keypad72 = 0x00A00048,
+ Keypad73 = 0x00A00049,
+ Keypad74 = 0x00A0004A,
+ Keypad75 = 0x00A0004B,
+ Keypad76 = 0x00A0004C,
+ Keypad77 = 0x00A0004D,
+ Keypad78 = 0x00A0004E,
+ Keypad79 = 0x00A0004F,
+ Keypad80 = 0x00A00050,
+ Keypad81 = 0x00A00051,
+ Keypad82 = 0x00A00052,
+ Keypad83 = 0x00A00053,
+ Keypad84 = 0x00A00054,
+ Keypad85 = 0x00A00055,
+ Keypad86 = 0x00A00056,
+ Keypad87 = 0x00A00057,
+ Keypad88 = 0x00A00058,
+ Keypad89 = 0x00A00059,
+ Keypad90 = 0x00A0005A,
+ Keypad91 = 0x00A0005B,
+ Keypad92 = 0x00A0005C,
+ Keypad93 = 0x00A0005D,
+ Keypad94 = 0x00A0005E,
+ Keypad95 = 0x00A0005F,
+ Keypad96 = 0x00A00060,
+ Keypad97 = 0x00A00061,
+ Keypad98 = 0x00A00062,
+ Keypad99 = 0x00A00063,
+ Keypad100 = 0x00A00064,
+ Keypad101 = 0x00A00065,
+ Keypad102 = 0x00A00066,
+ Keypad103 = 0x00A00067,
+ Keypad104 = 0x00A00068,
+ Keypad105 = 0x00A00069,
+ Keypad106 = 0x00A0006A,
+ Keypad107 = 0x00A0006B,
+ Keypad108 = 0x00A0006C,
+ Keypad109 = 0x00A0006D,
+ Keypad110 = 0x00A0006E,
+ Keypad111 = 0x00A0006F,
+ Keypad112 = 0x00A00070,
+ Keypad113 = 0x00A00071,
+ Keypad114 = 0x00A00072,
+ Keypad115 = 0x00A00073,
+ Keypad116 = 0x00A00074,
+ Keypad117 = 0x00A00075,
+ Keypad118 = 0x00A00076,
+ Keypad119 = 0x00A00077,
+ Keypad120 = 0x00A00078,
+ Keypad121 = 0x00A00079,
+ Keypad122 = 0x00A0007A,
+ Keypad123 = 0x00A0007B,
+ Keypad124 = 0x00A0007C,
+ Keypad125 = 0x00A0007D,
+ Keypad126 = 0x00A0007E,
+ Keypad127 = 0x00A0007F,
+ Keypad128 = 0x00A00080,
- /*### Keypad ###*/
- Keypad1 = 0x00A00001,
- Keypad2 = 0x00A00002,
- Keypad3 = 0x00A00003,
- Keypad4 = 0x00A00004,
- Keypad5 = 0x00A00005,
- Keypad6 = 0x00A00006,
- Keypad7 = 0x00A00007,
- Keypad8 = 0x00A00008,
- Keypad9 = 0x00A00009,
- Keypad10 = 0x00A0000A,
- Keypad11 = 0x00A0000B,
- Keypad12 = 0x00A0000C,
- Keypad13 = 0x00A0000D,
- Keypad14 = 0x00A0000E,
- Keypad15 = 0x00A0000F,
- Keypad16 = 0x00A00010,
- Keypad17 = 0x00A00011,
- Keypad18 = 0x00A00012,
- Keypad19 = 0x00A00013,
- Keypad20 = 0x00A00014,
- Keypad21 = 0x00A00015,
- Keypad22 = 0x00A00016,
- Keypad23 = 0x00A00017,
- Keypad24 = 0x00A00018,
- Keypad25 = 0x00A00019,
- Keypad26 = 0x00A0001A,
- Keypad27 = 0x00A0001B,
- Keypad28 = 0x00A0001C,
- Keypad29 = 0x00A0001D,
- Keypad30 = 0x00A0001E,
- Keypad31 = 0x00A0001F,
- Keypad32 = 0x00A00020,
- Keypad33 = 0x00A00021,
- Keypad34 = 0x00A00022,
- Keypad35 = 0x00A00023,
- Keypad36 = 0x00A00024,
- Keypad37 = 0x00A00025,
- Keypad38 = 0x00A00026,
- Keypad39 = 0x00A00027,
- Keypad40 = 0x00A00028,
- Keypad41 = 0x00A00029,
- Keypad42 = 0x00A0002A,
- Keypad43 = 0x00A0002B,
- Keypad44 = 0x00A0002C,
- Keypad45 = 0x00A0002D,
- Keypad46 = 0x00A0002E,
- Keypad47 = 0x00A0002F,
- Keypad48 = 0x00A00030,
- Keypad49 = 0x00A00031,
- Keypad50 = 0x00A00032,
- Keypad51 = 0x00A00033,
- Keypad52 = 0x00A00034,
- Keypad53 = 0x00A00035,
- Keypad54 = 0x00A00036,
- Keypad55 = 0x00A00037,
- Keypad56 = 0x00A00038,
- Keypad57 = 0x00A00039,
- Keypad58 = 0x00A0003A,
- Keypad59 = 0x00A0003B,
- Keypad60 = 0x00A0003C,
- Keypad61 = 0x00A0003D,
- Keypad62 = 0x00A0003E,
- Keypad63 = 0x00A0003F,
- Keypad64 = 0x00A00040,
+ /*### Fan ###*/
+ Fan1 = 0x00B00001,
+ Fan2 = 0x00B00002,
+ Fan3 = 0x00B00003,
+ Fan4 = 0x00B00004,
+ Fan5 = 0x00B00005,
+ Fan6 = 0x00B00006,
+ Fan7 = 0x00B00007,
+ Fan8 = 0x00B00008,
+ Fan9 = 0x00B00009,
+ Fan10 = 0x00B0000A,
+ Fan11 = 0x00B0000B,
+ Fan12 = 0x00B0000C,
+ Fan13 = 0x00B0000D,
+ Fan14 = 0x00B0000E,
+ Fan15 = 0x00B0000F,
+ Fan16 = 0x00B00010,
+ Fan17 = 0x00B00011,
+ Fan18 = 0x00B00012,
+ Fan19 = 0x00B00013,
+ Fan20 = 0x00B00014,
+ Fan21 = 0x00B00015,
+ Fan22 = 0x00B00016,
+ Fan23 = 0x00B00017,
+ Fan24 = 0x00B00018,
+ Fan25 = 0x00B00019,
+ Fan26 = 0x00B0001A,
+ Fan27 = 0x00B0001B,
+ Fan28 = 0x00B0001C,
+ Fan29 = 0x00B0001D,
+ Fan30 = 0x00B0001E,
+ Fan31 = 0x00B0001F,
+ Fan32 = 0x00B00020,
+ Fan33 = 0x00B00021,
+ Fan34 = 0x00B00022,
+ Fan35 = 0x00B00023,
+ Fan36 = 0x00B00024,
+ Fan37 = 0x00B00025,
+ Fan38 = 0x00B00026,
+ Fan39 = 0x00B00027,
+ Fan40 = 0x00B00028,
+ Fan41 = 0x00B00029,
+ Fan42 = 0x00B0002A,
+ Fan43 = 0x00B0002B,
+ Fan44 = 0x00B0002C,
+ Fan45 = 0x00B0002D,
+ Fan46 = 0x00B0002E,
+ Fan47 = 0x00B0002F,
+ Fan48 = 0x00B00030,
+ Fan49 = 0x00B00031,
+ Fan50 = 0x00B00032,
+ Fan51 = 0x00B00033,
+ Fan52 = 0x00B00034,
+ Fan53 = 0x00B00035,
+ Fan54 = 0x00B00036,
+ Fan55 = 0x00B00037,
+ Fan56 = 0x00B00038,
+ Fan57 = 0x00B00039,
+ Fan58 = 0x00B0003A,
+ Fan59 = 0x00B0003B,
+ Fan60 = 0x00B0003C,
+ Fan61 = 0x00B0003D,
+ Fan62 = 0x00B0003E,
+ Fan63 = 0x00B0003F,
+ Fan64 = 0x00B00040,
+ Fan65 = 0x00B00041,
+ Fan66 = 0x00B00042,
+ Fan67 = 0x00B00043,
+ Fan68 = 0x00B00044,
+ Fan69 = 0x00B00045,
+ Fan70 = 0x00B00046,
+ Fan71 = 0x00B00047,
+ Fan72 = 0x00B00048,
+ Fan73 = 0x00B00049,
+ Fan74 = 0x00B0004A,
+ Fan75 = 0x00B0004B,
+ Fan76 = 0x00B0004C,
+ Fan77 = 0x00B0004D,
+ Fan78 = 0x00B0004E,
+ Fan79 = 0x00B0004F,
+ Fan80 = 0x00B00050,
+ Fan81 = 0x00B00051,
+ Fan82 = 0x00B00052,
+ Fan83 = 0x00B00053,
+ Fan84 = 0x00B00054,
+ Fan85 = 0x00B00055,
+ Fan86 = 0x00B00056,
+ Fan87 = 0x00B00057,
+ Fan88 = 0x00B00058,
+ Fan89 = 0x00B00059,
+ Fan90 = 0x00B0005A,
+ Fan91 = 0x00B0005B,
+ Fan92 = 0x00B0005C,
+ Fan93 = 0x00B0005D,
+ Fan94 = 0x00B0005E,
+ Fan95 = 0x00B0005F,
+ Fan96 = 0x00B00060,
+ Fan97 = 0x00B00061,
+ Fan98 = 0x00B00062,
+ Fan99 = 0x00B00063,
+ Fan100 = 0x00B00064,
+ Fan101 = 0x00B00065,
+ Fan102 = 0x00B00066,
+ Fan103 = 0x00B00067,
+ Fan104 = 0x00B00068,
+ Fan105 = 0x00B00069,
+ Fan106 = 0x00B0006A,
+ Fan107 = 0x00B0006B,
+ Fan108 = 0x00B0006C,
+ Fan109 = 0x00B0006D,
+ Fan110 = 0x00B0006E,
+ Fan111 = 0x00B0006F,
+ Fan112 = 0x00B00070,
+ Fan113 = 0x00B00071,
+ Fan114 = 0x00B00072,
+ Fan115 = 0x00B00073,
+ Fan116 = 0x00B00074,
+ Fan117 = 0x00B00075,
+ Fan118 = 0x00B00076,
+ Fan119 = 0x00B00077,
+ Fan120 = 0x00B00078,
+ Fan121 = 0x00B00079,
+ Fan122 = 0x00B0007A,
+ Fan123 = 0x00B0007B,
+ Fan124 = 0x00B0007C,
+ Fan125 = 0x00B0007D,
+ Fan126 = 0x00B0007E,
+ Fan127 = 0x00B0007F,
+ Fan128 = 0x00B00080,
- /*### Fan ###*/
- Fan1 = 0x00B00001,
- Fan2 = 0x00B00002,
- Fan3 = 0x00B00003,
- Fan4 = 0x00B00004,
- Fan5 = 0x00B00005,
- Fan6 = 0x00B00006,
- Fan7 = 0x00B00007,
- Fan8 = 0x00B00008,
- Fan9 = 0x00B00009,
- Fan10 = 0x00B0000A,
- Fan11 = 0x00B0000B,
- Fan12 = 0x00B0000C,
- Fan13 = 0x00B0000D,
- Fan14 = 0x00B0000E,
- Fan15 = 0x00B0000F,
- Fan16 = 0x00B00010,
- Fan17 = 0x00B00011,
- Fan18 = 0x00B00012,
- Fan19 = 0x00B00013,
- Fan20 = 0x00B00014,
- Fan21 = 0x00B00015,
- Fan22 = 0x00B00016,
- Fan23 = 0x00B00017,
- Fan24 = 0x00B00018,
- Fan25 = 0x00B00019,
- Fan26 = 0x00B0001A,
- Fan27 = 0x00B0001B,
- Fan28 = 0x00B0001C,
- Fan29 = 0x00B0001D,
- Fan30 = 0x00B0001E,
- Fan31 = 0x00B0001F,
- Fan32 = 0x00B00020,
- Fan33 = 0x00B00021,
- Fan34 = 0x00B00022,
- Fan35 = 0x00B00023,
- Fan36 = 0x00B00024,
- Fan37 = 0x00B00025,
- Fan38 = 0x00B00026,
- Fan39 = 0x00B00027,
- Fan40 = 0x00B00028,
- Fan41 = 0x00B00029,
- Fan42 = 0x00B0002A,
- Fan43 = 0x00B0002B,
- Fan44 = 0x00B0002C,
- Fan45 = 0x00B0002D,
- Fan46 = 0x00B0002E,
- Fan47 = 0x00B0002F,
- Fan48 = 0x00B00030,
- Fan49 = 0x00B00031,
- Fan50 = 0x00B00032,
- Fan51 = 0x00B00033,
- Fan52 = 0x00B00034,
- Fan53 = 0x00B00035,
- Fan54 = 0x00B00036,
- Fan55 = 0x00B00037,
- Fan56 = 0x00B00038,
- Fan57 = 0x00B00039,
- Fan58 = 0x00B0003A,
- Fan59 = 0x00B0003B,
- Fan60 = 0x00B0003C,
- Fan61 = 0x00B0003D,
- Fan62 = 0x00B0003E,
- Fan63 = 0x00B0003F,
- Fan64 = 0x00B00040,
+ /*### Speaker ###*/
+ Speaker1 = 0x00C00001,
+ Speaker2 = 0x00C00002,
+ Speaker3 = 0x00C00003,
+ Speaker4 = 0x00C00004,
+ Speaker5 = 0x00C00005,
+ Speaker6 = 0x00C00006,
+ Speaker7 = 0x00C00007,
+ Speaker8 = 0x00C00008,
+ Speaker9 = 0x00C00009,
+ Speaker10 = 0x00C0000A,
+ Speaker11 = 0x00C0000B,
+ Speaker12 = 0x00C0000C,
+ Speaker13 = 0x00C0000D,
+ Speaker14 = 0x00C0000E,
+ Speaker15 = 0x00C0000F,
+ Speaker16 = 0x00C00010,
+ Speaker17 = 0x00C00011,
+ Speaker18 = 0x00C00012,
+ Speaker19 = 0x00C00013,
+ Speaker20 = 0x00C00014,
+ Speaker21 = 0x00C00015,
+ Speaker22 = 0x00C00016,
+ Speaker23 = 0x00C00017,
+ Speaker24 = 0x00C00018,
+ Speaker25 = 0x00C00019,
+ Speaker26 = 0x00C0001A,
+ Speaker27 = 0x00C0001B,
+ Speaker28 = 0x00C0001C,
+ Speaker29 = 0x00C0001D,
+ Speaker30 = 0x00C0001E,
+ Speaker31 = 0x00C0001F,
+ Speaker32 = 0x00C00020,
+ Speaker33 = 0x00C00021,
+ Speaker34 = 0x00C00022,
+ Speaker35 = 0x00C00023,
+ Speaker36 = 0x00C00024,
+ Speaker37 = 0x00C00025,
+ Speaker38 = 0x00C00026,
+ Speaker39 = 0x00C00027,
+ Speaker40 = 0x00C00028,
+ Speaker41 = 0x00C00029,
+ Speaker42 = 0x00C0002A,
+ Speaker43 = 0x00C0002B,
+ Speaker44 = 0x00C0002C,
+ Speaker45 = 0x00C0002D,
+ Speaker46 = 0x00C0002E,
+ Speaker47 = 0x00C0002F,
+ Speaker48 = 0x00C00030,
+ Speaker49 = 0x00C00031,
+ Speaker50 = 0x00C00032,
+ Speaker51 = 0x00C00033,
+ Speaker52 = 0x00C00034,
+ Speaker53 = 0x00C00035,
+ Speaker54 = 0x00C00036,
+ Speaker55 = 0x00C00037,
+ Speaker56 = 0x00C00038,
+ Speaker57 = 0x00C00039,
+ Speaker58 = 0x00C0003A,
+ Speaker59 = 0x00C0003B,
+ Speaker60 = 0x00C0003C,
+ Speaker61 = 0x00C0003D,
+ Speaker62 = 0x00C0003E,
+ Speaker63 = 0x00C0003F,
+ Speaker64 = 0x00C00040,
+ Speaker65 = 0x00C00041,
+ Speaker66 = 0x00C00042,
+ Speaker67 = 0x00C00043,
+ Speaker68 = 0x00C00044,
+ Speaker69 = 0x00C00045,
+ Speaker70 = 0x00C00046,
+ Speaker71 = 0x00C00047,
+ Speaker72 = 0x00C00048,
+ Speaker73 = 0x00C00049,
+ Speaker74 = 0x00C0004A,
+ Speaker75 = 0x00C0004B,
+ Speaker76 = 0x00C0004C,
+ Speaker77 = 0x00C0004D,
+ Speaker78 = 0x00C0004E,
+ Speaker79 = 0x00C0004F,
+ Speaker80 = 0x00C00050,
+ Speaker81 = 0x00C00051,
+ Speaker82 = 0x00C00052,
+ Speaker83 = 0x00C00053,
+ Speaker84 = 0x00C00054,
+ Speaker85 = 0x00C00055,
+ Speaker86 = 0x00C00056,
+ Speaker87 = 0x00C00057,
+ Speaker88 = 0x00C00058,
+ Speaker89 = 0x00C00059,
+ Speaker90 = 0x00C0005A,
+ Speaker91 = 0x00C0005B,
+ Speaker92 = 0x00C0005C,
+ Speaker93 = 0x00C0005D,
+ Speaker94 = 0x00C0005E,
+ Speaker95 = 0x00C0005F,
+ Speaker96 = 0x00C00060,
+ Speaker97 = 0x00C00061,
+ Speaker98 = 0x00C00062,
+ Speaker99 = 0x00C00063,
+ Speaker100 = 0x00C00064,
+ Speaker101 = 0x00C00065,
+ Speaker102 = 0x00C00066,
+ Speaker103 = 0x00C00067,
+ Speaker104 = 0x00C00068,
+ Speaker105 = 0x00C00069,
+ Speaker106 = 0x00C0006A,
+ Speaker107 = 0x00C0006B,
+ Speaker108 = 0x00C0006C,
+ Speaker109 = 0x00C0006D,
+ Speaker110 = 0x00C0006E,
+ Speaker111 = 0x00C0006F,
+ Speaker112 = 0x00C00070,
+ Speaker113 = 0x00C00071,
+ Speaker114 = 0x00C00072,
+ Speaker115 = 0x00C00073,
+ Speaker116 = 0x00C00074,
+ Speaker117 = 0x00C00075,
+ Speaker118 = 0x00C00076,
+ Speaker119 = 0x00C00077,
+ Speaker120 = 0x00C00078,
+ Speaker121 = 0x00C00079,
+ Speaker122 = 0x00C0007A,
+ Speaker123 = 0x00C0007B,
+ Speaker124 = 0x00C0007C,
+ Speaker125 = 0x00C0007D,
+ Speaker126 = 0x00C0007E,
+ Speaker127 = 0x00C0007F,
+ Speaker128 = 0x00C00080,
- /*### Speaker ###*/
- Speaker1 = 0x00C00001,
- Speaker2 = 0x00C00002,
- Speaker3 = 0x00C00003,
- Speaker4 = 0x00C00004,
- Speaker5 = 0x00C00005,
- Speaker6 = 0x00C00006,
- Speaker7 = 0x00C00007,
- Speaker8 = 0x00C00008,
- Speaker9 = 0x00C00009,
- Speaker10 = 0x00C0000A,
- Speaker11 = 0x00C0000B,
- Speaker12 = 0x00C0000C,
- Speaker13 = 0x00C0000D,
- Speaker14 = 0x00C0000E,
- Speaker15 = 0x00C0000F,
- Speaker16 = 0x00C00010,
- Speaker17 = 0x00C00011,
- Speaker18 = 0x00C00012,
- Speaker19 = 0x00C00013,
- Speaker20 = 0x00C00014,
- Speaker21 = 0x00C00015,
- Speaker22 = 0x00C00016,
- Speaker23 = 0x00C00017,
- Speaker24 = 0x00C00018,
- Speaker25 = 0x00C00019,
- Speaker26 = 0x00C0001A,
- Speaker27 = 0x00C0001B,
- Speaker28 = 0x00C0001C,
- Speaker29 = 0x00C0001D,
- Speaker30 = 0x00C0001E,
- Speaker31 = 0x00C0001F,
- Speaker32 = 0x00C00020,
- Speaker33 = 0x00C00021,
- Speaker34 = 0x00C00022,
- Speaker35 = 0x00C00023,
- Speaker36 = 0x00C00024,
- Speaker37 = 0x00C00025,
- Speaker38 = 0x00C00026,
- Speaker39 = 0x00C00027,
- Speaker40 = 0x00C00028,
- Speaker41 = 0x00C00029,
- Speaker42 = 0x00C0002A,
- Speaker43 = 0x00C0002B,
- Speaker44 = 0x00C0002C,
- Speaker45 = 0x00C0002D,
- Speaker46 = 0x00C0002E,
- Speaker47 = 0x00C0002F,
- Speaker48 = 0x00C00030,
- Speaker49 = 0x00C00031,
- Speaker50 = 0x00C00032,
- Speaker51 = 0x00C00033,
- Speaker52 = 0x00C00034,
- Speaker53 = 0x00C00035,
- Speaker54 = 0x00C00036,
- Speaker55 = 0x00C00037,
- Speaker56 = 0x00C00038,
- Speaker57 = 0x00C00039,
- Speaker58 = 0x00C0003A,
- Speaker59 = 0x00C0003B,
- Speaker60 = 0x00C0003C,
- Speaker61 = 0x00C0003D,
- Speaker62 = 0x00C0003E,
- Speaker63 = 0x00C0003F,
- Speaker64 = 0x00C00040,
+ /*### Cooler ###*/
+ Cooler1 = 0x00D00001,
+ Cooler2 = 0x00D00002,
+ Cooler3 = 0x00D00003,
+ Cooler4 = 0x00D00004,
+ Cooler5 = 0x00D00005,
+ Cooler6 = 0x00D00006,
+ Cooler7 = 0x00D00007,
+ Cooler8 = 0x00D00008,
+ Cooler9 = 0x00D00009,
+ Cooler10 = 0x00D0000A,
+ Cooler11 = 0x00D0000B,
+ Cooler12 = 0x00D0000C,
+ Cooler13 = 0x00D0000D,
+ Cooler14 = 0x00D0000E,
+ Cooler15 = 0x00D0000F,
+ Cooler16 = 0x00D00010,
+ Cooler17 = 0x00D00011,
+ Cooler18 = 0x00D00012,
+ Cooler19 = 0x00D00013,
+ Cooler20 = 0x00D00014,
+ Cooler21 = 0x00D00015,
+ Cooler22 = 0x00D00016,
+ Cooler23 = 0x00D00017,
+ Cooler24 = 0x00D00018,
+ Cooler25 = 0x00D00019,
+ Cooler26 = 0x00D0001A,
+ Cooler27 = 0x00D0001B,
+ Cooler28 = 0x00D0001C,
+ Cooler29 = 0x00D0001D,
+ Cooler30 = 0x00D0001E,
+ Cooler31 = 0x00D0001F,
+ Cooler32 = 0x00D00020,
+ Cooler33 = 0x00D00021,
+ Cooler34 = 0x00D00022,
+ Cooler35 = 0x00D00023,
+ Cooler36 = 0x00D00024,
+ Cooler37 = 0x00D00025,
+ Cooler38 = 0x00D00026,
+ Cooler39 = 0x00D00027,
+ Cooler40 = 0x00D00028,
+ Cooler41 = 0x00D00029,
+ Cooler42 = 0x00D0002A,
+ Cooler43 = 0x00D0002B,
+ Cooler44 = 0x00D0002C,
+ Cooler45 = 0x00D0002D,
+ Cooler46 = 0x00D0002E,
+ Cooler47 = 0x00D0002F,
+ Cooler48 = 0x00D00030,
+ Cooler49 = 0x00D00031,
+ Cooler50 = 0x00D00032,
+ Cooler51 = 0x00D00033,
+ Cooler52 = 0x00D00034,
+ Cooler53 = 0x00D00035,
+ Cooler54 = 0x00D00036,
+ Cooler55 = 0x00D00037,
+ Cooler56 = 0x00D00038,
+ Cooler57 = 0x00D00039,
+ Cooler58 = 0x00D0003A,
+ Cooler59 = 0x00D0003B,
+ Cooler60 = 0x00D0003C,
+ Cooler61 = 0x00D0003D,
+ Cooler62 = 0x00D0003E,
+ Cooler63 = 0x00D0003F,
+ Cooler64 = 0x00D00040,
+ Cooler65 = 0x00D00041,
+ Cooler66 = 0x00D00042,
+ Cooler67 = 0x00D00043,
+ Cooler68 = 0x00D00044,
+ Cooler69 = 0x00D00045,
+ Cooler70 = 0x00D00046,
+ Cooler71 = 0x00D00047,
+ Cooler72 = 0x00D00048,
+ Cooler73 = 0x00D00049,
+ Cooler74 = 0x00D0004A,
+ Cooler75 = 0x00D0004B,
+ Cooler76 = 0x00D0004C,
+ Cooler77 = 0x00D0004D,
+ Cooler78 = 0x00D0004E,
+ Cooler79 = 0x00D0004F,
+ Cooler80 = 0x00D00050,
+ Cooler81 = 0x00D00051,
+ Cooler82 = 0x00D00052,
+ Cooler83 = 0x00D00053,
+ Cooler84 = 0x00D00054,
+ Cooler85 = 0x00D00055,
+ Cooler86 = 0x00D00056,
+ Cooler87 = 0x00D00057,
+ Cooler88 = 0x00D00058,
+ Cooler89 = 0x00D00059,
+ Cooler90 = 0x00D0005A,
+ Cooler91 = 0x00D0005B,
+ Cooler92 = 0x00D0005C,
+ Cooler93 = 0x00D0005D,
+ Cooler94 = 0x00D0005E,
+ Cooler95 = 0x00D0005F,
+ Cooler96 = 0x00D00060,
+ Cooler97 = 0x00D00061,
+ Cooler98 = 0x00D00062,
+ Cooler99 = 0x00D00063,
+ Cooler100 = 0x00D00064,
+ Cooler101 = 0x00D00065,
+ Cooler102 = 0x00D00066,
+ Cooler103 = 0x00D00067,
+ Cooler104 = 0x00D00068,
+ Cooler105 = 0x00D00069,
+ Cooler106 = 0x00D0006A,
+ Cooler107 = 0x00D0006B,
+ Cooler108 = 0x00D0006C,
+ Cooler109 = 0x00D0006D,
+ Cooler110 = 0x00D0006E,
+ Cooler111 = 0x00D0006F,
+ Cooler112 = 0x00D00070,
+ Cooler113 = 0x00D00071,
+ Cooler114 = 0x00D00072,
+ Cooler115 = 0x00D00073,
+ Cooler116 = 0x00D00074,
+ Cooler117 = 0x00D00075,
+ Cooler118 = 0x00D00076,
+ Cooler119 = 0x00D00077,
+ Cooler120 = 0x00D00078,
+ Cooler121 = 0x00D00079,
+ Cooler122 = 0x00D0007A,
+ Cooler123 = 0x00D0007B,
+ Cooler124 = 0x00D0007C,
+ Cooler125 = 0x00D0007D,
+ Cooler126 = 0x00D0007E,
+ Cooler127 = 0x00D0007F,
+ Cooler128 = 0x00D00080,
- /*### Cooler ###*/
- Cooler1 = 0x00D00001,
- Cooler2 = 0x00D00002,
- Cooler3 = 0x00D00003,
- Cooler4 = 0x00D00004,
- Cooler5 = 0x00D00005,
- Cooler6 = 0x00D00006,
- Cooler7 = 0x00D00007,
- Cooler8 = 0x00D00008,
- Cooler9 = 0x00D00009,
- Cooler10 = 0x00D0000A,
- Cooler11 = 0x00D0000B,
- Cooler12 = 0x00D0000C,
- Cooler13 = 0x00D0000D,
- Cooler14 = 0x00D0000E,
- Cooler15 = 0x00D0000F,
- Cooler16 = 0x00D00010,
- Cooler17 = 0x00D00011,
- Cooler18 = 0x00D00012,
- Cooler19 = 0x00D00013,
- Cooler20 = 0x00D00014,
- Cooler21 = 0x00D00015,
- Cooler22 = 0x00D00016,
- Cooler23 = 0x00D00017,
- Cooler24 = 0x00D00018,
- Cooler25 = 0x00D00019,
- Cooler26 = 0x00D0001A,
- Cooler27 = 0x00D0001B,
- Cooler28 = 0x00D0001C,
- Cooler29 = 0x00D0001D,
- Cooler30 = 0x00D0001E,
- Cooler31 = 0x00D0001F,
- Cooler32 = 0x00D00020,
- Cooler33 = 0x00D00021,
- Cooler34 = 0x00D00022,
- Cooler35 = 0x00D00023,
- Cooler36 = 0x00D00024,
- Cooler37 = 0x00D00025,
- Cooler38 = 0x00D00026,
- Cooler39 = 0x00D00027,
- Cooler40 = 0x00D00028,
- Cooler41 = 0x00D00029,
- Cooler42 = 0x00D0002A,
- Cooler43 = 0x00D0002B,
- Cooler44 = 0x00D0002C,
- Cooler45 = 0x00D0002D,
- Cooler46 = 0x00D0002E,
- Cooler47 = 0x00D0002F,
- Cooler48 = 0x00D00030,
- Cooler49 = 0x00D00031,
- Cooler50 = 0x00D00032,
- Cooler51 = 0x00D00033,
- Cooler52 = 0x00D00034,
- Cooler53 = 0x00D00035,
- Cooler54 = 0x00D00036,
- Cooler55 = 0x00D00037,
- Cooler56 = 0x00D00038,
- Cooler57 = 0x00D00039,
- Cooler58 = 0x00D0003A,
- Cooler59 = 0x00D0003B,
- Cooler60 = 0x00D0003C,
- Cooler61 = 0x00D0003D,
- Cooler62 = 0x00D0003E,
- Cooler63 = 0x00D0003F,
- Cooler64 = 0x00D00040,
+ /*### Custom ###*/
+ Custom1 = 0x0FE00001,
+ Custom2 = 0x0FE00002,
+ Custom3 = 0x0FE00003,
+ Custom4 = 0x0FE00004,
+ Custom5 = 0x0FE00005,
+ Custom6 = 0x0FE00006,
+ Custom7 = 0x0FE00007,
+ Custom8 = 0x0FE00008,
+ Custom9 = 0x0FE00009,
+ Custom10 = 0x0FE0000A,
+ Custom11 = 0x0FE0000B,
+ Custom12 = 0x0FE0000C,
+ Custom13 = 0x0FE0000D,
+ Custom14 = 0x0FE0000E,
+ Custom15 = 0x0FE0000F,
+ Custom16 = 0x0FE00010,
+ Custom17 = 0x0FE00011,
+ Custom18 = 0x0FE00012,
+ Custom19 = 0x0FE00013,
+ Custom20 = 0x0FE00014,
+ Custom21 = 0x0FE00015,
+ Custom22 = 0x0FE00016,
+ Custom23 = 0x0FE00017,
+ Custom24 = 0x0FE00018,
+ Custom25 = 0x0FE00019,
+ Custom26 = 0x0FE0001A,
+ Custom27 = 0x0FE0001B,
+ Custom28 = 0x0FE0001C,
+ Custom29 = 0x0FE0001D,
+ Custom30 = 0x0FE0001E,
+ Custom31 = 0x0FE0001F,
+ Custom32 = 0x0FE00020,
+ Custom33 = 0x0FE00021,
+ Custom34 = 0x0FE00022,
+ Custom35 = 0x0FE00023,
+ Custom36 = 0x0FE00024,
+ Custom37 = 0x0FE00025,
+ Custom38 = 0x0FE00026,
+ Custom39 = 0x0FE00027,
+ Custom40 = 0x0FE00028,
+ Custom41 = 0x0FE00029,
+ Custom42 = 0x0FE0002A,
+ Custom43 = 0x0FE0002B,
+ Custom44 = 0x0FE0002C,
+ Custom45 = 0x0FE0002D,
+ Custom46 = 0x0FE0002E,
+ Custom47 = 0x0FE0002F,
+ Custom48 = 0x0FE00030,
+ Custom49 = 0x0FE00031,
+ Custom50 = 0x0FE00032,
+ Custom51 = 0x0FE00033,
+ Custom52 = 0x0FE00034,
+ Custom53 = 0x0FE00035,
+ Custom54 = 0x0FE00036,
+ Custom55 = 0x0FE00037,
+ Custom56 = 0x0FE00038,
+ Custom57 = 0x0FE00039,
+ Custom58 = 0x0FE0003A,
+ Custom59 = 0x0FE0003B,
+ Custom60 = 0x0FE0003C,
+ Custom61 = 0x0FE0003D,
+ Custom62 = 0x0FE0003E,
+ Custom63 = 0x0FE0003F,
+ Custom64 = 0x0FE00040,
+ Custom65 = 0x0FE00041,
+ Custom66 = 0x0FE00042,
+ Custom67 = 0x0FE00043,
+ Custom68 = 0x0FE00044,
+ Custom69 = 0x0FE00045,
+ Custom70 = 0x0FE00046,
+ Custom71 = 0x0FE00047,
+ Custom72 = 0x0FE00048,
+ Custom73 = 0x0FE00049,
+ Custom74 = 0x0FE0004A,
+ Custom75 = 0x0FE0004B,
+ Custom76 = 0x0FE0004C,
+ Custom77 = 0x0FE0004D,
+ Custom78 = 0x0FE0004E,
+ Custom79 = 0x0FE0004F,
+ Custom80 = 0x0FE00050,
+ Custom81 = 0x0FE00051,
+ Custom82 = 0x0FE00052,
+ Custom83 = 0x0FE00053,
+ Custom84 = 0x0FE00054,
+ Custom85 = 0x0FE00055,
+ Custom86 = 0x0FE00056,
+ Custom87 = 0x0FE00057,
+ Custom88 = 0x0FE00058,
+ Custom89 = 0x0FE00059,
+ Custom90 = 0x0FE0005A,
+ Custom91 = 0x0FE0005B,
+ Custom92 = 0x0FE0005C,
+ Custom93 = 0x0FE0005D,
+ Custom94 = 0x0FE0005E,
+ Custom95 = 0x0FE0005F,
+ Custom96 = 0x0FE00060,
+ Custom97 = 0x0FE00061,
+ Custom98 = 0x0FE00062,
+ Custom99 = 0x0FE00063,
+ Custom100 = 0x0FE00064,
+ Custom101 = 0x0FE00065,
+ Custom102 = 0x0FE00066,
+ Custom103 = 0x0FE00067,
+ Custom104 = 0x0FE00068,
+ Custom105 = 0x0FE00069,
+ Custom106 = 0x0FE0006A,
+ Custom107 = 0x0FE0006B,
+ Custom108 = 0x0FE0006C,
+ Custom109 = 0x0FE0006D,
+ Custom110 = 0x0FE0006E,
+ Custom111 = 0x0FE0006F,
+ Custom112 = 0x0FE00070,
+ Custom113 = 0x0FE00071,
+ Custom114 = 0x0FE00072,
+ Custom115 = 0x0FE00073,
+ Custom116 = 0x0FE00074,
+ Custom117 = 0x0FE00075,
+ Custom118 = 0x0FE00076,
+ Custom119 = 0x0FE00077,
+ Custom120 = 0x0FE00078,
+ Custom121 = 0x0FE00079,
+ Custom122 = 0x0FE0007A,
+ Custom123 = 0x0FE0007B,
+ Custom124 = 0x0FE0007C,
+ Custom125 = 0x0FE0007D,
+ Custom126 = 0x0FE0007E,
+ Custom127 = 0x0FE0007F,
+ Custom128 = 0x0FE00080,
+ Custom129 = 0x0FE00081,
+ Custom130 = 0x0FE00082,
+ Custom131 = 0x0FE00083,
+ Custom132 = 0x0FE00084,
+ Custom133 = 0x0FE00085,
+ Custom134 = 0x0FE00086,
+ Custom135 = 0x0FE00087,
+ Custom136 = 0x0FE00088,
+ Custom137 = 0x0FE00089,
+ Custom138 = 0x0FE0008A,
+ Custom139 = 0x0FE0008B,
+ Custom140 = 0x0FE0008C,
+ Custom141 = 0x0FE0008D,
+ Custom142 = 0x0FE0008E,
+ Custom143 = 0x0FE0008F,
+ Custom144 = 0x0FE00090,
+ Custom145 = 0x0FE00091,
+ Custom146 = 0x0FE00092,
+ Custom147 = 0x0FE00093,
+ Custom148 = 0x0FE00094,
+ Custom149 = 0x0FE00095,
+ Custom150 = 0x0FE00096,
+ Custom151 = 0x0FE00097,
+ Custom152 = 0x0FE00098,
+ Custom153 = 0x0FE00099,
+ Custom154 = 0x0FE0009A,
+ Custom155 = 0x0FE0009B,
+ Custom156 = 0x0FE0009C,
+ Custom157 = 0x0FE0009D,
+ Custom158 = 0x0FE0009E,
+ Custom159 = 0x0FE0009F,
+ Custom160 = 0x0FE000A0,
+ Custom161 = 0x0FE000A1,
+ Custom162 = 0x0FE000A2,
+ Custom163 = 0x0FE000A3,
+ Custom164 = 0x0FE000A4,
+ Custom165 = 0x0FE000A5,
+ Custom166 = 0x0FE000A6,
+ Custom167 = 0x0FE000A7,
+ Custom168 = 0x0FE000A8,
+ Custom169 = 0x0FE000A9,
+ Custom170 = 0x0FE000AA,
+ Custom171 = 0x0FE000AB,
+ Custom172 = 0x0FE000AC,
+ Custom173 = 0x0FE000AD,
+ Custom174 = 0x0FE000AE,
+ Custom175 = 0x0FE000AF,
+ Custom176 = 0x0FE000B0,
+ Custom177 = 0x0FE000B1,
+ Custom178 = 0x0FE000B2,
+ Custom179 = 0x0FE000B3,
+ Custom180 = 0x0FE000B4,
+ Custom181 = 0x0FE000B5,
+ Custom182 = 0x0FE000B6,
+ Custom183 = 0x0FE000B7,
+ Custom184 = 0x0FE000B8,
+ Custom185 = 0x0FE000B9,
+ Custom186 = 0x0FE000BA,
+ Custom187 = 0x0FE000BB,
+ Custom188 = 0x0FE000BC,
+ Custom189 = 0x0FE000BD,
+ Custom190 = 0x0FE000BE,
+ Custom191 = 0x0FE000BF,
+ Custom192 = 0x0FE000C0,
+ Custom193 = 0x0FE000C1,
+ Custom194 = 0x0FE000C2,
+ Custom195 = 0x0FE000C3,
+ Custom196 = 0x0FE000C4,
+ Custom197 = 0x0FE000C5,
+ Custom198 = 0x0FE000C6,
+ Custom199 = 0x0FE000C7,
+ Custom200 = 0x0FE000C8,
+ Custom201 = 0x0FE000C9,
+ Custom202 = 0x0FE000CA,
+ Custom203 = 0x0FE000CB,
+ Custom204 = 0x0FE000CC,
+ Custom205 = 0x0FE000CD,
+ Custom206 = 0x0FE000CE,
+ Custom207 = 0x0FE000CF,
+ Custom208 = 0x0FE000D0,
+ Custom209 = 0x0FE000D1,
+ Custom210 = 0x0FE000D2,
+ Custom211 = 0x0FE000D3,
+ Custom212 = 0x0FE000D4,
+ Custom213 = 0x0FE000D5,
+ Custom214 = 0x0FE000D6,
+ Custom215 = 0x0FE000D7,
+ Custom216 = 0x0FE000D8,
+ Custom217 = 0x0FE000D9,
+ Custom218 = 0x0FE000DA,
+ Custom219 = 0x0FE000DB,
+ Custom220 = 0x0FE000DC,
+ Custom221 = 0x0FE000DD,
+ Custom222 = 0x0FE000DE,
+ Custom223 = 0x0FE000DF,
+ Custom224 = 0x0FE000E0,
+ Custom225 = 0x0FE000E1,
+ Custom226 = 0x0FE000E2,
+ Custom227 = 0x0FE000E3,
+ Custom228 = 0x0FE000E4,
+ Custom229 = 0x0FE000E5,
+ Custom230 = 0x0FE000E6,
+ Custom231 = 0x0FE000E7,
+ Custom232 = 0x0FE000E8,
+ Custom233 = 0x0FE000E9,
+ Custom234 = 0x0FE000EA,
+ Custom235 = 0x0FE000EB,
+ Custom236 = 0x0FE000EC,
+ Custom237 = 0x0FE000ED,
+ Custom238 = 0x0FE000EE,
+ Custom239 = 0x0FE000EF,
+ Custom240 = 0x0FE000F0,
+ Custom241 = 0x0FE000F1,
+ Custom242 = 0x0FE000F2,
+ Custom243 = 0x0FE000F3,
+ Custom244 = 0x0FE000F4,
+ Custom245 = 0x0FE000F5,
+ Custom246 = 0x0FE000F6,
+ Custom247 = 0x0FE000F7,
+ Custom248 = 0x0FE000F8,
+ Custom249 = 0x0FE000F9,
+ Custom250 = 0x0FE000FA,
+ Custom251 = 0x0FE000FB,
+ Custom252 = 0x0FE000FC,
+ Custom253 = 0x0FE000FD,
+ Custom254 = 0x0FE000FE,
+ Custom255 = 0x0FE000FF,
+ Custom256 = 0x0FE00100,
+ Custom257 = 0x0FE00101,
+ Custom258 = 0x0FE00102,
+ Custom259 = 0x0FE00103,
+ Custom260 = 0x0FE00104,
+ Custom261 = 0x0FE00105,
+ Custom262 = 0x0FE00106,
+ Custom263 = 0x0FE00107,
+ Custom264 = 0x0FE00108,
+ Custom265 = 0x0FE00109,
+ Custom266 = 0x0FE0010A,
+ Custom267 = 0x0FE0010B,
+ Custom268 = 0x0FE0010C,
+ Custom269 = 0x0FE0010D,
+ Custom270 = 0x0FE0010E,
+ Custom271 = 0x0FE0010F,
+ Custom272 = 0x0FE00110,
+ Custom273 = 0x0FE00111,
+ Custom274 = 0x0FE00112,
+ Custom275 = 0x0FE00113,
+ Custom276 = 0x0FE00114,
+ Custom277 = 0x0FE00115,
+ Custom278 = 0x0FE00116,
+ Custom279 = 0x0FE00117,
+ Custom280 = 0x0FE00118,
+ Custom281 = 0x0FE00119,
+ Custom282 = 0x0FE0011A,
+ Custom283 = 0x0FE0011B,
+ Custom284 = 0x0FE0011C,
+ Custom285 = 0x0FE0011D,
+ Custom286 = 0x0FE0011E,
+ Custom287 = 0x0FE0011F,
+ Custom288 = 0x0FE00120,
+ Custom289 = 0x0FE00121,
+ Custom290 = 0x0FE00122,
+ Custom291 = 0x0FE00123,
+ Custom292 = 0x0FE00124,
+ Custom293 = 0x0FE00125,
+ Custom294 = 0x0FE00126,
+ Custom295 = 0x0FE00127,
+ Custom296 = 0x0FE00128,
+ Custom297 = 0x0FE00129,
+ Custom298 = 0x0FE0012A,
+ Custom299 = 0x0FE0012B,
+ Custom300 = 0x0FE0012C,
+ Custom301 = 0x0FE0012D,
+ Custom302 = 0x0FE0012E,
+ Custom303 = 0x0FE0012F,
+ Custom304 = 0x0FE00130,
+ Custom305 = 0x0FE00131,
+ Custom306 = 0x0FE00132,
+ Custom307 = 0x0FE00133,
+ Custom308 = 0x0FE00134,
+ Custom309 = 0x0FE00135,
+ Custom310 = 0x0FE00136,
+ Custom311 = 0x0FE00137,
+ Custom312 = 0x0FE00138,
+ Custom313 = 0x0FE00139,
+ Custom314 = 0x0FE0013A,
+ Custom315 = 0x0FE0013B,
+ Custom316 = 0x0FE0013C,
+ Custom317 = 0x0FE0013D,
+ Custom318 = 0x0FE0013E,
+ Custom319 = 0x0FE0013F,
+ Custom320 = 0x0FE00140,
+ Custom321 = 0x0FE00141,
+ Custom322 = 0x0FE00142,
+ Custom323 = 0x0FE00143,
+ Custom324 = 0x0FE00144,
+ Custom325 = 0x0FE00145,
+ Custom326 = 0x0FE00146,
+ Custom327 = 0x0FE00147,
+ Custom328 = 0x0FE00148,
+ Custom329 = 0x0FE00149,
+ Custom330 = 0x0FE0014A,
+ Custom331 = 0x0FE0014B,
+ Custom332 = 0x0FE0014C,
+ Custom333 = 0x0FE0014D,
+ Custom334 = 0x0FE0014E,
+ Custom335 = 0x0FE0014F,
+ Custom336 = 0x0FE00150,
+ Custom337 = 0x0FE00151,
+ Custom338 = 0x0FE00152,
+ Custom339 = 0x0FE00153,
+ Custom340 = 0x0FE00154,
+ Custom341 = 0x0FE00155,
+ Custom342 = 0x0FE00156,
+ Custom343 = 0x0FE00157,
+ Custom344 = 0x0FE00158,
+ Custom345 = 0x0FE00159,
+ Custom346 = 0x0FE0015A,
+ Custom347 = 0x0FE0015B,
+ Custom348 = 0x0FE0015C,
+ Custom349 = 0x0FE0015D,
+ Custom350 = 0x0FE0015E,
+ Custom351 = 0x0FE0015F,
+ Custom352 = 0x0FE00160,
+ Custom353 = 0x0FE00161,
+ Custom354 = 0x0FE00162,
+ Custom355 = 0x0FE00163,
+ Custom356 = 0x0FE00164,
+ Custom357 = 0x0FE00165,
+ Custom358 = 0x0FE00166,
+ Custom359 = 0x0FE00167,
+ Custom360 = 0x0FE00168,
+ Custom361 = 0x0FE00169,
+ Custom362 = 0x0FE0016A,
+ Custom363 = 0x0FE0016B,
+ Custom364 = 0x0FE0016C,
+ Custom365 = 0x0FE0016D,
+ Custom366 = 0x0FE0016E,
+ Custom367 = 0x0FE0016F,
+ Custom368 = 0x0FE00170,
+ Custom369 = 0x0FE00171,
+ Custom370 = 0x0FE00172,
+ Custom371 = 0x0FE00173,
+ Custom372 = 0x0FE00174,
+ Custom373 = 0x0FE00175,
+ Custom374 = 0x0FE00176,
+ Custom375 = 0x0FE00177,
+ Custom376 = 0x0FE00178,
+ Custom377 = 0x0FE00179,
+ Custom378 = 0x0FE0017A,
+ Custom379 = 0x0FE0017B,
+ Custom380 = 0x0FE0017C,
+ Custom381 = 0x0FE0017D,
+ Custom382 = 0x0FE0017E,
+ Custom383 = 0x0FE0017F,
+ Custom384 = 0x0FE00180,
+ Custom385 = 0x0FE00181,
+ Custom386 = 0x0FE00182,
+ Custom387 = 0x0FE00183,
+ Custom388 = 0x0FE00184,
+ Custom389 = 0x0FE00185,
+ Custom390 = 0x0FE00186,
+ Custom391 = 0x0FE00187,
+ Custom392 = 0x0FE00188,
+ Custom393 = 0x0FE00189,
+ Custom394 = 0x0FE0018A,
+ Custom395 = 0x0FE0018B,
+ Custom396 = 0x0FE0018C,
+ Custom397 = 0x0FE0018D,
+ Custom398 = 0x0FE0018E,
+ Custom399 = 0x0FE0018F,
+ Custom400 = 0x0FE00190,
+ Custom401 = 0x0FE00191,
+ Custom402 = 0x0FE00192,
+ Custom403 = 0x0FE00193,
+ Custom404 = 0x0FE00194,
+ Custom405 = 0x0FE00195,
+ Custom406 = 0x0FE00196,
+ Custom407 = 0x0FE00197,
+ Custom408 = 0x0FE00198,
+ Custom409 = 0x0FE00199,
+ Custom410 = 0x0FE0019A,
+ Custom411 = 0x0FE0019B,
+ Custom412 = 0x0FE0019C,
+ Custom413 = 0x0FE0019D,
+ Custom414 = 0x0FE0019E,
+ Custom415 = 0x0FE0019F,
+ Custom416 = 0x0FE001A0,
+ Custom417 = 0x0FE001A1,
+ Custom418 = 0x0FE001A2,
+ Custom419 = 0x0FE001A3,
+ Custom420 = 0x0FE001A4,
+ Custom421 = 0x0FE001A5,
+ Custom422 = 0x0FE001A6,
+ Custom423 = 0x0FE001A7,
+ Custom424 = 0x0FE001A8,
+ Custom425 = 0x0FE001A9,
+ Custom426 = 0x0FE001AA,
+ Custom427 = 0x0FE001AB,
+ Custom428 = 0x0FE001AC,
+ Custom429 = 0x0FE001AD,
+ Custom430 = 0x0FE001AE,
+ Custom431 = 0x0FE001AF,
+ Custom432 = 0x0FE001B0,
+ Custom433 = 0x0FE001B1,
+ Custom434 = 0x0FE001B2,
+ Custom435 = 0x0FE001B3,
+ Custom436 = 0x0FE001B4,
+ Custom437 = 0x0FE001B5,
+ Custom438 = 0x0FE001B6,
+ Custom439 = 0x0FE001B7,
+ Custom440 = 0x0FE001B8,
+ Custom441 = 0x0FE001B9,
+ Custom442 = 0x0FE001BA,
+ Custom443 = 0x0FE001BB,
+ Custom444 = 0x0FE001BC,
+ Custom445 = 0x0FE001BD,
+ Custom446 = 0x0FE001BE,
+ Custom447 = 0x0FE001BF,
+ Custom448 = 0x0FE001C0,
+ Custom449 = 0x0FE001C1,
+ Custom450 = 0x0FE001C2,
+ Custom451 = 0x0FE001C3,
+ Custom452 = 0x0FE001C4,
+ Custom453 = 0x0FE001C5,
+ Custom454 = 0x0FE001C6,
+ Custom455 = 0x0FE001C7,
+ Custom456 = 0x0FE001C8,
+ Custom457 = 0x0FE001C9,
+ Custom458 = 0x0FE001CA,
+ Custom459 = 0x0FE001CB,
+ Custom460 = 0x0FE001CC,
+ Custom461 = 0x0FE001CD,
+ Custom462 = 0x0FE001CE,
+ Custom463 = 0x0FE001CF,
+ Custom464 = 0x0FE001D0,
+ Custom465 = 0x0FE001D1,
+ Custom466 = 0x0FE001D2,
+ Custom467 = 0x0FE001D3,
+ Custom468 = 0x0FE001D4,
+ Custom469 = 0x0FE001D5,
+ Custom470 = 0x0FE001D6,
+ Custom471 = 0x0FE001D7,
+ Custom472 = 0x0FE001D8,
+ Custom473 = 0x0FE001D9,
+ Custom474 = 0x0FE001DA,
+ Custom475 = 0x0FE001DB,
+ Custom476 = 0x0FE001DC,
+ Custom477 = 0x0FE001DD,
+ Custom478 = 0x0FE001DE,
+ Custom479 = 0x0FE001DF,
+ Custom480 = 0x0FE001E0,
+ Custom481 = 0x0FE001E1,
+ Custom482 = 0x0FE001E2,
+ Custom483 = 0x0FE001E3,
+ Custom484 = 0x0FE001E4,
+ Custom485 = 0x0FE001E5,
+ Custom486 = 0x0FE001E6,
+ Custom487 = 0x0FE001E7,
+ Custom488 = 0x0FE001E8,
+ Custom489 = 0x0FE001E9,
+ Custom490 = 0x0FE001EA,
+ Custom491 = 0x0FE001EB,
+ Custom492 = 0x0FE001EC,
+ Custom493 = 0x0FE001ED,
+ Custom494 = 0x0FE001EE,
+ Custom495 = 0x0FE001EF,
+ Custom496 = 0x0FE001F0,
+ Custom497 = 0x0FE001F1,
+ Custom498 = 0x0FE001F2,
+ Custom499 = 0x0FE001F3,
+ Custom500 = 0x0FE001F4,
+ Custom501 = 0x0FE001F5,
+ Custom502 = 0x0FE001F6,
+ Custom503 = 0x0FE001F7,
+ Custom504 = 0x0FE001F8,
+ Custom505 = 0x0FE001F9,
+ Custom506 = 0x0FE001FA,
+ Custom507 = 0x0FE001FB,
+ Custom508 = 0x0FE001FC,
+ Custom509 = 0x0FE001FD,
+ Custom510 = 0x0FE001FE,
+ Custom511 = 0x0FE001FF,
+ Custom512 = 0x0FE00200,
+ Custom513 = 0x0FE00201,
+ Custom514 = 0x0FE00202,
+ Custom515 = 0x0FE00203,
+ Custom516 = 0x0FE00204,
+ Custom517 = 0x0FE00205,
+ Custom518 = 0x0FE00206,
+ Custom519 = 0x0FE00207,
+ Custom520 = 0x0FE00208,
+ Custom521 = 0x0FE00209,
+ Custom522 = 0x0FE0020A,
+ Custom523 = 0x0FE0020B,
+ Custom524 = 0x0FE0020C,
+ Custom525 = 0x0FE0020D,
+ Custom526 = 0x0FE0020E,
+ Custom527 = 0x0FE0020F,
+ Custom528 = 0x0FE00210,
+ Custom529 = 0x0FE00211,
+ Custom530 = 0x0FE00212,
+ Custom531 = 0x0FE00213,
+ Custom532 = 0x0FE00214,
+ Custom533 = 0x0FE00215,
+ Custom534 = 0x0FE00216,
+ Custom535 = 0x0FE00217,
+ Custom536 = 0x0FE00218,
+ Custom537 = 0x0FE00219,
+ Custom538 = 0x0FE0021A,
+ Custom539 = 0x0FE0021B,
+ Custom540 = 0x0FE0021C,
+ Custom541 = 0x0FE0021D,
+ Custom542 = 0x0FE0021E,
+ Custom543 = 0x0FE0021F,
+ Custom544 = 0x0FE00220,
+ Custom545 = 0x0FE00221,
+ Custom546 = 0x0FE00222,
+ Custom547 = 0x0FE00223,
+ Custom548 = 0x0FE00224,
+ Custom549 = 0x0FE00225,
+ Custom550 = 0x0FE00226,
+ Custom551 = 0x0FE00227,
+ Custom552 = 0x0FE00228,
+ Custom553 = 0x0FE00229,
+ Custom554 = 0x0FE0022A,
+ Custom555 = 0x0FE0022B,
+ Custom556 = 0x0FE0022C,
+ Custom557 = 0x0FE0022D,
+ Custom558 = 0x0FE0022E,
+ Custom559 = 0x0FE0022F,
+ Custom560 = 0x0FE00230,
+ Custom561 = 0x0FE00231,
+ Custom562 = 0x0FE00232,
+ Custom563 = 0x0FE00233,
+ Custom564 = 0x0FE00234,
+ Custom565 = 0x0FE00235,
+ Custom566 = 0x0FE00236,
+ Custom567 = 0x0FE00237,
+ Custom568 = 0x0FE00238,
+ Custom569 = 0x0FE00239,
+ Custom570 = 0x0FE0023A,
+ Custom571 = 0x0FE0023B,
+ Custom572 = 0x0FE0023C,
+ Custom573 = 0x0FE0023D,
+ Custom574 = 0x0FE0023E,
+ Custom575 = 0x0FE0023F,
+ Custom576 = 0x0FE00240,
+ Custom577 = 0x0FE00241,
+ Custom578 = 0x0FE00242,
+ Custom579 = 0x0FE00243,
+ Custom580 = 0x0FE00244,
+ Custom581 = 0x0FE00245,
+ Custom582 = 0x0FE00246,
+ Custom583 = 0x0FE00247,
+ Custom584 = 0x0FE00248,
+ Custom585 = 0x0FE00249,
+ Custom586 = 0x0FE0024A,
+ Custom587 = 0x0FE0024B,
+ Custom588 = 0x0FE0024C,
+ Custom589 = 0x0FE0024D,
+ Custom590 = 0x0FE0024E,
+ Custom591 = 0x0FE0024F,
+ Custom592 = 0x0FE00250,
+ Custom593 = 0x0FE00251,
+ Custom594 = 0x0FE00252,
+ Custom595 = 0x0FE00253,
+ Custom596 = 0x0FE00254,
+ Custom597 = 0x0FE00255,
+ Custom598 = 0x0FE00256,
+ Custom599 = 0x0FE00257,
+ Custom600 = 0x0FE00258,
+ Custom601 = 0x0FE00259,
+ Custom602 = 0x0FE0025A,
+ Custom603 = 0x0FE0025B,
+ Custom604 = 0x0FE0025C,
+ Custom605 = 0x0FE0025D,
+ Custom606 = 0x0FE0025E,
+ Custom607 = 0x0FE0025F,
+ Custom608 = 0x0FE00260,
+ Custom609 = 0x0FE00261,
+ Custom610 = 0x0FE00262,
+ Custom611 = 0x0FE00263,
+ Custom612 = 0x0FE00264,
+ Custom613 = 0x0FE00265,
+ Custom614 = 0x0FE00266,
+ Custom615 = 0x0FE00267,
+ Custom616 = 0x0FE00268,
+ Custom617 = 0x0FE00269,
+ Custom618 = 0x0FE0026A,
+ Custom619 = 0x0FE0026B,
+ Custom620 = 0x0FE0026C,
+ Custom621 = 0x0FE0026D,
+ Custom622 = 0x0FE0026E,
+ Custom623 = 0x0FE0026F,
+ Custom624 = 0x0FE00270,
+ Custom625 = 0x0FE00271,
+ Custom626 = 0x0FE00272,
+ Custom627 = 0x0FE00273,
+ Custom628 = 0x0FE00274,
+ Custom629 = 0x0FE00275,
+ Custom630 = 0x0FE00276,
+ Custom631 = 0x0FE00277,
+ Custom632 = 0x0FE00278,
+ Custom633 = 0x0FE00279,
+ Custom634 = 0x0FE0027A,
+ Custom635 = 0x0FE0027B,
+ Custom636 = 0x0FE0027C,
+ Custom637 = 0x0FE0027D,
+ Custom638 = 0x0FE0027E,
+ Custom639 = 0x0FE0027F,
+ Custom640 = 0x0FE00280,
+ Custom641 = 0x0FE00281,
+ Custom642 = 0x0FE00282,
+ Custom643 = 0x0FE00283,
+ Custom644 = 0x0FE00284,
+ Custom645 = 0x0FE00285,
+ Custom646 = 0x0FE00286,
+ Custom647 = 0x0FE00287,
+ Custom648 = 0x0FE00288,
+ Custom649 = 0x0FE00289,
+ Custom650 = 0x0FE0028A,
+ Custom651 = 0x0FE0028B,
+ Custom652 = 0x0FE0028C,
+ Custom653 = 0x0FE0028D,
+ Custom654 = 0x0FE0028E,
+ Custom655 = 0x0FE0028F,
+ Custom656 = 0x0FE00290,
+ Custom657 = 0x0FE00291,
+ Custom658 = 0x0FE00292,
+ Custom659 = 0x0FE00293,
+ Custom660 = 0x0FE00294,
+ Custom661 = 0x0FE00295,
+ Custom662 = 0x0FE00296,
+ Custom663 = 0x0FE00297,
+ Custom664 = 0x0FE00298,
+ Custom665 = 0x0FE00299,
+ Custom666 = 0x0FE0029A,
+ Custom667 = 0x0FE0029B,
+ Custom668 = 0x0FE0029C,
+ Custom669 = 0x0FE0029D,
+ Custom670 = 0x0FE0029E,
+ Custom671 = 0x0FE0029F,
+ Custom672 = 0x0FE002A0,
+ Custom673 = 0x0FE002A1,
+ Custom674 = 0x0FE002A2,
+ Custom675 = 0x0FE002A3,
+ Custom676 = 0x0FE002A4,
+ Custom677 = 0x0FE002A5,
+ Custom678 = 0x0FE002A6,
+ Custom679 = 0x0FE002A7,
+ Custom680 = 0x0FE002A8,
+ Custom681 = 0x0FE002A9,
+ Custom682 = 0x0FE002AA,
+ Custom683 = 0x0FE002AB,
+ Custom684 = 0x0FE002AC,
+ Custom685 = 0x0FE002AD,
+ Custom686 = 0x0FE002AE,
+ Custom687 = 0x0FE002AF,
+ Custom688 = 0x0FE002B0,
+ Custom689 = 0x0FE002B1,
+ Custom690 = 0x0FE002B2,
+ Custom691 = 0x0FE002B3,
+ Custom692 = 0x0FE002B4,
+ Custom693 = 0x0FE002B5,
+ Custom694 = 0x0FE002B6,
+ Custom695 = 0x0FE002B7,
+ Custom696 = 0x0FE002B8,
+ Custom697 = 0x0FE002B9,
+ Custom698 = 0x0FE002BA,
+ Custom699 = 0x0FE002BB,
+ Custom700 = 0x0FE002BC,
+ Custom701 = 0x0FE002BD,
+ Custom702 = 0x0FE002BE,
+ Custom703 = 0x0FE002BF,
+ Custom704 = 0x0FE002C0,
+ Custom705 = 0x0FE002C1,
+ Custom706 = 0x0FE002C2,
+ Custom707 = 0x0FE002C3,
+ Custom708 = 0x0FE002C4,
+ Custom709 = 0x0FE002C5,
+ Custom710 = 0x0FE002C6,
+ Custom711 = 0x0FE002C7,
+ Custom712 = 0x0FE002C8,
+ Custom713 = 0x0FE002C9,
+ Custom714 = 0x0FE002CA,
+ Custom715 = 0x0FE002CB,
+ Custom716 = 0x0FE002CC,
+ Custom717 = 0x0FE002CD,
+ Custom718 = 0x0FE002CE,
+ Custom719 = 0x0FE002CF,
+ Custom720 = 0x0FE002D0,
+ Custom721 = 0x0FE002D1,
+ Custom722 = 0x0FE002D2,
+ Custom723 = 0x0FE002D3,
+ Custom724 = 0x0FE002D4,
+ Custom725 = 0x0FE002D5,
+ Custom726 = 0x0FE002D6,
+ Custom727 = 0x0FE002D7,
+ Custom728 = 0x0FE002D8,
+ Custom729 = 0x0FE002D9,
+ Custom730 = 0x0FE002DA,
+ Custom731 = 0x0FE002DB,
+ Custom732 = 0x0FE002DC,
+ Custom733 = 0x0FE002DD,
+ Custom734 = 0x0FE002DE,
+ Custom735 = 0x0FE002DF,
+ Custom736 = 0x0FE002E0,
+ Custom737 = 0x0FE002E1,
+ Custom738 = 0x0FE002E2,
+ Custom739 = 0x0FE002E3,
+ Custom740 = 0x0FE002E4,
+ Custom741 = 0x0FE002E5,
+ Custom742 = 0x0FE002E6,
+ Custom743 = 0x0FE002E7,
+ Custom744 = 0x0FE002E8,
+ Custom745 = 0x0FE002E9,
+ Custom746 = 0x0FE002EA,
+ Custom747 = 0x0FE002EB,
+ Custom748 = 0x0FE002EC,
+ Custom749 = 0x0FE002ED,
+ Custom750 = 0x0FE002EE,
+ Custom751 = 0x0FE002EF,
+ Custom752 = 0x0FE002F0,
+ Custom753 = 0x0FE002F1,
+ Custom754 = 0x0FE002F2,
+ Custom755 = 0x0FE002F3,
+ Custom756 = 0x0FE002F4,
+ Custom757 = 0x0FE002F5,
+ Custom758 = 0x0FE002F6,
+ Custom759 = 0x0FE002F7,
+ Custom760 = 0x0FE002F8,
+ Custom761 = 0x0FE002F9,
+ Custom762 = 0x0FE002FA,
+ Custom763 = 0x0FE002FB,
+ Custom764 = 0x0FE002FC,
+ Custom765 = 0x0FE002FD,
+ Custom766 = 0x0FE002FE,
+ Custom767 = 0x0FE002FF,
+ Custom768 = 0x0FE00300,
+ Custom769 = 0x0FE00301,
+ Custom770 = 0x0FE00302,
+ Custom771 = 0x0FE00303,
+ Custom772 = 0x0FE00304,
+ Custom773 = 0x0FE00305,
+ Custom774 = 0x0FE00306,
+ Custom775 = 0x0FE00307,
+ Custom776 = 0x0FE00308,
+ Custom777 = 0x0FE00309,
+ Custom778 = 0x0FE0030A,
+ Custom779 = 0x0FE0030B,
+ Custom780 = 0x0FE0030C,
+ Custom781 = 0x0FE0030D,
+ Custom782 = 0x0FE0030E,
+ Custom783 = 0x0FE0030F,
+ Custom784 = 0x0FE00310,
+ Custom785 = 0x0FE00311,
+ Custom786 = 0x0FE00312,
+ Custom787 = 0x0FE00313,
+ Custom788 = 0x0FE00314,
+ Custom789 = 0x0FE00315,
+ Custom790 = 0x0FE00316,
+ Custom791 = 0x0FE00317,
+ Custom792 = 0x0FE00318,
+ Custom793 = 0x0FE00319,
+ Custom794 = 0x0FE0031A,
+ Custom795 = 0x0FE0031B,
+ Custom796 = 0x0FE0031C,
+ Custom797 = 0x0FE0031D,
+ Custom798 = 0x0FE0031E,
+ Custom799 = 0x0FE0031F,
+ Custom800 = 0x0FE00320,
+ Custom801 = 0x0FE00321,
+ Custom802 = 0x0FE00322,
+ Custom803 = 0x0FE00323,
+ Custom804 = 0x0FE00324,
+ Custom805 = 0x0FE00325,
+ Custom806 = 0x0FE00326,
+ Custom807 = 0x0FE00327,
+ Custom808 = 0x0FE00328,
+ Custom809 = 0x0FE00329,
+ Custom810 = 0x0FE0032A,
+ Custom811 = 0x0FE0032B,
+ Custom812 = 0x0FE0032C,
+ Custom813 = 0x0FE0032D,
+ Custom814 = 0x0FE0032E,
+ Custom815 = 0x0FE0032F,
+ Custom816 = 0x0FE00330,
+ Custom817 = 0x0FE00331,
+ Custom818 = 0x0FE00332,
+ Custom819 = 0x0FE00333,
+ Custom820 = 0x0FE00334,
+ Custom821 = 0x0FE00335,
+ Custom822 = 0x0FE00336,
+ Custom823 = 0x0FE00337,
+ Custom824 = 0x0FE00338,
+ Custom825 = 0x0FE00339,
+ Custom826 = 0x0FE0033A,
+ Custom827 = 0x0FE0033B,
+ Custom828 = 0x0FE0033C,
+ Custom829 = 0x0FE0033D,
+ Custom830 = 0x0FE0033E,
+ Custom831 = 0x0FE0033F,
+ Custom832 = 0x0FE00340,
+ Custom833 = 0x0FE00341,
+ Custom834 = 0x0FE00342,
+ Custom835 = 0x0FE00343,
+ Custom836 = 0x0FE00344,
+ Custom837 = 0x0FE00345,
+ Custom838 = 0x0FE00346,
+ Custom839 = 0x0FE00347,
+ Custom840 = 0x0FE00348,
+ Custom841 = 0x0FE00349,
+ Custom842 = 0x0FE0034A,
+ Custom843 = 0x0FE0034B,
+ Custom844 = 0x0FE0034C,
+ Custom845 = 0x0FE0034D,
+ Custom846 = 0x0FE0034E,
+ Custom847 = 0x0FE0034F,
+ Custom848 = 0x0FE00350,
+ Custom849 = 0x0FE00351,
+ Custom850 = 0x0FE00352,
+ Custom851 = 0x0FE00353,
+ Custom852 = 0x0FE00354,
+ Custom853 = 0x0FE00355,
+ Custom854 = 0x0FE00356,
+ Custom855 = 0x0FE00357,
+ Custom856 = 0x0FE00358,
+ Custom857 = 0x0FE00359,
+ Custom858 = 0x0FE0035A,
+ Custom859 = 0x0FE0035B,
+ Custom860 = 0x0FE0035C,
+ Custom861 = 0x0FE0035D,
+ Custom862 = 0x0FE0035E,
+ Custom863 = 0x0FE0035F,
+ Custom864 = 0x0FE00360,
+ Custom865 = 0x0FE00361,
+ Custom866 = 0x0FE00362,
+ Custom867 = 0x0FE00363,
+ Custom868 = 0x0FE00364,
+ Custom869 = 0x0FE00365,
+ Custom870 = 0x0FE00366,
+ Custom871 = 0x0FE00367,
+ Custom872 = 0x0FE00368,
+ Custom873 = 0x0FE00369,
+ Custom874 = 0x0FE0036A,
+ Custom875 = 0x0FE0036B,
+ Custom876 = 0x0FE0036C,
+ Custom877 = 0x0FE0036D,
+ Custom878 = 0x0FE0036E,
+ Custom879 = 0x0FE0036F,
+ Custom880 = 0x0FE00370,
+ Custom881 = 0x0FE00371,
+ Custom882 = 0x0FE00372,
+ Custom883 = 0x0FE00373,
+ Custom884 = 0x0FE00374,
+ Custom885 = 0x0FE00375,
+ Custom886 = 0x0FE00376,
+ Custom887 = 0x0FE00377,
+ Custom888 = 0x0FE00378,
+ Custom889 = 0x0FE00379,
+ Custom890 = 0x0FE0037A,
+ Custom891 = 0x0FE0037B,
+ Custom892 = 0x0FE0037C,
+ Custom893 = 0x0FE0037D,
+ Custom894 = 0x0FE0037E,
+ Custom895 = 0x0FE0037F,
+ Custom896 = 0x0FE00380,
+ Custom897 = 0x0FE00381,
+ Custom898 = 0x0FE00382,
+ Custom899 = 0x0FE00383,
+ Custom900 = 0x0FE00384,
+ Custom901 = 0x0FE00385,
+ Custom902 = 0x0FE00386,
+ Custom903 = 0x0FE00387,
+ Custom904 = 0x0FE00388,
+ Custom905 = 0x0FE00389,
+ Custom906 = 0x0FE0038A,
+ Custom907 = 0x0FE0038B,
+ Custom908 = 0x0FE0038C,
+ Custom909 = 0x0FE0038D,
+ Custom910 = 0x0FE0038E,
+ Custom911 = 0x0FE0038F,
+ Custom912 = 0x0FE00390,
+ Custom913 = 0x0FE00391,
+ Custom914 = 0x0FE00392,
+ Custom915 = 0x0FE00393,
+ Custom916 = 0x0FE00394,
+ Custom917 = 0x0FE00395,
+ Custom918 = 0x0FE00396,
+ Custom919 = 0x0FE00397,
+ Custom920 = 0x0FE00398,
+ Custom921 = 0x0FE00399,
+ Custom922 = 0x0FE0039A,
+ Custom923 = 0x0FE0039B,
+ Custom924 = 0x0FE0039C,
+ Custom925 = 0x0FE0039D,
+ Custom926 = 0x0FE0039E,
+ Custom927 = 0x0FE0039F,
+ Custom928 = 0x0FE003A0,
+ Custom929 = 0x0FE003A1,
+ Custom930 = 0x0FE003A2,
+ Custom931 = 0x0FE003A3,
+ Custom932 = 0x0FE003A4,
+ Custom933 = 0x0FE003A5,
+ Custom934 = 0x0FE003A6,
+ Custom935 = 0x0FE003A7,
+ Custom936 = 0x0FE003A8,
+ Custom937 = 0x0FE003A9,
+ Custom938 = 0x0FE003AA,
+ Custom939 = 0x0FE003AB,
+ Custom940 = 0x0FE003AC,
+ Custom941 = 0x0FE003AD,
+ Custom942 = 0x0FE003AE,
+ Custom943 = 0x0FE003AF,
+ Custom944 = 0x0FE003B0,
+ Custom945 = 0x0FE003B1,
+ Custom946 = 0x0FE003B2,
+ Custom947 = 0x0FE003B3,
+ Custom948 = 0x0FE003B4,
+ Custom949 = 0x0FE003B5,
+ Custom950 = 0x0FE003B6,
+ Custom951 = 0x0FE003B7,
+ Custom952 = 0x0FE003B8,
+ Custom953 = 0x0FE003B9,
+ Custom954 = 0x0FE003BA,
+ Custom955 = 0x0FE003BB,
+ Custom956 = 0x0FE003BC,
+ Custom957 = 0x0FE003BD,
+ Custom958 = 0x0FE003BE,
+ Custom959 = 0x0FE003BF,
+ Custom960 = 0x0FE003C0,
+ Custom961 = 0x0FE003C1,
+ Custom962 = 0x0FE003C2,
+ Custom963 = 0x0FE003C3,
+ Custom964 = 0x0FE003C4,
+ Custom965 = 0x0FE003C5,
+ Custom966 = 0x0FE003C6,
+ Custom967 = 0x0FE003C7,
+ Custom968 = 0x0FE003C8,
+ Custom969 = 0x0FE003C9,
+ Custom970 = 0x0FE003CA,
+ Custom971 = 0x0FE003CB,
+ Custom972 = 0x0FE003CC,
+ Custom973 = 0x0FE003CD,
+ Custom974 = 0x0FE003CE,
+ Custom975 = 0x0FE003CF,
+ Custom976 = 0x0FE003D0,
+ Custom977 = 0x0FE003D1,
+ Custom978 = 0x0FE003D2,
+ Custom979 = 0x0FE003D3,
+ Custom980 = 0x0FE003D4,
+ Custom981 = 0x0FE003D5,
+ Custom982 = 0x0FE003D6,
+ Custom983 = 0x0FE003D7,
+ Custom984 = 0x0FE003D8,
+ Custom985 = 0x0FE003D9,
+ Custom986 = 0x0FE003DA,
+ Custom987 = 0x0FE003DB,
+ Custom988 = 0x0FE003DC,
+ Custom989 = 0x0FE003DD,
+ Custom990 = 0x0FE003DE,
+ Custom991 = 0x0FE003DF,
+ Custom992 = 0x0FE003E0,
+ Custom993 = 0x0FE003E1,
+ Custom994 = 0x0FE003E2,
+ Custom995 = 0x0FE003E3,
+ Custom996 = 0x0FE003E4,
+ Custom997 = 0x0FE003E5,
+ Custom998 = 0x0FE003E6,
+ Custom999 = 0x0FE003E7,
+ Custom1000 = 0x0FE003E8,
+ Custom1001 = 0x0FE003E9,
+ Custom1002 = 0x0FE003EA,
+ Custom1003 = 0x0FE003EB,
+ Custom1004 = 0x0FE003EC,
+ Custom1005 = 0x0FE003ED,
+ Custom1006 = 0x0FE003EE,
+ Custom1007 = 0x0FE003EF,
+ Custom1008 = 0x0FE003F0,
+ Custom1009 = 0x0FE003F1,
+ Custom1010 = 0x0FE003F2,
+ Custom1011 = 0x0FE003F3,
+ Custom1012 = 0x0FE003F4,
+ Custom1013 = 0x0FE003F5,
+ Custom1014 = 0x0FE003F6,
+ Custom1015 = 0x0FE003F7,
+ Custom1016 = 0x0FE003F8,
+ Custom1017 = 0x0FE003F9,
+ Custom1018 = 0x0FE003FA,
+ Custom1019 = 0x0FE003FB,
+ Custom1020 = 0x0FE003FC,
+ Custom1021 = 0x0FE003FD,
+ Custom1022 = 0x0FE003FE,
+ Custom1023 = 0x0FE003FF,
+ Custom1024 = 0x0FE00400,
- /*### Custom ###*/
- Custom1 = 0x0FF00001,
- Custom2 = 0x0FF00002,
- Custom3 = 0x0FF00003,
- Custom4 = 0x0FF00004,
- Custom5 = 0x0FF00005,
- Custom6 = 0x0FF00006,
- Custom7 = 0x0FF00007,
- Custom8 = 0x0FF00008,
- Custom9 = 0x0FF00009,
- Custom10 = 0x0FF0000A,
- Custom11 = 0x0FF0000B,
- Custom12 = 0x0FF0000C,
- Custom13 = 0x0FF0000D,
- Custom14 = 0x0FF0000E,
- Custom15 = 0x0FF0000F,
- Custom16 = 0x0FF00010,
- Custom17 = 0x0FF00011,
- Custom18 = 0x0FF00012,
- Custom19 = 0x0FF00013,
- Custom20 = 0x0FF00014,
- Custom21 = 0x0FF00015,
- Custom22 = 0x0FF00016,
- Custom23 = 0x0FF00017,
- Custom24 = 0x0FF00018,
- Custom25 = 0x0FF00019,
- Custom26 = 0x0FF0001A,
- Custom27 = 0x0FF0001B,
- Custom28 = 0x0FF0001C,
- Custom29 = 0x0FF0001D,
- Custom30 = 0x0FF0001E,
- Custom31 = 0x0FF0001F,
- Custom32 = 0x0FF00020,
- Custom33 = 0x0FF00021,
- Custom34 = 0x0FF00022,
- Custom35 = 0x0FF00023,
- Custom36 = 0x0FF00024,
- Custom37 = 0x0FF00025,
- Custom38 = 0x0FF00026,
- Custom39 = 0x0FF00027,
- Custom40 = 0x0FF00028,
- Custom41 = 0x0FF00029,
- Custom42 = 0x0FF0002A,
- Custom43 = 0x0FF0002B,
- Custom44 = 0x0FF0002C,
- Custom45 = 0x0FF0002D,
- Custom46 = 0x0FF0002E,
- Custom47 = 0x0FF0002F,
- Custom48 = 0x0FF00030,
- Custom49 = 0x0FF00031,
- Custom50 = 0x0FF00032,
- Custom51 = 0x0FF00033,
- Custom52 = 0x0FF00034,
- Custom53 = 0x0FF00035,
- Custom54 = 0x0FF00036,
- Custom55 = 0x0FF00037,
- Custom56 = 0x0FF00038,
- Custom57 = 0x0FF00039,
- Custom58 = 0x0FF0003A,
- Custom59 = 0x0FF0003B,
- Custom60 = 0x0FF0003C,
- Custom61 = 0x0FF0003D,
- Custom62 = 0x0FF0003E,
- Custom63 = 0x0FF0003F,
- Custom64 = 0x0FF00040,
- Custom65 = 0x0FF00041,
- Custom66 = 0x0FF00042,
- Custom67 = 0x0FF00043,
- Custom68 = 0x0FF00044,
- Custom69 = 0x0FF00045,
- Custom70 = 0x0FF00046,
- Custom71 = 0x0FF00047,
- Custom72 = 0x0FF00048,
- Custom73 = 0x0FF00049,
- Custom74 = 0x0FF0004A,
- Custom75 = 0x0FF0004B,
- Custom76 = 0x0FF0004C,
- Custom77 = 0x0FF0004D,
- Custom78 = 0x0FF0004E,
- Custom79 = 0x0FF0004F,
- Custom80 = 0x0FF00050,
- Custom81 = 0x0FF00051,
- Custom82 = 0x0FF00052,
- Custom83 = 0x0FF00053,
- Custom84 = 0x0FF00054,
- Custom85 = 0x0FF00055,
- Custom86 = 0x0FF00056,
- Custom87 = 0x0FF00057,
- Custom88 = 0x0FF00058,
- Custom89 = 0x0FF00059,
- Custom90 = 0x0FF0005A,
- Custom91 = 0x0FF0005B,
- Custom92 = 0x0FF0005C,
- Custom93 = 0x0FF0005D,
- Custom94 = 0x0FF0005E,
- Custom95 = 0x0FF0005F,
- Custom96 = 0x0FF00060,
- Custom97 = 0x0FF00061,
- Custom98 = 0x0FF00062,
- Custom99 = 0x0FF00063,
- Custom100 = 0x0FF00064,
- Custom101 = 0x0FF00065,
- Custom102 = 0x0FF00066,
- Custom103 = 0x0FF00067,
- Custom104 = 0x0FF00068,
- Custom105 = 0x0FF00069,
- Custom106 = 0x0FF0006A,
- Custom107 = 0x0FF0006B,
- Custom108 = 0x0FF0006C,
- Custom109 = 0x0FF0006D,
- Custom110 = 0x0FF0006E,
- Custom111 = 0x0FF0006F,
- Custom112 = 0x0FF00070,
- Custom113 = 0x0FF00071,
- Custom114 = 0x0FF00072,
- Custom115 = 0x0FF00073,
- Custom116 = 0x0FF00074,
- Custom117 = 0x0FF00075,
- Custom118 = 0x0FF00076,
- Custom119 = 0x0FF00077,
- Custom120 = 0x0FF00078,
- Custom121 = 0x0FF00079,
- Custom122 = 0x0FF0007A,
- Custom123 = 0x0FF0007B,
- Custom124 = 0x0FF0007C,
- Custom125 = 0x0FF0007D,
- Custom126 = 0x0FF0007E,
- Custom127 = 0x0FF0007F,
- Custom128 = 0x0FF00080,
- }
-}
+ /*### Unknown ###*/
+ Unknown1 = 0x0FF00001,
+ Unknown2 = 0x0FF00002,
+ Unknown3 = 0x0FF00003,
+ Unknown4 = 0x0FF00004,
+ Unknown5 = 0x0FF00005,
+ Unknown6 = 0x0FF00006,
+ Unknown7 = 0x0FF00007,
+ Unknown8 = 0x0FF00008,
+ Unknown9 = 0x0FF00009,
+ Unknown10 = 0x0FF0000A,
+ Unknown11 = 0x0FF0000B,
+ Unknown12 = 0x0FF0000C,
+ Unknown13 = 0x0FF0000D,
+ Unknown14 = 0x0FF0000E,
+ Unknown15 = 0x0FF0000F,
+ Unknown16 = 0x0FF00010,
+ Unknown17 = 0x0FF00011,
+ Unknown18 = 0x0FF00012,
+ Unknown19 = 0x0FF00013,
+ Unknown20 = 0x0FF00014,
+ Unknown21 = 0x0FF00015,
+ Unknown22 = 0x0FF00016,
+ Unknown23 = 0x0FF00017,
+ Unknown24 = 0x0FF00018,
+ Unknown25 = 0x0FF00019,
+ Unknown26 = 0x0FF0001A,
+ Unknown27 = 0x0FF0001B,
+ Unknown28 = 0x0FF0001C,
+ Unknown29 = 0x0FF0001D,
+ Unknown30 = 0x0FF0001E,
+ Unknown31 = 0x0FF0001F,
+ Unknown32 = 0x0FF00020,
+ Unknown33 = 0x0FF00021,
+ Unknown34 = 0x0FF00022,
+ Unknown35 = 0x0FF00023,
+ Unknown36 = 0x0FF00024,
+ Unknown37 = 0x0FF00025,
+ Unknown38 = 0x0FF00026,
+ Unknown39 = 0x0FF00027,
+ Unknown40 = 0x0FF00028,
+ Unknown41 = 0x0FF00029,
+ Unknown42 = 0x0FF0002A,
+ Unknown43 = 0x0FF0002B,
+ Unknown44 = 0x0FF0002C,
+ Unknown45 = 0x0FF0002D,
+ Unknown46 = 0x0FF0002E,
+ Unknown47 = 0x0FF0002F,
+ Unknown48 = 0x0FF00030,
+ Unknown49 = 0x0FF00031,
+ Unknown50 = 0x0FF00032,
+ Unknown51 = 0x0FF00033,
+ Unknown52 = 0x0FF00034,
+ Unknown53 = 0x0FF00035,
+ Unknown54 = 0x0FF00036,
+ Unknown55 = 0x0FF00037,
+ Unknown56 = 0x0FF00038,
+ Unknown57 = 0x0FF00039,
+ Unknown58 = 0x0FF0003A,
+ Unknown59 = 0x0FF0003B,
+ Unknown60 = 0x0FF0003C,
+ Unknown61 = 0x0FF0003D,
+ Unknown62 = 0x0FF0003E,
+ Unknown63 = 0x0FF0003F,
+ Unknown64 = 0x0FF00040,
+ Unknown65 = 0x0FF00041,
+ Unknown66 = 0x0FF00042,
+ Unknown67 = 0x0FF00043,
+ Unknown68 = 0x0FF00044,
+ Unknown69 = 0x0FF00045,
+ Unknown70 = 0x0FF00046,
+ Unknown71 = 0x0FF00047,
+ Unknown72 = 0x0FF00048,
+ Unknown73 = 0x0FF00049,
+ Unknown74 = 0x0FF0004A,
+ Unknown75 = 0x0FF0004B,
+ Unknown76 = 0x0FF0004C,
+ Unknown77 = 0x0FF0004D,
+ Unknown78 = 0x0FF0004E,
+ Unknown79 = 0x0FF0004F,
+ Unknown80 = 0x0FF00050,
+ Unknown81 = 0x0FF00051,
+ Unknown82 = 0x0FF00052,
+ Unknown83 = 0x0FF00053,
+ Unknown84 = 0x0FF00054,
+ Unknown85 = 0x0FF00055,
+ Unknown86 = 0x0FF00056,
+ Unknown87 = 0x0FF00057,
+ Unknown88 = 0x0FF00058,
+ Unknown89 = 0x0FF00059,
+ Unknown90 = 0x0FF0005A,
+ Unknown91 = 0x0FF0005B,
+ Unknown92 = 0x0FF0005C,
+ Unknown93 = 0x0FF0005D,
+ Unknown94 = 0x0FF0005E,
+ Unknown95 = 0x0FF0005F,
+ Unknown96 = 0x0FF00060,
+ Unknown97 = 0x0FF00061,
+ Unknown98 = 0x0FF00062,
+ Unknown99 = 0x0FF00063,
+ Unknown100 = 0x0FF00064,
+ Unknown101 = 0x0FF00065,
+ Unknown102 = 0x0FF00066,
+ Unknown103 = 0x0FF00067,
+ Unknown104 = 0x0FF00068,
+ Unknown105 = 0x0FF00069,
+ Unknown106 = 0x0FF0006A,
+ Unknown107 = 0x0FF0006B,
+ Unknown108 = 0x0FF0006C,
+ Unknown109 = 0x0FF0006D,
+ Unknown110 = 0x0FF0006E,
+ Unknown111 = 0x0FF0006F,
+ Unknown112 = 0x0FF00070,
+ Unknown113 = 0x0FF00071,
+ Unknown114 = 0x0FF00072,
+ Unknown115 = 0x0FF00073,
+ Unknown116 = 0x0FF00074,
+ Unknown117 = 0x0FF00075,
+ Unknown118 = 0x0FF00076,
+ Unknown119 = 0x0FF00077,
+ Unknown120 = 0x0FF00078,
+ Unknown121 = 0x0FF00079,
+ Unknown122 = 0x0FF0007A,
+ Unknown123 = 0x0FF0007B,
+ Unknown124 = 0x0FF0007C,
+ Unknown125 = 0x0FF0007D,
+ Unknown126 = 0x0FF0007E,
+ Unknown127 = 0x0FF0007F,
+ Unknown128 = 0x0FF00080,
+ Unknown129 = 0x0FF00081,
+ Unknown130 = 0x0FF00082,
+ Unknown131 = 0x0FF00083,
+ Unknown132 = 0x0FF00084,
+ Unknown133 = 0x0FF00085,
+ Unknown134 = 0x0FF00086,
+ Unknown135 = 0x0FF00087,
+ Unknown136 = 0x0FF00088,
+ Unknown137 = 0x0FF00089,
+ Unknown138 = 0x0FF0008A,
+ Unknown139 = 0x0FF0008B,
+ Unknown140 = 0x0FF0008C,
+ Unknown141 = 0x0FF0008D,
+ Unknown142 = 0x0FF0008E,
+ Unknown143 = 0x0FF0008F,
+ Unknown144 = 0x0FF00090,
+ Unknown145 = 0x0FF00091,
+ Unknown146 = 0x0FF00092,
+ Unknown147 = 0x0FF00093,
+ Unknown148 = 0x0FF00094,
+ Unknown149 = 0x0FF00095,
+ Unknown150 = 0x0FF00096,
+ Unknown151 = 0x0FF00097,
+ Unknown152 = 0x0FF00098,
+ Unknown153 = 0x0FF00099,
+ Unknown154 = 0x0FF0009A,
+ Unknown155 = 0x0FF0009B,
+ Unknown156 = 0x0FF0009C,
+ Unknown157 = 0x0FF0009D,
+ Unknown158 = 0x0FF0009E,
+ Unknown159 = 0x0FF0009F,
+ Unknown160 = 0x0FF000A0,
+ Unknown161 = 0x0FF000A1,
+ Unknown162 = 0x0FF000A2,
+ Unknown163 = 0x0FF000A3,
+ Unknown164 = 0x0FF000A4,
+ Unknown165 = 0x0FF000A5,
+ Unknown166 = 0x0FF000A6,
+ Unknown167 = 0x0FF000A7,
+ Unknown168 = 0x0FF000A8,
+ Unknown169 = 0x0FF000A9,
+ Unknown170 = 0x0FF000AA,
+ Unknown171 = 0x0FF000AB,
+ Unknown172 = 0x0FF000AC,
+ Unknown173 = 0x0FF000AD,
+ Unknown174 = 0x0FF000AE,
+ Unknown175 = 0x0FF000AF,
+ Unknown176 = 0x0FF000B0,
+ Unknown177 = 0x0FF000B1,
+ Unknown178 = 0x0FF000B2,
+ Unknown179 = 0x0FF000B3,
+ Unknown180 = 0x0FF000B4,
+ Unknown181 = 0x0FF000B5,
+ Unknown182 = 0x0FF000B6,
+ Unknown183 = 0x0FF000B7,
+ Unknown184 = 0x0FF000B8,
+ Unknown185 = 0x0FF000B9,
+ Unknown186 = 0x0FF000BA,
+ Unknown187 = 0x0FF000BB,
+ Unknown188 = 0x0FF000BC,
+ Unknown189 = 0x0FF000BD,
+ Unknown190 = 0x0FF000BE,
+ Unknown191 = 0x0FF000BF,
+ Unknown192 = 0x0FF000C0,
+ Unknown193 = 0x0FF000C1,
+ Unknown194 = 0x0FF000C2,
+ Unknown195 = 0x0FF000C3,
+ Unknown196 = 0x0FF000C4,
+ Unknown197 = 0x0FF000C5,
+ Unknown198 = 0x0FF000C6,
+ Unknown199 = 0x0FF000C7,
+ Unknown200 = 0x0FF000C8,
+ Unknown201 = 0x0FF000C9,
+ Unknown202 = 0x0FF000CA,
+ Unknown203 = 0x0FF000CB,
+ Unknown204 = 0x0FF000CC,
+ Unknown205 = 0x0FF000CD,
+ Unknown206 = 0x0FF000CE,
+ Unknown207 = 0x0FF000CF,
+ Unknown208 = 0x0FF000D0,
+ Unknown209 = 0x0FF000D1,
+ Unknown210 = 0x0FF000D2,
+ Unknown211 = 0x0FF000D3,
+ Unknown212 = 0x0FF000D4,
+ Unknown213 = 0x0FF000D5,
+ Unknown214 = 0x0FF000D6,
+ Unknown215 = 0x0FF000D7,
+ Unknown216 = 0x0FF000D8,
+ Unknown217 = 0x0FF000D9,
+ Unknown218 = 0x0FF000DA,
+ Unknown219 = 0x0FF000DB,
+ Unknown220 = 0x0FF000DC,
+ Unknown221 = 0x0FF000DD,
+ Unknown222 = 0x0FF000DE,
+ Unknown223 = 0x0FF000DF,
+ Unknown224 = 0x0FF000E0,
+ Unknown225 = 0x0FF000E1,
+ Unknown226 = 0x0FF000E2,
+ Unknown227 = 0x0FF000E3,
+ Unknown228 = 0x0FF000E4,
+ Unknown229 = 0x0FF000E5,
+ Unknown230 = 0x0FF000E6,
+ Unknown231 = 0x0FF000E7,
+ Unknown232 = 0x0FF000E8,
+ Unknown233 = 0x0FF000E9,
+ Unknown234 = 0x0FF000EA,
+ Unknown235 = 0x0FF000EB,
+ Unknown236 = 0x0FF000EC,
+ Unknown237 = 0x0FF000ED,
+ Unknown238 = 0x0FF000EE,
+ Unknown239 = 0x0FF000EF,
+ Unknown240 = 0x0FF000F0,
+ Unknown241 = 0x0FF000F1,
+ Unknown242 = 0x0FF000F2,
+ Unknown243 = 0x0FF000F3,
+ Unknown244 = 0x0FF000F4,
+ Unknown245 = 0x0FF000F5,
+ Unknown246 = 0x0FF000F6,
+ Unknown247 = 0x0FF000F7,
+ Unknown248 = 0x0FF000F8,
+ Unknown249 = 0x0FF000F9,
+ Unknown250 = 0x0FF000FA,
+ Unknown251 = 0x0FF000FB,
+ Unknown252 = 0x0FF000FC,
+ Unknown253 = 0x0FF000FD,
+ Unknown254 = 0x0FF000FE,
+ Unknown255 = 0x0FF000FF,
+ Unknown256 = 0x0FF00100,
+ Unknown257 = 0x0FF00101,
+ Unknown258 = 0x0FF00102,
+ Unknown259 = 0x0FF00103,
+ Unknown260 = 0x0FF00104,
+ Unknown261 = 0x0FF00105,
+ Unknown262 = 0x0FF00106,
+ Unknown263 = 0x0FF00107,
+ Unknown264 = 0x0FF00108,
+ Unknown265 = 0x0FF00109,
+ Unknown266 = 0x0FF0010A,
+ Unknown267 = 0x0FF0010B,
+ Unknown268 = 0x0FF0010C,
+ Unknown269 = 0x0FF0010D,
+ Unknown270 = 0x0FF0010E,
+ Unknown271 = 0x0FF0010F,
+ Unknown272 = 0x0FF00110,
+ Unknown273 = 0x0FF00111,
+ Unknown274 = 0x0FF00112,
+ Unknown275 = 0x0FF00113,
+ Unknown276 = 0x0FF00114,
+ Unknown277 = 0x0FF00115,
+ Unknown278 = 0x0FF00116,
+ Unknown279 = 0x0FF00117,
+ Unknown280 = 0x0FF00118,
+ Unknown281 = 0x0FF00119,
+ Unknown282 = 0x0FF0011A,
+ Unknown283 = 0x0FF0011B,
+ Unknown284 = 0x0FF0011C,
+ Unknown285 = 0x0FF0011D,
+ Unknown286 = 0x0FF0011E,
+ Unknown287 = 0x0FF0011F,
+ Unknown288 = 0x0FF00120,
+ Unknown289 = 0x0FF00121,
+ Unknown290 = 0x0FF00122,
+ Unknown291 = 0x0FF00123,
+ Unknown292 = 0x0FF00124,
+ Unknown293 = 0x0FF00125,
+ Unknown294 = 0x0FF00126,
+ Unknown295 = 0x0FF00127,
+ Unknown296 = 0x0FF00128,
+ Unknown297 = 0x0FF00129,
+ Unknown298 = 0x0FF0012A,
+ Unknown299 = 0x0FF0012B,
+ Unknown300 = 0x0FF0012C,
+ Unknown301 = 0x0FF0012D,
+ Unknown302 = 0x0FF0012E,
+ Unknown303 = 0x0FF0012F,
+ Unknown304 = 0x0FF00130,
+ Unknown305 = 0x0FF00131,
+ Unknown306 = 0x0FF00132,
+ Unknown307 = 0x0FF00133,
+ Unknown308 = 0x0FF00134,
+ Unknown309 = 0x0FF00135,
+ Unknown310 = 0x0FF00136,
+ Unknown311 = 0x0FF00137,
+ Unknown312 = 0x0FF00138,
+ Unknown313 = 0x0FF00139,
+ Unknown314 = 0x0FF0013A,
+ Unknown315 = 0x0FF0013B,
+ Unknown316 = 0x0FF0013C,
+ Unknown317 = 0x0FF0013D,
+ Unknown318 = 0x0FF0013E,
+ Unknown319 = 0x0FF0013F,
+ Unknown320 = 0x0FF00140,
+ Unknown321 = 0x0FF00141,
+ Unknown322 = 0x0FF00142,
+ Unknown323 = 0x0FF00143,
+ Unknown324 = 0x0FF00144,
+ Unknown325 = 0x0FF00145,
+ Unknown326 = 0x0FF00146,
+ Unknown327 = 0x0FF00147,
+ Unknown328 = 0x0FF00148,
+ Unknown329 = 0x0FF00149,
+ Unknown330 = 0x0FF0014A,
+ Unknown331 = 0x0FF0014B,
+ Unknown332 = 0x0FF0014C,
+ Unknown333 = 0x0FF0014D,
+ Unknown334 = 0x0FF0014E,
+ Unknown335 = 0x0FF0014F,
+ Unknown336 = 0x0FF00150,
+ Unknown337 = 0x0FF00151,
+ Unknown338 = 0x0FF00152,
+ Unknown339 = 0x0FF00153,
+ Unknown340 = 0x0FF00154,
+ Unknown341 = 0x0FF00155,
+ Unknown342 = 0x0FF00156,
+ Unknown343 = 0x0FF00157,
+ Unknown344 = 0x0FF00158,
+ Unknown345 = 0x0FF00159,
+ Unknown346 = 0x0FF0015A,
+ Unknown347 = 0x0FF0015B,
+ Unknown348 = 0x0FF0015C,
+ Unknown349 = 0x0FF0015D,
+ Unknown350 = 0x0FF0015E,
+ Unknown351 = 0x0FF0015F,
+ Unknown352 = 0x0FF00160,
+ Unknown353 = 0x0FF00161,
+ Unknown354 = 0x0FF00162,
+ Unknown355 = 0x0FF00163,
+ Unknown356 = 0x0FF00164,
+ Unknown357 = 0x0FF00165,
+ Unknown358 = 0x0FF00166,
+ Unknown359 = 0x0FF00167,
+ Unknown360 = 0x0FF00168,
+ Unknown361 = 0x0FF00169,
+ Unknown362 = 0x0FF0016A,
+ Unknown363 = 0x0FF0016B,
+ Unknown364 = 0x0FF0016C,
+ Unknown365 = 0x0FF0016D,
+ Unknown366 = 0x0FF0016E,
+ Unknown367 = 0x0FF0016F,
+ Unknown368 = 0x0FF00170,
+ Unknown369 = 0x0FF00171,
+ Unknown370 = 0x0FF00172,
+ Unknown371 = 0x0FF00173,
+ Unknown372 = 0x0FF00174,
+ Unknown373 = 0x0FF00175,
+ Unknown374 = 0x0FF00176,
+ Unknown375 = 0x0FF00177,
+ Unknown376 = 0x0FF00178,
+ Unknown377 = 0x0FF00179,
+ Unknown378 = 0x0FF0017A,
+ Unknown379 = 0x0FF0017B,
+ Unknown380 = 0x0FF0017C,
+ Unknown381 = 0x0FF0017D,
+ Unknown382 = 0x0FF0017E,
+ Unknown383 = 0x0FF0017F,
+ Unknown384 = 0x0FF00180,
+ Unknown385 = 0x0FF00181,
+ Unknown386 = 0x0FF00182,
+ Unknown387 = 0x0FF00183,
+ Unknown388 = 0x0FF00184,
+ Unknown389 = 0x0FF00185,
+ Unknown390 = 0x0FF00186,
+ Unknown391 = 0x0FF00187,
+ Unknown392 = 0x0FF00188,
+ Unknown393 = 0x0FF00189,
+ Unknown394 = 0x0FF0018A,
+ Unknown395 = 0x0FF0018B,
+ Unknown396 = 0x0FF0018C,
+ Unknown397 = 0x0FF0018D,
+ Unknown398 = 0x0FF0018E,
+ Unknown399 = 0x0FF0018F,
+ Unknown400 = 0x0FF00190,
+ Unknown401 = 0x0FF00191,
+ Unknown402 = 0x0FF00192,
+ Unknown403 = 0x0FF00193,
+ Unknown404 = 0x0FF00194,
+ Unknown405 = 0x0FF00195,
+ Unknown406 = 0x0FF00196,
+ Unknown407 = 0x0FF00197,
+ Unknown408 = 0x0FF00198,
+ Unknown409 = 0x0FF00199,
+ Unknown410 = 0x0FF0019A,
+ Unknown411 = 0x0FF0019B,
+ Unknown412 = 0x0FF0019C,
+ Unknown413 = 0x0FF0019D,
+ Unknown414 = 0x0FF0019E,
+ Unknown415 = 0x0FF0019F,
+ Unknown416 = 0x0FF001A0,
+ Unknown417 = 0x0FF001A1,
+ Unknown418 = 0x0FF001A2,
+ Unknown419 = 0x0FF001A3,
+ Unknown420 = 0x0FF001A4,
+ Unknown421 = 0x0FF001A5,
+ Unknown422 = 0x0FF001A6,
+ Unknown423 = 0x0FF001A7,
+ Unknown424 = 0x0FF001A8,
+ Unknown425 = 0x0FF001A9,
+ Unknown426 = 0x0FF001AA,
+ Unknown427 = 0x0FF001AB,
+ Unknown428 = 0x0FF001AC,
+ Unknown429 = 0x0FF001AD,
+ Unknown430 = 0x0FF001AE,
+ Unknown431 = 0x0FF001AF,
+ Unknown432 = 0x0FF001B0,
+ Unknown433 = 0x0FF001B1,
+ Unknown434 = 0x0FF001B2,
+ Unknown435 = 0x0FF001B3,
+ Unknown436 = 0x0FF001B4,
+ Unknown437 = 0x0FF001B5,
+ Unknown438 = 0x0FF001B6,
+ Unknown439 = 0x0FF001B7,
+ Unknown440 = 0x0FF001B8,
+ Unknown441 = 0x0FF001B9,
+ Unknown442 = 0x0FF001BA,
+ Unknown443 = 0x0FF001BB,
+ Unknown444 = 0x0FF001BC,
+ Unknown445 = 0x0FF001BD,
+ Unknown446 = 0x0FF001BE,
+ Unknown447 = 0x0FF001BF,
+ Unknown448 = 0x0FF001C0,
+ Unknown449 = 0x0FF001C1,
+ Unknown450 = 0x0FF001C2,
+ Unknown451 = 0x0FF001C3,
+ Unknown452 = 0x0FF001C4,
+ Unknown453 = 0x0FF001C5,
+ Unknown454 = 0x0FF001C6,
+ Unknown455 = 0x0FF001C7,
+ Unknown456 = 0x0FF001C8,
+ Unknown457 = 0x0FF001C9,
+ Unknown458 = 0x0FF001CA,
+ Unknown459 = 0x0FF001CB,
+ Unknown460 = 0x0FF001CC,
+ Unknown461 = 0x0FF001CD,
+ Unknown462 = 0x0FF001CE,
+ Unknown463 = 0x0FF001CF,
+ Unknown464 = 0x0FF001D0,
+ Unknown465 = 0x0FF001D1,
+ Unknown466 = 0x0FF001D2,
+ Unknown467 = 0x0FF001D3,
+ Unknown468 = 0x0FF001D4,
+ Unknown469 = 0x0FF001D5,
+ Unknown470 = 0x0FF001D6,
+ Unknown471 = 0x0FF001D7,
+ Unknown472 = 0x0FF001D8,
+ Unknown473 = 0x0FF001D9,
+ Unknown474 = 0x0FF001DA,
+ Unknown475 = 0x0FF001DB,
+ Unknown476 = 0x0FF001DC,
+ Unknown477 = 0x0FF001DD,
+ Unknown478 = 0x0FF001DE,
+ Unknown479 = 0x0FF001DF,
+ Unknown480 = 0x0FF001E0,
+ Unknown481 = 0x0FF001E1,
+ Unknown482 = 0x0FF001E2,
+ Unknown483 = 0x0FF001E3,
+ Unknown484 = 0x0FF001E4,
+ Unknown485 = 0x0FF001E5,
+ Unknown486 = 0x0FF001E6,
+ Unknown487 = 0x0FF001E7,
+ Unknown488 = 0x0FF001E8,
+ Unknown489 = 0x0FF001E9,
+ Unknown490 = 0x0FF001EA,
+ Unknown491 = 0x0FF001EB,
+ Unknown492 = 0x0FF001EC,
+ Unknown493 = 0x0FF001ED,
+ Unknown494 = 0x0FF001EE,
+ Unknown495 = 0x0FF001EF,
+ Unknown496 = 0x0FF001F0,
+ Unknown497 = 0x0FF001F1,
+ Unknown498 = 0x0FF001F2,
+ Unknown499 = 0x0FF001F3,
+ Unknown500 = 0x0FF001F4,
+ Unknown501 = 0x0FF001F5,
+ Unknown502 = 0x0FF001F6,
+ Unknown503 = 0x0FF001F7,
+ Unknown504 = 0x0FF001F8,
+ Unknown505 = 0x0FF001F9,
+ Unknown506 = 0x0FF001FA,
+ Unknown507 = 0x0FF001FB,
+ Unknown508 = 0x0FF001FC,
+ Unknown509 = 0x0FF001FD,
+ Unknown510 = 0x0FF001FE,
+ Unknown511 = 0x0FF001FF,
+ Unknown512 = 0x0FF00200,
+ Unknown513 = 0x0FF00201,
+ Unknown514 = 0x0FF00202,
+ Unknown515 = 0x0FF00203,
+ Unknown516 = 0x0FF00204,
+ Unknown517 = 0x0FF00205,
+ Unknown518 = 0x0FF00206,
+ Unknown519 = 0x0FF00207,
+ Unknown520 = 0x0FF00208,
+ Unknown521 = 0x0FF00209,
+ Unknown522 = 0x0FF0020A,
+ Unknown523 = 0x0FF0020B,
+ Unknown524 = 0x0FF0020C,
+ Unknown525 = 0x0FF0020D,
+ Unknown526 = 0x0FF0020E,
+ Unknown527 = 0x0FF0020F,
+ Unknown528 = 0x0FF00210,
+ Unknown529 = 0x0FF00211,
+ Unknown530 = 0x0FF00212,
+ Unknown531 = 0x0FF00213,
+ Unknown532 = 0x0FF00214,
+ Unknown533 = 0x0FF00215,
+ Unknown534 = 0x0FF00216,
+ Unknown535 = 0x0FF00217,
+ Unknown536 = 0x0FF00218,
+ Unknown537 = 0x0FF00219,
+ Unknown538 = 0x0FF0021A,
+ Unknown539 = 0x0FF0021B,
+ Unknown540 = 0x0FF0021C,
+ Unknown541 = 0x0FF0021D,
+ Unknown542 = 0x0FF0021E,
+ Unknown543 = 0x0FF0021F,
+ Unknown544 = 0x0FF00220,
+ Unknown545 = 0x0FF00221,
+ Unknown546 = 0x0FF00222,
+ Unknown547 = 0x0FF00223,
+ Unknown548 = 0x0FF00224,
+ Unknown549 = 0x0FF00225,
+ Unknown550 = 0x0FF00226,
+ Unknown551 = 0x0FF00227,
+ Unknown552 = 0x0FF00228,
+ Unknown553 = 0x0FF00229,
+ Unknown554 = 0x0FF0022A,
+ Unknown555 = 0x0FF0022B,
+ Unknown556 = 0x0FF0022C,
+ Unknown557 = 0x0FF0022D,
+ Unknown558 = 0x0FF0022E,
+ Unknown559 = 0x0FF0022F,
+ Unknown560 = 0x0FF00230,
+ Unknown561 = 0x0FF00231,
+ Unknown562 = 0x0FF00232,
+ Unknown563 = 0x0FF00233,
+ Unknown564 = 0x0FF00234,
+ Unknown565 = 0x0FF00235,
+ Unknown566 = 0x0FF00236,
+ Unknown567 = 0x0FF00237,
+ Unknown568 = 0x0FF00238,
+ Unknown569 = 0x0FF00239,
+ Unknown570 = 0x0FF0023A,
+ Unknown571 = 0x0FF0023B,
+ Unknown572 = 0x0FF0023C,
+ Unknown573 = 0x0FF0023D,
+ Unknown574 = 0x0FF0023E,
+ Unknown575 = 0x0FF0023F,
+ Unknown576 = 0x0FF00240,
+ Unknown577 = 0x0FF00241,
+ Unknown578 = 0x0FF00242,
+ Unknown579 = 0x0FF00243,
+ Unknown580 = 0x0FF00244,
+ Unknown581 = 0x0FF00245,
+ Unknown582 = 0x0FF00246,
+ Unknown583 = 0x0FF00247,
+ Unknown584 = 0x0FF00248,
+ Unknown585 = 0x0FF00249,
+ Unknown586 = 0x0FF0024A,
+ Unknown587 = 0x0FF0024B,
+ Unknown588 = 0x0FF0024C,
+ Unknown589 = 0x0FF0024D,
+ Unknown590 = 0x0FF0024E,
+ Unknown591 = 0x0FF0024F,
+ Unknown592 = 0x0FF00250,
+ Unknown593 = 0x0FF00251,
+ Unknown594 = 0x0FF00252,
+ Unknown595 = 0x0FF00253,
+ Unknown596 = 0x0FF00254,
+ Unknown597 = 0x0FF00255,
+ Unknown598 = 0x0FF00256,
+ Unknown599 = 0x0FF00257,
+ Unknown600 = 0x0FF00258,
+ Unknown601 = 0x0FF00259,
+ Unknown602 = 0x0FF0025A,
+ Unknown603 = 0x0FF0025B,
+ Unknown604 = 0x0FF0025C,
+ Unknown605 = 0x0FF0025D,
+ Unknown606 = 0x0FF0025E,
+ Unknown607 = 0x0FF0025F,
+ Unknown608 = 0x0FF00260,
+ Unknown609 = 0x0FF00261,
+ Unknown610 = 0x0FF00262,
+ Unknown611 = 0x0FF00263,
+ Unknown612 = 0x0FF00264,
+ Unknown613 = 0x0FF00265,
+ Unknown614 = 0x0FF00266,
+ Unknown615 = 0x0FF00267,
+ Unknown616 = 0x0FF00268,
+ Unknown617 = 0x0FF00269,
+ Unknown618 = 0x0FF0026A,
+ Unknown619 = 0x0FF0026B,
+ Unknown620 = 0x0FF0026C,
+ Unknown621 = 0x0FF0026D,
+ Unknown622 = 0x0FF0026E,
+ Unknown623 = 0x0FF0026F,
+ Unknown624 = 0x0FF00270,
+ Unknown625 = 0x0FF00271,
+ Unknown626 = 0x0FF00272,
+ Unknown627 = 0x0FF00273,
+ Unknown628 = 0x0FF00274,
+ Unknown629 = 0x0FF00275,
+ Unknown630 = 0x0FF00276,
+ Unknown631 = 0x0FF00277,
+ Unknown632 = 0x0FF00278,
+ Unknown633 = 0x0FF00279,
+ Unknown634 = 0x0FF0027A,
+ Unknown635 = 0x0FF0027B,
+ Unknown636 = 0x0FF0027C,
+ Unknown637 = 0x0FF0027D,
+ Unknown638 = 0x0FF0027E,
+ Unknown639 = 0x0FF0027F,
+ Unknown640 = 0x0FF00280,
+ Unknown641 = 0x0FF00281,
+ Unknown642 = 0x0FF00282,
+ Unknown643 = 0x0FF00283,
+ Unknown644 = 0x0FF00284,
+ Unknown645 = 0x0FF00285,
+ Unknown646 = 0x0FF00286,
+ Unknown647 = 0x0FF00287,
+ Unknown648 = 0x0FF00288,
+ Unknown649 = 0x0FF00289,
+ Unknown650 = 0x0FF0028A,
+ Unknown651 = 0x0FF0028B,
+ Unknown652 = 0x0FF0028C,
+ Unknown653 = 0x0FF0028D,
+ Unknown654 = 0x0FF0028E,
+ Unknown655 = 0x0FF0028F,
+ Unknown656 = 0x0FF00290,
+ Unknown657 = 0x0FF00291,
+ Unknown658 = 0x0FF00292,
+ Unknown659 = 0x0FF00293,
+ Unknown660 = 0x0FF00294,
+ Unknown661 = 0x0FF00295,
+ Unknown662 = 0x0FF00296,
+ Unknown663 = 0x0FF00297,
+ Unknown664 = 0x0FF00298,
+ Unknown665 = 0x0FF00299,
+ Unknown666 = 0x0FF0029A,
+ Unknown667 = 0x0FF0029B,
+ Unknown668 = 0x0FF0029C,
+ Unknown669 = 0x0FF0029D,
+ Unknown670 = 0x0FF0029E,
+ Unknown671 = 0x0FF0029F,
+ Unknown672 = 0x0FF002A0,
+ Unknown673 = 0x0FF002A1,
+ Unknown674 = 0x0FF002A2,
+ Unknown675 = 0x0FF002A3,
+ Unknown676 = 0x0FF002A4,
+ Unknown677 = 0x0FF002A5,
+ Unknown678 = 0x0FF002A6,
+ Unknown679 = 0x0FF002A7,
+ Unknown680 = 0x0FF002A8,
+ Unknown681 = 0x0FF002A9,
+ Unknown682 = 0x0FF002AA,
+ Unknown683 = 0x0FF002AB,
+ Unknown684 = 0x0FF002AC,
+ Unknown685 = 0x0FF002AD,
+ Unknown686 = 0x0FF002AE,
+ Unknown687 = 0x0FF002AF,
+ Unknown688 = 0x0FF002B0,
+ Unknown689 = 0x0FF002B1,
+ Unknown690 = 0x0FF002B2,
+ Unknown691 = 0x0FF002B3,
+ Unknown692 = 0x0FF002B4,
+ Unknown693 = 0x0FF002B5,
+ Unknown694 = 0x0FF002B6,
+ Unknown695 = 0x0FF002B7,
+ Unknown696 = 0x0FF002B8,
+ Unknown697 = 0x0FF002B9,
+ Unknown698 = 0x0FF002BA,
+ Unknown699 = 0x0FF002BB,
+ Unknown700 = 0x0FF002BC,
+ Unknown701 = 0x0FF002BD,
+ Unknown702 = 0x0FF002BE,
+ Unknown703 = 0x0FF002BF,
+ Unknown704 = 0x0FF002C0,
+ Unknown705 = 0x0FF002C1,
+ Unknown706 = 0x0FF002C2,
+ Unknown707 = 0x0FF002C3,
+ Unknown708 = 0x0FF002C4,
+ Unknown709 = 0x0FF002C5,
+ Unknown710 = 0x0FF002C6,
+ Unknown711 = 0x0FF002C7,
+ Unknown712 = 0x0FF002C8,
+ Unknown713 = 0x0FF002C9,
+ Unknown714 = 0x0FF002CA,
+ Unknown715 = 0x0FF002CB,
+ Unknown716 = 0x0FF002CC,
+ Unknown717 = 0x0FF002CD,
+ Unknown718 = 0x0FF002CE,
+ Unknown719 = 0x0FF002CF,
+ Unknown720 = 0x0FF002D0,
+ Unknown721 = 0x0FF002D1,
+ Unknown722 = 0x0FF002D2,
+ Unknown723 = 0x0FF002D3,
+ Unknown724 = 0x0FF002D4,
+ Unknown725 = 0x0FF002D5,
+ Unknown726 = 0x0FF002D6,
+ Unknown727 = 0x0FF002D7,
+ Unknown728 = 0x0FF002D8,
+ Unknown729 = 0x0FF002D9,
+ Unknown730 = 0x0FF002DA,
+ Unknown731 = 0x0FF002DB,
+ Unknown732 = 0x0FF002DC,
+ Unknown733 = 0x0FF002DD,
+ Unknown734 = 0x0FF002DE,
+ Unknown735 = 0x0FF002DF,
+ Unknown736 = 0x0FF002E0,
+ Unknown737 = 0x0FF002E1,
+ Unknown738 = 0x0FF002E2,
+ Unknown739 = 0x0FF002E3,
+ Unknown740 = 0x0FF002E4,
+ Unknown741 = 0x0FF002E5,
+ Unknown742 = 0x0FF002E6,
+ Unknown743 = 0x0FF002E7,
+ Unknown744 = 0x0FF002E8,
+ Unknown745 = 0x0FF002E9,
+ Unknown746 = 0x0FF002EA,
+ Unknown747 = 0x0FF002EB,
+ Unknown748 = 0x0FF002EC,
+ Unknown749 = 0x0FF002ED,
+ Unknown750 = 0x0FF002EE,
+ Unknown751 = 0x0FF002EF,
+ Unknown752 = 0x0FF002F0,
+ Unknown753 = 0x0FF002F1,
+ Unknown754 = 0x0FF002F2,
+ Unknown755 = 0x0FF002F3,
+ Unknown756 = 0x0FF002F4,
+ Unknown757 = 0x0FF002F5,
+ Unknown758 = 0x0FF002F6,
+ Unknown759 = 0x0FF002F7,
+ Unknown760 = 0x0FF002F8,
+ Unknown761 = 0x0FF002F9,
+ Unknown762 = 0x0FF002FA,
+ Unknown763 = 0x0FF002FB,
+ Unknown764 = 0x0FF002FC,
+ Unknown765 = 0x0FF002FD,
+ Unknown766 = 0x0FF002FE,
+ Unknown767 = 0x0FF002FF,
+ Unknown768 = 0x0FF00300,
+ Unknown769 = 0x0FF00301,
+ Unknown770 = 0x0FF00302,
+ Unknown771 = 0x0FF00303,
+ Unknown772 = 0x0FF00304,
+ Unknown773 = 0x0FF00305,
+ Unknown774 = 0x0FF00306,
+ Unknown775 = 0x0FF00307,
+ Unknown776 = 0x0FF00308,
+ Unknown777 = 0x0FF00309,
+ Unknown778 = 0x0FF0030A,
+ Unknown779 = 0x0FF0030B,
+ Unknown780 = 0x0FF0030C,
+ Unknown781 = 0x0FF0030D,
+ Unknown782 = 0x0FF0030E,
+ Unknown783 = 0x0FF0030F,
+ Unknown784 = 0x0FF00310,
+ Unknown785 = 0x0FF00311,
+ Unknown786 = 0x0FF00312,
+ Unknown787 = 0x0FF00313,
+ Unknown788 = 0x0FF00314,
+ Unknown789 = 0x0FF00315,
+ Unknown790 = 0x0FF00316,
+ Unknown791 = 0x0FF00317,
+ Unknown792 = 0x0FF00318,
+ Unknown793 = 0x0FF00319,
+ Unknown794 = 0x0FF0031A,
+ Unknown795 = 0x0FF0031B,
+ Unknown796 = 0x0FF0031C,
+ Unknown797 = 0x0FF0031D,
+ Unknown798 = 0x0FF0031E,
+ Unknown799 = 0x0FF0031F,
+ Unknown800 = 0x0FF00320,
+ Unknown801 = 0x0FF00321,
+ Unknown802 = 0x0FF00322,
+ Unknown803 = 0x0FF00323,
+ Unknown804 = 0x0FF00324,
+ Unknown805 = 0x0FF00325,
+ Unknown806 = 0x0FF00326,
+ Unknown807 = 0x0FF00327,
+ Unknown808 = 0x0FF00328,
+ Unknown809 = 0x0FF00329,
+ Unknown810 = 0x0FF0032A,
+ Unknown811 = 0x0FF0032B,
+ Unknown812 = 0x0FF0032C,
+ Unknown813 = 0x0FF0032D,
+ Unknown814 = 0x0FF0032E,
+ Unknown815 = 0x0FF0032F,
+ Unknown816 = 0x0FF00330,
+ Unknown817 = 0x0FF00331,
+ Unknown818 = 0x0FF00332,
+ Unknown819 = 0x0FF00333,
+ Unknown820 = 0x0FF00334,
+ Unknown821 = 0x0FF00335,
+ Unknown822 = 0x0FF00336,
+ Unknown823 = 0x0FF00337,
+ Unknown824 = 0x0FF00338,
+ Unknown825 = 0x0FF00339,
+ Unknown826 = 0x0FF0033A,
+ Unknown827 = 0x0FF0033B,
+ Unknown828 = 0x0FF0033C,
+ Unknown829 = 0x0FF0033D,
+ Unknown830 = 0x0FF0033E,
+ Unknown831 = 0x0FF0033F,
+ Unknown832 = 0x0FF00340,
+ Unknown833 = 0x0FF00341,
+ Unknown834 = 0x0FF00342,
+ Unknown835 = 0x0FF00343,
+ Unknown836 = 0x0FF00344,
+ Unknown837 = 0x0FF00345,
+ Unknown838 = 0x0FF00346,
+ Unknown839 = 0x0FF00347,
+ Unknown840 = 0x0FF00348,
+ Unknown841 = 0x0FF00349,
+ Unknown842 = 0x0FF0034A,
+ Unknown843 = 0x0FF0034B,
+ Unknown844 = 0x0FF0034C,
+ Unknown845 = 0x0FF0034D,
+ Unknown846 = 0x0FF0034E,
+ Unknown847 = 0x0FF0034F,
+ Unknown848 = 0x0FF00350,
+ Unknown849 = 0x0FF00351,
+ Unknown850 = 0x0FF00352,
+ Unknown851 = 0x0FF00353,
+ Unknown852 = 0x0FF00354,
+ Unknown853 = 0x0FF00355,
+ Unknown854 = 0x0FF00356,
+ Unknown855 = 0x0FF00357,
+ Unknown856 = 0x0FF00358,
+ Unknown857 = 0x0FF00359,
+ Unknown858 = 0x0FF0035A,
+ Unknown859 = 0x0FF0035B,
+ Unknown860 = 0x0FF0035C,
+ Unknown861 = 0x0FF0035D,
+ Unknown862 = 0x0FF0035E,
+ Unknown863 = 0x0FF0035F,
+ Unknown864 = 0x0FF00360,
+ Unknown865 = 0x0FF00361,
+ Unknown866 = 0x0FF00362,
+ Unknown867 = 0x0FF00363,
+ Unknown868 = 0x0FF00364,
+ Unknown869 = 0x0FF00365,
+ Unknown870 = 0x0FF00366,
+ Unknown871 = 0x0FF00367,
+ Unknown872 = 0x0FF00368,
+ Unknown873 = 0x0FF00369,
+ Unknown874 = 0x0FF0036A,
+ Unknown875 = 0x0FF0036B,
+ Unknown876 = 0x0FF0036C,
+ Unknown877 = 0x0FF0036D,
+ Unknown878 = 0x0FF0036E,
+ Unknown879 = 0x0FF0036F,
+ Unknown880 = 0x0FF00370,
+ Unknown881 = 0x0FF00371,
+ Unknown882 = 0x0FF00372,
+ Unknown883 = 0x0FF00373,
+ Unknown884 = 0x0FF00374,
+ Unknown885 = 0x0FF00375,
+ Unknown886 = 0x0FF00376,
+ Unknown887 = 0x0FF00377,
+ Unknown888 = 0x0FF00378,
+ Unknown889 = 0x0FF00379,
+ Unknown890 = 0x0FF0037A,
+ Unknown891 = 0x0FF0037B,
+ Unknown892 = 0x0FF0037C,
+ Unknown893 = 0x0FF0037D,
+ Unknown894 = 0x0FF0037E,
+ Unknown895 = 0x0FF0037F,
+ Unknown896 = 0x0FF00380,
+ Unknown897 = 0x0FF00381,
+ Unknown898 = 0x0FF00382,
+ Unknown899 = 0x0FF00383,
+ Unknown900 = 0x0FF00384,
+ Unknown901 = 0x0FF00385,
+ Unknown902 = 0x0FF00386,
+ Unknown903 = 0x0FF00387,
+ Unknown904 = 0x0FF00388,
+ Unknown905 = 0x0FF00389,
+ Unknown906 = 0x0FF0038A,
+ Unknown907 = 0x0FF0038B,
+ Unknown908 = 0x0FF0038C,
+ Unknown909 = 0x0FF0038D,
+ Unknown910 = 0x0FF0038E,
+ Unknown911 = 0x0FF0038F,
+ Unknown912 = 0x0FF00390,
+ Unknown913 = 0x0FF00391,
+ Unknown914 = 0x0FF00392,
+ Unknown915 = 0x0FF00393,
+ Unknown916 = 0x0FF00394,
+ Unknown917 = 0x0FF00395,
+ Unknown918 = 0x0FF00396,
+ Unknown919 = 0x0FF00397,
+ Unknown920 = 0x0FF00398,
+ Unknown921 = 0x0FF00399,
+ Unknown922 = 0x0FF0039A,
+ Unknown923 = 0x0FF0039B,
+ Unknown924 = 0x0FF0039C,
+ Unknown925 = 0x0FF0039D,
+ Unknown926 = 0x0FF0039E,
+ Unknown927 = 0x0FF0039F,
+ Unknown928 = 0x0FF003A0,
+ Unknown929 = 0x0FF003A1,
+ Unknown930 = 0x0FF003A2,
+ Unknown931 = 0x0FF003A3,
+ Unknown932 = 0x0FF003A4,
+ Unknown933 = 0x0FF003A5,
+ Unknown934 = 0x0FF003A6,
+ Unknown935 = 0x0FF003A7,
+ Unknown936 = 0x0FF003A8,
+ Unknown937 = 0x0FF003A9,
+ Unknown938 = 0x0FF003AA,
+ Unknown939 = 0x0FF003AB,
+ Unknown940 = 0x0FF003AC,
+ Unknown941 = 0x0FF003AD,
+ Unknown942 = 0x0FF003AE,
+ Unknown943 = 0x0FF003AF,
+ Unknown944 = 0x0FF003B0,
+ Unknown945 = 0x0FF003B1,
+ Unknown946 = 0x0FF003B2,
+ Unknown947 = 0x0FF003B3,
+ Unknown948 = 0x0FF003B4,
+ Unknown949 = 0x0FF003B5,
+ Unknown950 = 0x0FF003B6,
+ Unknown951 = 0x0FF003B7,
+ Unknown952 = 0x0FF003B8,
+ Unknown953 = 0x0FF003B9,
+ Unknown954 = 0x0FF003BA,
+ Unknown955 = 0x0FF003BB,
+ Unknown956 = 0x0FF003BC,
+ Unknown957 = 0x0FF003BD,
+ Unknown958 = 0x0FF003BE,
+ Unknown959 = 0x0FF003BF,
+ Unknown960 = 0x0FF003C0,
+ Unknown961 = 0x0FF003C1,
+ Unknown962 = 0x0FF003C2,
+ Unknown963 = 0x0FF003C3,
+ Unknown964 = 0x0FF003C4,
+ Unknown965 = 0x0FF003C5,
+ Unknown966 = 0x0FF003C6,
+ Unknown967 = 0x0FF003C7,
+ Unknown968 = 0x0FF003C8,
+ Unknown969 = 0x0FF003C9,
+ Unknown970 = 0x0FF003CA,
+ Unknown971 = 0x0FF003CB,
+ Unknown972 = 0x0FF003CC,
+ Unknown973 = 0x0FF003CD,
+ Unknown974 = 0x0FF003CE,
+ Unknown975 = 0x0FF003CF,
+ Unknown976 = 0x0FF003D0,
+ Unknown977 = 0x0FF003D1,
+ Unknown978 = 0x0FF003D2,
+ Unknown979 = 0x0FF003D3,
+ Unknown980 = 0x0FF003D4,
+ Unknown981 = 0x0FF003D5,
+ Unknown982 = 0x0FF003D6,
+ Unknown983 = 0x0FF003D7,
+ Unknown984 = 0x0FF003D8,
+ Unknown985 = 0x0FF003D9,
+ Unknown986 = 0x0FF003DA,
+ Unknown987 = 0x0FF003DB,
+ Unknown988 = 0x0FF003DC,
+ Unknown989 = 0x0FF003DD,
+ Unknown990 = 0x0FF003DE,
+ Unknown991 = 0x0FF003DF,
+ Unknown992 = 0x0FF003E0,
+ Unknown993 = 0x0FF003E1,
+ Unknown994 = 0x0FF003E2,
+ Unknown995 = 0x0FF003E3,
+ Unknown996 = 0x0FF003E4,
+ Unknown997 = 0x0FF003E5,
+ Unknown998 = 0x0FF003E6,
+ Unknown999 = 0x0FF003E7,
+ Unknown1000 = 0x0FF003E8,
+ Unknown1001 = 0x0FF003E9,
+ Unknown1002 = 0x0FF003EA,
+ Unknown1003 = 0x0FF003EB,
+ Unknown1004 = 0x0FF003EC,
+ Unknown1005 = 0x0FF003ED,
+ Unknown1006 = 0x0FF003EE,
+ Unknown1007 = 0x0FF003EF,
+ Unknown1008 = 0x0FF003F0,
+ Unknown1009 = 0x0FF003F1,
+ Unknown1010 = 0x0FF003F2,
+ Unknown1011 = 0x0FF003F3,
+ Unknown1012 = 0x0FF003F4,
+ Unknown1013 = 0x0FF003F5,
+ Unknown1014 = 0x0FF003F6,
+ Unknown1015 = 0x0FF003F7,
+ Unknown1016 = 0x0FF003F8,
+ Unknown1017 = 0x0FF003F9,
+ Unknown1018 = 0x0FF003FA,
+ Unknown1019 = 0x0FF003FB,
+ Unknown1020 = 0x0FF003FC,
+ Unknown1021 = 0x0FF003FD,
+ Unknown1022 = 0x0FF003FE,
+ Unknown1023 = 0x0FF003FF,
+ Unknown1024 = 0x0FF00400,
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Leds/LedMapping.cs b/RGB.NET.Core/Leds/LedMapping.cs
new file mode 100644
index 00000000..e2866d39
--- /dev/null
+++ b/RGB.NET.Core/Leds/LedMapping.cs
@@ -0,0 +1,148 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace RGB.NET.Core;
+
+///
+/// Represents a mapping from to a custom identifier.
+///
+/// The identifier the is mapped to.
+public class LedMapping : IEnumerable<(LedId ledId, T mapping)>
+ where T : notnull
+{
+ #region Properties & Fields
+
+ private readonly Dictionary _mapping = new();
+ private readonly Dictionary _reverseMapping = new();
+
+ ///
+ /// Gets the number of entries in this mapping.
+ ///
+ public int Count => _mapping.Count;
+
+ ///
+ /// Gets a collection of all mapped ledids.
+ ///
+ public ICollection LedIds => _mapping.Keys;
+
+ ///
+ /// Gets a collection of all mapped custom identifiers.
+ ///
+ public ICollection Mappings => _reverseMapping.Keys;
+
+ #endregion
+
+ #region Indexer
+
+ ///
+ /// Gets the custom identifier mapped to the specified .
+ ///
+ /// The led id to get the mapped identifier.
+ /// The mapped ifentifier.
+ public T this[LedId ledId]
+ {
+ get => _mapping[ledId];
+ set
+ {
+ _mapping[ledId] = value;
+ _reverseMapping[value] = ledId;
+ }
+ }
+
+ ///
+ /// Gets the mapped to the specified custom identifier.
+ ///
+ /// The custom identifier to get the mapped led id.
+ /// The led id.
+ public LedId this[T mapping]
+ {
+ get => _reverseMapping[mapping];
+ set => this[value] = mapping;
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Adds a new entry to the mapping.
+ ///
+ /// The to map.
+ /// The custom identifier to map.
+ public void Add(LedId ledId, T mapping)
+ {
+ _mapping.Add(ledId, mapping);
+ _reverseMapping.Add(mapping, ledId);
+ }
+
+ ///
+ /// Checks if the specified is mapped.
+ ///
+ /// The led id to check.
+ /// true if the led id is mapped; otherwise false.
+ public bool Contains(LedId ledId) => _mapping.ContainsKey(ledId);
+
+ ///
+ /// Checks if the specified custom identifier is mapped.
+ ///
+ /// The custom identifier to check.
+ /// true if the led id is mapped; otherwise false.
+ public bool Contains(T mapping) => _reverseMapping.ContainsKey(mapping);
+
+ ///
+ /// Gets the custom identifier mapped to the specified led id.
+ ///
+ /// The led id to get the custom identifier for.
+ /// Contains the mapped custom identifier or null if there is no mapping for the specified led id.
+ /// true if there was a custom identifier for the specified led id; otherwise false.
+ public bool TryGetValue(LedId ledId, out T? mapping) => _mapping.TryGetValue(ledId, out mapping);
+
+ ///
+ /// Gets the led id mapped to the specified custom identifier.
+ ///
+ /// The custom identifier to get the led id for.
+ /// Contains the mapped led id or null if there is no mapping for the specified led id.
+ /// true if there was a led id for the specified custom identifier; otherwise false.
+ public bool TryGetValue(T mapping, out LedId ledId) => _reverseMapping.TryGetValue(mapping, out ledId);
+
+ ///
+ /// Removes the specified led id and the mapped custom identifier.
+ ///
+ /// The led id to remove.
+ /// true if there was a mapping for the led id to remove; otherwise false.
+ public bool Remove(LedId ledId)
+ {
+ if (_mapping.TryGetValue(ledId, out T? mapping))
+ _reverseMapping.Remove(mapping);
+ return _mapping.Remove(ledId);
+ }
+
+ ///
+ /// Removes the specified custom identifier and the mapped led id.
+ ///
+ /// The custom identifier to remove.
+ /// true if there was a mapping for the custom identifier to remove; otherwise false.
+ public bool Remove(T mapping)
+ {
+ if (_reverseMapping.TryGetValue(mapping, out LedId ledId))
+ _mapping.Remove(ledId);
+ return _reverseMapping.Remove(mapping);
+ }
+
+ ///
+ /// Removes all registered mappings.
+ ///
+ public void Clear()
+ {
+ _mapping.Clear();
+ _reverseMapping.Clear();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+
+ ///
+ public IEnumerator<(LedId ledId, T mapping)> GetEnumerator() => _mapping.Select(x => (x.Key, x.Value)).GetEnumerator();
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/MVVM/AbstractBindable.cs b/RGB.NET.Core/MVVM/AbstractBindable.cs
index ab36978d..c58c1aed 100644
--- a/RGB.NET.Core/MVVM/AbstractBindable.cs
+++ b/RGB.NET.Core/MVVM/AbstractBindable.cs
@@ -1,67 +1,61 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents a basic bindable class which notifies when a property value changes.
+///
+public abstract class AbstractBindable : IBindable
{
- ///
+ #region Events
+
///
- /// Represents a basic bindable class which notifies when a property value changes.
+ /// Occurs when a property value changes.
///
- public abstract class AbstractBindable : IBindable
- {
- #region Events
-
- ///
- /// Occurs when a property value changes.
- ///
- public event PropertyChangedEventHandler PropertyChanged;
+ public event PropertyChangedEventHandler? PropertyChanged;
- #endregion
+ #endregion
- #region Methods
+ #region Methods
- ///
- /// Checks if the property already matches the desirec value or needs to be updated.
- ///
- /// Type of the property.
- /// Reference to the backing-filed.
- /// Value to apply.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- protected virtual bool RequiresUpdate(ref T storage, T value)
- {
- return !Equals(storage, value);
- }
+ ///
+ /// Checks if the property already matches the desired value or needs to be updated.
+ ///
+ /// Type of the property.
+ /// Reference to the backing-filed.
+ /// Value to apply.
+ /// true if the value needs to be updated; otherweise false.
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ protected virtual bool RequiresUpdate(ref T storage, T value) => !Equals(storage, value);
- ///
- /// Checks if the property already matches the desired value and updates it if not.
- ///
- /// Type of the property.
- /// Reference to the backing-filed.
- /// Value to apply.
- /// Name of the property used to notify listeners. This value is optional
- /// and can be provided automatically when invoked from compilers that support .
- /// true if the value was changed, false if the existing value matched the desired value.
- protected virtual bool SetProperty(ref T storage, T value, [CallerMemberName] string propertyName = null)
- {
- if (!this.RequiresUpdate(ref storage, value)) return false;
+ ///
+ /// Checks if the property already matches the desired value and updates it if not.
+ ///
+ /// Type of the property.
+ /// Reference to the backing-filed.
+ /// Value to apply.
+ /// Name of the property used to notify listeners. This value is optional
+ /// and can be provided automatically when invoked from compilers that support .
+ /// true if the value was changed, false if the existing value matched the desired value.
+ protected virtual bool SetProperty(ref T storage, T value, [CallerMemberName] string? propertyName = null)
+ {
+ if (!RequiresUpdate(ref storage, value)) return false;
- storage = value;
- // ReSharper disable once ExplicitCallerInfoArgument
- this.OnPropertyChanged(propertyName);
- return true;
- }
+ storage = value;
+ // ReSharper disable once ExplicitCallerInfoArgument
+ OnPropertyChanged(propertyName);
+ return true;
+ }
- ///
- /// Triggers the -event when a a property value has changed.
- ///
- /// Name of the property used to notify listeners. This value is optional
- /// and can be provided automatically when invoked from compilers that support .
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
+ ///
+ /// Triggers the -event when a a property value has changed.
+ ///
+ /// Name of the property used to notify listeners. This value is optional
+ /// and can be provided automatically when invoked from compilers that support .
+ protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null)
+ => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- #endregion
- }
-}
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/MVVM/IBindable.cs b/RGB.NET.Core/MVVM/IBindable.cs
index 4191eac3..34a861d5 100644
--- a/RGB.NET.Core/MVVM/IBindable.cs
+++ b/RGB.NET.Core/MVVM/IBindable.cs
@@ -1,11 +1,10 @@
using System.ComponentModel;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a basic bindable class which notifies when a property value changes.
+///
+public interface IBindable : INotifyPropertyChanged
{
- ///
- /// Represents a basic bindable class which notifies when a property value changes.
- ///
- public interface IBindable : INotifyPropertyChanged
- {
- }
-}
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Positioning/IPlaceable.cs b/RGB.NET.Core/Positioning/IPlaceable.cs
new file mode 100644
index 00000000..c53904fc
--- /dev/null
+++ b/RGB.NET.Core/Positioning/IPlaceable.cs
@@ -0,0 +1,92 @@
+// ReSharper disable EventNeverSubscribedTo.Global
+
+using System;
+
+namespace RGB.NET.Core;
+
+///
+/// Represents a generic placeable element.
+///
+public interface IPlaceable
+{
+ #region Properties & Fields
+
+ ///
+ /// Gets or sets the location of the .
+ ///
+ Point Location { get; set; }
+
+ ///
+ /// Gets the size of the .
+ ///
+ Size Size { get; set; }
+
+ ///
+ /// Gets or sets the scale of the .
+ ///
+ Scale Scale { get; set; }
+
+ ///
+ /// Gets or sets the rotation of the .
+ ///
+ Rotation Rotation { get; set; }
+
+ ///
+ /// Gets the actual location of the .
+ /// This includes the .
+ ///
+ Point ActualLocation { get; }
+
+ ///
+ /// Gets the actual of the .
+ /// This includes the .
+ ///
+ Size ActualSize { get; }
+
+ ///
+ /// Gets a rectangle containing the whole .
+ /// This includes , , and .
+ ///
+ Rectangle Boundary { get; }
+
+ #endregion
+
+ #region Events
+
+ ///
+ /// Occurs when the property was changed.
+ ///
+ event EventHandler LocationChanged;
+
+ ///
+ /// Occurs when the property was changed.
+ ///
+ event EventHandler SizeChanged;
+
+ ///
+ /// Occurs when the property was changed.
+ ///
+ event EventHandler ScaleChanged;
+
+ ///
+ /// Occurs when the property was changed.
+ ///
+ event EventHandler RotationChanged;
+
+ ///
+ /// Occurs when the property was changed.
+ ///
+ event EventHandler ActualLocationChanged;
+
+ ///
+ /// Occurs when the property was changed.
+ ///
+ event EventHandler ActualSizeChanged;
+
+ ///
+ /// Occurs when the property was changed.
+ ///
+ event EventHandler BoundaryChanged;
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Positioning/Placeable.cs b/RGB.NET.Core/Positioning/Placeable.cs
new file mode 100644
index 00000000..29ca5518
--- /dev/null
+++ b/RGB.NET.Core/Positioning/Placeable.cs
@@ -0,0 +1,261 @@
+using System;
+
+namespace RGB.NET.Core;
+
+///
+/// Represents a placeable element.
+///
+public class Placeable : AbstractBindable, IPlaceable
+{
+ #region Properties & Fields
+
+ ///
+ /// Gets the parent this placeable is placed in.
+ ///
+ protected IPlaceable? Parent { get; }
+
+ private Point _location = Point.Invalid;
+ ///
+ public Point Location
+ {
+ get => _location;
+ set
+ {
+ if (SetProperty(ref _location, value))
+ OnLocationChanged();
+ }
+ }
+
+ private Size _size = Size.Invalid;
+ ///
+ public Size Size
+ {
+ get => _size;
+ set
+ {
+ if (SetProperty(ref _size, value))
+ OnSizeChanged();
+ }
+ }
+
+ private Scale _scale = new(1);
+ ///
+ public Scale Scale
+ {
+ get => _scale;
+ set
+ {
+ if (SetProperty(ref _scale, value))
+ OnScaleChanged();
+ }
+ }
+
+ private Rotation _rotation = new(0);
+ ///
+ public Rotation Rotation
+ {
+ get => _rotation;
+ set
+ {
+ if (SetProperty(ref _rotation, value))
+ OnRotationChanged();
+ }
+ }
+
+ private Point _actualLocation = Point.Invalid;
+ ///
+ public Point ActualLocation
+ {
+ get => _actualLocation;
+ private set
+ {
+ if (SetProperty(ref _actualLocation, value))
+ OnActualLocationChanged();
+ }
+ }
+
+ private Size _actualSize = Size.Invalid;
+ ///
+ public Size ActualSize
+ {
+ get => _actualSize;
+ private set
+ {
+ if (SetProperty(ref _actualSize, value))
+ OnActualSizeChanged();
+ }
+ }
+
+ private Rectangle _boundary = new(Point.Invalid, Point.Invalid);
+ ///
+ public Rectangle Boundary
+ {
+ get => _boundary;
+ private set
+ {
+ if (SetProperty(ref _boundary, value))
+ OnBoundaryChanged();
+ }
+ }
+
+ #endregion
+
+ #region Events
+
+ ///
+ public event EventHandler? LocationChanged;
+
+ ///
+ public event EventHandler? SizeChanged;
+
+ ///
+ public event EventHandler? ScaleChanged;
+
+ ///
+ public event EventHandler? RotationChanged;
+
+ ///
+ public event EventHandler? ActualLocationChanged;
+
+ ///
+ public event EventHandler? ActualSizeChanged;
+
+ ///
+ public event EventHandler? BoundaryChanged;
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public Placeable() { }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The parent this placeable is placed in.
+ public Placeable(IPlaceable parent)
+ {
+ this.Parent = parent;
+
+ Parent.BoundaryChanged += (_, _) => UpdateActualPlaceableData();
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The location of this placeable.
+ /// The size of this placeable.
+ public Placeable(Point location, Size size)
+ {
+ this.Location = location;
+ this.Size = size;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The parent placeable this placeable is placed in.
+ /// The location of this placeable.
+ /// The size of this placeable.
+ public Placeable(IPlaceable parent, Point location, Size size)
+ {
+ this.Parent = parent;
+ this.Location = location;
+ this.Size = size;
+
+ Parent.BoundaryChanged += (_, _) => UpdateActualPlaceableData();
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Updates the , and based on the , and .
+ ///
+ protected virtual void UpdateActualPlaceableData()
+ {
+ if (Parent != null)
+ {
+ Size actualSize = Size * Parent.Scale;
+ Point actualLocation = (Location * Parent.Scale);
+ Rectangle boundary = new(actualLocation, actualSize);
+
+ if (Parent.Rotation.IsRotated)
+ {
+ Point parentCenter = new Rectangle(Parent.ActualSize).Center;
+ Point actualParentCenter = new Rectangle(Parent.Boundary.Size).Center;
+ Point centerOffset = new(actualParentCenter.X - parentCenter.X, actualParentCenter.Y - parentCenter.Y);
+
+ actualLocation = actualLocation.Rotate(Parent.Rotation, new Rectangle(Parent.ActualSize).Center) + centerOffset;
+ boundary = new Rectangle(boundary.Rotate(Parent.Rotation, new Rectangle(Parent.ActualSize).Center)).Translate(centerOffset);
+ }
+
+ ActualLocation = actualLocation;
+ ActualSize = actualSize;
+ Boundary = boundary;
+ }
+ else
+ {
+ ActualLocation = Location;
+ ActualSize = Size * Scale;
+ Boundary = new Rectangle(Location, new Rectangle(new Rectangle(Location, ActualSize).Rotate(Rotation)).Size);
+ }
+ }
+
+ ///
+ /// Called when the property was changed.
+ ///
+ protected virtual void OnLocationChanged()
+ {
+ LocationChanged?.Invoke(this, new EventArgs());
+ UpdateActualPlaceableData();
+ }
+
+ ///
+ /// Called when the property was changed.
+ ///
+ protected virtual void OnSizeChanged()
+ {
+ SizeChanged?.Invoke(this, new EventArgs());
+ UpdateActualPlaceableData();
+ }
+
+ ///
+ /// Called when the property was changed.
+ ///
+ protected virtual void OnScaleChanged()
+ {
+ ScaleChanged?.Invoke(this, new EventArgs());
+ UpdateActualPlaceableData();
+ }
+
+ ///
+ /// Called when the property was changed.
+ ///
+ protected virtual void OnRotationChanged()
+ {
+ RotationChanged?.Invoke(this, new EventArgs());
+ UpdateActualPlaceableData();
+ }
+
+ ///
+ /// Called when the property was changed.
+ ///
+ protected virtual void OnActualLocationChanged() => ActualLocationChanged?.Invoke(this, new EventArgs());
+
+ ///
+ /// Called when the property was changed.
+ ///
+ protected virtual void OnActualSizeChanged() => ActualSizeChanged?.Invoke(this, new EventArgs());
+
+ ///
+ /// Called when the property was changed.
+ ///
+ protected virtual void OnBoundaryChanged() => BoundaryChanged?.Invoke(this, new EventArgs());
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Positioning/Point.cs b/RGB.NET.Core/Positioning/Point.cs
index 95838634..e2f3d97c 100644
--- a/RGB.NET.Core/Positioning/Point.cs
+++ b/RGB.NET.Core/Positioning/Point.cs
@@ -1,162 +1,154 @@
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedMember.Global
+using System;
using System.Diagnostics;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a point consisting of a X- and a Y-position.
+///
+[DebuggerDisplay("[X: {X}, Y: {Y}]")]
+public readonly struct Point
{
+ #region Constants
+
+ private static readonly Point INVALID = new(float.NaN, float.NaN);
+ ///
+ /// Gets a [NaN,NaN]-Point.
+ ///
+ public static ref readonly Point Invalid => ref INVALID;
+
+ #endregion
+
+ #region Properties & Fields
+
+ ///
+ /// Gets the X-position of this .
+ ///
+ public float X { get; }
+
+ ///
+ /// Gets the Y-position of this .
+ ///
+ public float Y { get; }
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class using the provided values.
+ ///
+ /// The value used for the X-position.
+ /// The value used for the Y-position.
+ public Point(float x, float y)
+ {
+ this.X = x;
+ this.Y = y;
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Converts the - and -position of this to a human-readable string.
+ ///
+ /// A string that contains the and of this . For example "[X: 100, Y: 20]".
+ public override string ToString() => $"[X: {X}, Y: {Y}]";
+
+ ///
+ /// Tests whether the specified object is a and is equivalent to this .
+ ///
+ /// The object to test.
+ /// true if is a equivalent to this ; otherwise, false.
+ public override bool Equals(object? obj)
+ {
+ if (obj is not Point comparePoint) return false;
+
+ return ((float.IsNaN(X) && float.IsNaN(comparePoint.X)) || X.EqualsInTolerance(comparePoint.X))
+ && ((float.IsNaN(Y) && float.IsNaN(comparePoint.Y)) || Y.EqualsInTolerance(comparePoint.Y));
+ }
+
+ ///
+ /// Returns a hash code for this .
+ ///
+ /// An integer value that specifies the hash code for this .
+ public override int GetHashCode() => HashCode.Combine(X, Y);
+
+ #endregion
+
+ #region Operators
+
///
- /// Represents a point consisting of a X- and a Y-position.
+ /// Returns a value that indicates whether two specified are equal.
///
- [DebuggerDisplay("[X: {X}, Y: {Y}]")]
- public struct Point
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are equal; otherwise, false.
+ public static bool operator ==(in Point point1, in Point point2) => point1.Equals(point2);
+
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are not equal; otherwise, false.
+ public static bool operator !=(in Point point1, in Point point2) => !(point1 == point2);
+
+ ///
+ /// Returns a new representing the addition of the two provided .
+ ///
+ /// The first .
+ /// The second .
+ /// A new representing the addition of the two provided .
+ public static Point operator +(in Point point1, in Point point2) => new(point1.X + point2.X, point1.Y + point2.Y);
+
+ ///
+ /// Returns a new created from the provided and .
+ ///
+ /// The of the rectangle.
+ /// The of the rectangle.
+ /// The rectangle created from the provided and .
+ public static Rectangle operator +(in Point point, in Size size) => new(point, size);
+
+ ///
+ /// Returns a new representing the subtraction of the two provided .
+ ///
+ /// The first .
+ /// The second .
+ /// A new representing the subtraction of the two provided .
+ public static Point operator -(in Point point1, in Point point2) => new(point1.X - point2.X, point1.Y - point2.Y);
+
+ ///
+ /// Returns a new representing the multiplication of the two provided .
+ ///
+ /// The first .
+ /// The second .
+ /// A new representing the multiplication of the two provided .
+ public static Point operator *(in Point point1, in Point point2) => new(point1.X * point2.X, point1.Y * point2.Y);
+
+ ///
+ /// Returns a new representing the division of the two provided .
+ ///
+ /// The first .
+ /// The second .
+ /// A new representing the division of the two provided .
+ public static Point operator /(in Point point1, in Point point2)
{
- #region Constants
-
- ///
- /// Gets a [NaN,NaN]-Point.
- ///
- public static Point Invalid => new Point(double.NaN, double.NaN);
-
- #endregion
-
- #region Properties & Fields
-
- ///
- /// Gets the X-position of this .
- ///
- public double X { get; }
-
- ///
- /// Gets the Y-position of this .
- ///
- public double Y { get; }
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class using the provided values.
- ///
- /// The value used for the X-position.
- /// The value used for the Y-position.
- public Point(double x, double y)
- {
- this.X = x;
- this.Y = y;
- }
-
- #endregion
-
- #region Methods
-
- ///
- /// Converts the - and -position of this to a human-readable string.
- ///
- /// A string that contains the and of this . For example "[X: 100, Y: 20]".
- public override string ToString() => $"[X: {X}, Y: {Y}]";
-
- ///
- /// Tests whether the specified object is a and is equivalent to this .
- ///
- /// The object to test.
- /// true if is a equivalent to this ; otherwise, false.
- public override bool Equals(object obj)
- {
- if (!(obj is Point)) return false;
-
- Point comparePoint = (Point)obj;
- return ((double.IsNaN(X) && double.IsNaN(comparePoint.X)) || X.EqualsInTolerance(comparePoint.X))
- && ((double.IsNaN(Y) && double.IsNaN(comparePoint.Y)) || Y.EqualsInTolerance(comparePoint.Y));
- }
-
- ///
- /// Returns a hash code for this .
- ///
- /// An integer value that specifies the hash code for this .
- public override int GetHashCode()
- {
- unchecked
- {
- int hashCode = X.GetHashCode();
- hashCode = (hashCode * 397) ^ Y.GetHashCode();
- return hashCode;
- }
- }
-
- #endregion
-
- #region Operators
-
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are equal; otherwise, false.
- public static bool operator ==(Point point1, Point point2) => point1.Equals(point2);
-
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are not equal; otherwise, false.
- public static bool operator !=(Point point1, Point point2) => !(point1 == point2);
-
- ///
- /// Returns a new representing the addition of the two provided .
- ///
- /// The first .
- /// The second .
- /// A new representing the addition of the two provided .
- public static Point operator +(Point point1, Point point2) => new Point(point1.X + point2.X, point1.Y + point2.Y);
-
- ///
- /// Returns a new created from the provided and .
- ///
- /// The of the rectangle.
- /// The of the rectangle.
- /// The rectangle created from the provided and .
- public static Rectangle operator +(Point point, Size size) => new Rectangle(point, size);
-
- ///
- /// Returns a new representing the subtraction of the two provided .
- ///
- /// The first .
- /// The second .
- /// A new representing the subtraction of the two provided .
- public static Point operator -(Point point1, Point point2) => new Point(point1.X - point2.X, point1.Y - point2.Y);
-
- ///
- /// Returns a new representing the multiplication of the two provided .
- ///
- /// The first .
- /// The second .
- /// A new representing the multiplication of the two provided .
- public static Point operator *(Point point1, Point point2) => new Point(point1.X * point2.X, point1.Y * point2.Y);
-
- ///
- /// Returns a new representing the division of the two provided .
- ///
- /// The first .
- /// The second .
- /// A new representing the division of the two provided .
- public static Point operator /(Point point1, Point point2)
- {
- if (point2.X.EqualsInTolerance(0) || point2.Y.EqualsInTolerance(0)) return Invalid;
- return new Point(point1.X / point2.X, point1.Y / point2.Y);
- }
-
- ///
- /// Returns a new representing the multiplication of the and the provided .
- ///
- /// The .
- /// The .
- /// A new representing the multiplication of the and the provided .
- public static Point operator *(Point point, Scale scale) => new Point(point.X * scale.Horizontal, point.Y * scale.Vertical);
-
- #endregion
+ if (point2.X.EqualsInTolerance(0) || point2.Y.EqualsInTolerance(0)) return Invalid;
+ return new Point(point1.X / point2.X, point1.Y / point2.Y);
}
-}
+
+ ///
+ /// Returns a new representing the multiplication of the and the provided .
+ ///
+ /// The .
+ /// The .
+ /// A new representing the multiplication of the and the provided .
+ public static Point operator *(in Point point, in Scale scale) => new(point.X * scale.Horizontal, point.Y * scale.Vertical);
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Positioning/Rectangle.cs b/RGB.NET.Core/Positioning/Rectangle.cs
index d3b16185..a1789895 100644
--- a/RGB.NET.Core/Positioning/Rectangle.cs
+++ b/RGB.NET.Core/Positioning/Rectangle.cs
@@ -6,223 +6,236 @@
using System.Diagnostics;
using System.Linq;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a rectangle defined by it's position and it's size.
+///
+[DebuggerDisplay("[Location: {Location}, Size: {Size}]")]
+public readonly struct Rectangle
{
+ #region Properties & Fields
+
+ ///
+ /// Gets the representing the top-left corner of the .
+ ///
+ public Point Location { get; }
+
+ ///
+ /// Gets the of the .
+ ///
+ public Size Size { get; }
+
+ ///
+ /// Gets a new representing the center-point of the .
+ ///
+ public Point Center { get; }
+
///
- /// Represents a rectangle defined by it's position and it's size.
+ /// Gets a bool indicating if both, the width and the height of the rectangle is greater than zero.
+ /// True if the rectangle has a width or a height of zero; otherwise, false.
///
- [DebuggerDisplay("[Location: {Location}, Size: {Size}]")]
- public struct Rectangle
+ public bool IsEmpty => (Size.Width <= FloatExtensions.TOLERANCE) || (Size.Height <= FloatExtensions.TOLERANCE);
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ ///
+ /// Initializes a new instance of the class using the provided values for ans .
+ ///
+ /// The x-value of the of this .
+ /// The y-value of the -position of this .
+ /// The width of the of this .
+ /// The height of the of this .
+ public Rectangle(float x, float y, float width, float height)
+ : this(new Point(x, y), new Size(width, height))
+ { }
+
+ ///
+ /// Initializes a new instance of the class using the (0,0) and the specified .
+ ///
+ /// The size of of this .
+ public Rectangle(Size size) : this(new Point(), size)
+ { }
+
+ ///
+ /// Initializes a new instance of the class using the specified and .
+ ///
+ /// The location of this of this .
+ /// The size of of this .
+ public Rectangle(Point location, Size size)
{
- #region Properties & Fields
-
- ///
- /// Gets the representing the top-left corner of the .
- ///
- public Point Location { get; }
-
- ///
- /// Gets the of the .
- ///
- public Size Size { get; }
-
- ///
- /// Gets a new representing the center-point of the .
- ///
- public Point Center { get; }
-
- ///
- /// Gets a bool indicating if both, the width and the height of the rectangle is greater than zero.
- /// True if the rectangle has a width or a height of zero; otherwise, false.
- ///
- public bool IsEmpty => (Size.Width <= DoubleExtensions.TOLERANCE) || (Size.Height <= DoubleExtensions.TOLERANCE);
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- /// Initializes a new instance of the class using the provided values for ans .
- ///
- /// The x-value of the of this .
- /// The y-value of the -position of this .
- /// The width of the of this .
- /// The height of the of this .
- public Rectangle(double x, double y, double width, double height)
- : this(new Point(x, y), new Size(width, height))
- { }
-
- ///
- /// Initializes a new instance of the class using the (0,0) and the given .
- ///
- /// The size of of this .
- public Rectangle(Size size) : this(new Point(), size)
- { }
-
- ///
- /// Initializes a new instance of the class using the given and .
- ///
- /// The location of this of this .
- /// The size of of this .
- public Rectangle(Point location, Size size)
- {
- this.Location = location;
- this.Size = size;
- Center = new Point(Location.X + (Size.Width / 2.0), Location.Y + (Size.Height / 2.0));
- }
+ this.Location = location;
+ this.Size = size;
+
+ Center = new Point(Location.X + (Size.Width / 2.0f), Location.Y + (Size.Height / 2.0f));
+ }
- ///
- ///
- /// Initializes a new instance of the class using the given array of .
- /// The and is calculated to completely contain all rectangles provided as parameters.
- ///
- /// The array of used to calculate the and
- public Rectangle(params Rectangle[] rectangles)
- : this(rectangles.AsEnumerable())
- { }
-
- ///
- /// Initializes a new instance of the class using the given list of .
- /// The and is calculated to completely contain all rectangles provided as parameters.
- ///
- /// The list of used to calculate the and
- public Rectangle(IEnumerable rectangles)
+ ///
+ ///
+ /// Initializes a new instance of the class using the specified array of .
+ /// The and is calculated to completely contain all rectangles provided as parameters.
+ ///
+ /// The array of used to calculate the and .
+ public Rectangle(params Rectangle[] rectangles)
+ : this(rectangles.AsEnumerable())
+ { }
+
+ ///
+ /// Initializes a new instance of the class using the specified list of .
+ /// The and is calculated to completely contain all rectangles provided as parameters.
+ ///
+ /// The list of used to calculate the and .
+ public Rectangle(IEnumerable rectangles)
+ {
+ bool hasPoint = false;
+ float posX = float.MaxValue;
+ float posY = float.MaxValue;
+ float posX2 = float.MinValue;
+ float posY2 = float.MinValue;
+
+ foreach (Rectangle rectangle in rectangles)
{
- bool hasPoint = false;
- double posX = double.MaxValue;
- double posY = double.MaxValue;
- double posX2 = double.MinValue;
- double posY2 = double.MinValue;
-
- if (rectangles != null)
- foreach (Rectangle rectangle in rectangles)
- {
- hasPoint = true;
- posX = Math.Min(posX, rectangle.Location.X);
- posY = Math.Min(posY, rectangle.Location.Y);
- posX2 = Math.Max(posX2, rectangle.Location.X + rectangle.Size.Width);
- posY2 = Math.Max(posY2, rectangle.Location.Y + rectangle.Size.Height);
- }
-
- (Point location, Size size) = hasPoint ? InitializeFromPoints(new Point(posX, posY), new Point(posX2, posY2)) : InitializeFromPoints(new Point(0, 0), new Point(0, 0));
- Location = location;
- Size = size;
- Center = new Point(Location.X + (Size.Width / 2.0), Location.Y + (Size.Height / 2.0));
+ hasPoint = true;
+ posX = Math.Min(posX, rectangle.Location.X);
+ posY = Math.Min(posY, rectangle.Location.Y);
+ posX2 = Math.Max(posX2, rectangle.Location.X + rectangle.Size.Width);
+ posY2 = Math.Max(posY2, rectangle.Location.Y + rectangle.Size.Height);
}
- ///
- ///
- /// Initializes a new instance of the class using the given array of .
- /// The and is calculated to contain all points provided as parameters.
- ///
- /// The array of used to calculate the and
- public Rectangle(params Point[] points)
- : this(points.AsEnumerable())
- { }
-
- ///
- ///
- /// Initializes a new instance of the class using the given list of .
- /// The and is calculated to contain all points provided as parameters.
- ///
- /// The list of used to calculate the and
- public Rectangle(IEnumerable points)
- : this()
+ (Point location, Size size) = hasPoint ? InitializeFromPoints(new Point(posX, posY), new Point(posX2, posY2)) : InitializeFromPoints(new Point(0, 0), new Point(0, 0));
+ Location = location;
+ Size = size;
+ Center = new Point(Location.X + (Size.Width / 2.0f), Location.Y + (Size.Height / 2.0f));
+ }
+
+ ///
+ ///
+ /// Initializes a new instance of the class using the specified array of .
+ /// The and is calculated to contain all points provided as parameters.
+ ///
+ /// The array of used to calculate the and .
+ public Rectangle(params Point[] points)
+ : this(points.AsEnumerable())
+ { }
+
+ ///
+ ///
+ /// Initializes a new instance of the class using the specified list of .
+ /// The and is calculated to contain all points provided as parameters.
+ ///
+ /// The list of used to calculate the and .
+ public Rectangle(IEnumerable points)
+ : this()
+ {
+ bool hasPoint = false;
+ float posX = float.MaxValue;
+ float posY = float.MaxValue;
+ float posX2 = float.MinValue;
+ float posY2 = float.MinValue;
+
+ foreach (Point point in points)
{
- bool hasPoint = false;
- double posX = double.MaxValue;
- double posY = double.MaxValue;
- double posX2 = double.MinValue;
- double posY2 = double.MinValue;
-
- if (points != null)
- foreach (Point point in points)
- {
- hasPoint = true;
- posX = Math.Min(posX, point.X);
- posY = Math.Min(posY, point.Y);
- posX2 = Math.Max(posX2, point.X);
- posY2 = Math.Max(posY2, point.Y);
- }
-
- (Point location, Size size) = hasPoint ? InitializeFromPoints(new Point(posX, posY), new Point(posX2, posY2)) : InitializeFromPoints(new Point(0, 0), new Point(0, 0));
-
- Location = location;
- Size = size;
- Center = new Point(Location.X + (Size.Width / 2.0), Location.Y + (Size.Height / 2.0));
+ hasPoint = true;
+ posX = Math.Min(posX, point.X);
+ posY = Math.Min(posY, point.Y);
+ posX2 = Math.Max(posX2, point.X);
+ posY2 = Math.Max(posY2, point.Y);
}
- #endregion
+ (Point location, Size size) = hasPoint ? InitializeFromPoints(new Point(posX, posY), new Point(posX2, posY2)) : InitializeFromPoints(new Point(0, 0), new Point(0, 0));
- #region Methods
+ Location = location;
+ Size = size;
+ Center = new Point(Location.X + (Size.Width / 2.0f), Location.Y + (Size.Height / 2.0f));
+ }
- private static (Point location, Size size) InitializeFromPoints(Point point1, Point point2)
- {
- double posX = Math.Min(point1.X, point2.X);
- double posY = Math.Min(point1.Y, point2.Y);
- double width = Math.Max(point1.X, point2.X) - posX;
- double height = Math.Max(point1.Y, point2.Y) - posY;
+ #endregion
- return (new Point(posX, posY), new Size(width, height));
- }
+ #region Methods
- ///
- /// Converts the - and -position of this to a human-readable string.
- ///
- /// A string that contains the and of this . For example "[Location: [X: 100, Y: 10], Size: [Width: 20, Height: [40]]".
- public override string ToString() => $"[Location: {Location}, Size: {Size}]";
-
- ///
- /// Tests whether the specified object is a and is equivalent to this .
- ///
- /// The object to test.
- /// true if is a equivalent to this ; otherwise, false.
- public override bool Equals(object obj)
- {
- if (!(obj is Rectangle compareRect))
- return false;
+ private static (Point location, Size size) InitializeFromPoints(in Point point1, in Point point2)
+ {
+ float posX = Math.Min(point1.X, point2.X);
+ float posY = Math.Min(point1.Y, point2.Y);
+ float width = Math.Max(point1.X, point2.X) - posX;
+ float height = Math.Max(point1.Y, point2.Y) - posY;
- if (GetType() != compareRect.GetType())
- return false;
+ return (new Point(posX, posY), new Size(width, height));
+ }
- return (Location == compareRect.Location) && (Size == compareRect.Size);
- }
+ ///
+ /// Converts the - and -position of this to a human-readable string.
+ ///
+ /// A string that contains the and of this . For example "[Location: [X: 100, Y: 10], Size: [Width: 20, Height: [40]]".
+ public override string ToString() => $"[Location: {Location}, Size: {Size}]";
- ///
- /// Returns a hash code for this .
- ///
- /// An integer value that specifies the hash code for this .
- public override int GetHashCode()
+ ///
+ /// Tests whether the specified object is a and is equivalent to this .
+ ///
+ /// The object to test.
+ /// true if is a equivalent to this ; otherwise, false.
+ public override bool Equals(object? obj)
+ {
+ if (obj is not Rectangle compareRect)
+ return false;
+
+ if (GetType() != compareRect.GetType())
+ return false;
+
+ return (Location == compareRect.Location) && (Size == compareRect.Size);
+ }
+
+ ///
+ /// Returns a hash code for this .
+ ///
+ /// An integer value that specifies the hash code for this .
+ public override int GetHashCode()
+ {
+ unchecked
{
- unchecked
- {
- int hashCode = Location.GetHashCode();
- hashCode = (hashCode * 397) ^ Size.GetHashCode();
- return hashCode;
- }
+ int hashCode = Location.GetHashCode();
+ hashCode = (hashCode * 397) ^ Size.GetHashCode();
+ return hashCode;
}
+ }
- #endregion
+ #endregion
- #region Operators
+ #region Operators
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are equal; otherwise, false.
- public static bool operator ==(Rectangle rectangle1, Rectangle rectangle2) => rectangle1.Equals(rectangle2);
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are equal; otherwise, false.
+ public static bool operator ==(in Rectangle rectangle1, in Rectangle rectangle2) => rectangle1.Equals(rectangle2);
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are not equal; otherwise, false.
- public static bool operator !=(Rectangle rectangle1, Rectangle rectangle2) => !(rectangle1 == rectangle2);
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are not equal; otherwise, false.
+ public static bool operator !=(in Rectangle rectangle1, in Rectangle rectangle2) => !(rectangle1 == rectangle2);
- #endregion
+ // DarthAffe 20.02.2021: Used for normalization
+ ///
+ /// Returns a normalized to the specified reference.
+ ///
+ /// The rectangle to nromalize.
+ /// The reference used for normalization.
+ /// A normalized rectangle.
+ public static Rectangle operator /(in Rectangle rectangle1, in Rectangle rectangle2)
+ {
+ float x = rectangle1.Location.X / (rectangle2.Size.Width - rectangle2.Location.X);
+ float y = rectangle1.Location.Y / (rectangle2.Size.Height - rectangle2.Location.Y);
+ Size size = rectangle1.Size / rectangle2.Size;
+ return new Rectangle(new Point(x, y), size);
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Positioning/Rotation.cs b/RGB.NET.Core/Positioning/Rotation.cs
index 0f638ec2..58903b77 100644
--- a/RGB.NET.Core/Positioning/Rotation.cs
+++ b/RGB.NET.Core/Positioning/Rotation.cs
@@ -4,159 +4,158 @@
using System;
using System.Diagnostics;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents an angular rotation.
+///
+[DebuggerDisplay("[{" + nameof(Degrees) + "}°]")]
+public readonly struct Rotation
{
+ #region Constants
+
+ private const float TWO_PI = MathF.PI * 2.0f;
+ private const float RADIANS_DEGREES_CONVERSION = 180.0f / MathF.PI;
+ private const float DEGREES_RADIANS_CONVERSION = MathF.PI / 180.0f;
+
+ #endregion
+
+ #region Properties & Fields
+
+ ///
+ /// Gets the angle in degrees.
+ ///
+ public float Degrees { get; }
+
+ ///
+ /// Gets the angle in radians.
+ ///
+ public float Radians { get; }
+
+ ///
+ /// Gets a bool indicating if the rotation is > 0.
+ ///
+ public bool IsRotated => !Degrees.EqualsInTolerance(0);
+
+ #endregion
+
+ #region Constructors
+
///
- /// Represents an angular rotation.
+ /// Initializes a new instance of the class using the provided values.
///
- [DebuggerDisplay("[{Degrees}°]")]
- public struct Rotation
+ /// The rotation in degrees.
+ public Rotation(float degrees)
+ : this(degrees, degrees * DEGREES_RADIANS_CONVERSION)
+ { }
+
+ private Rotation(float degrees, float radians)
{
- #region Constants
-
- private const double TWO_PI = Math.PI * 2.0;
- private const double RADIANS_DEGREES_CONVERSION = 180.0 / Math.PI;
- private const double DEGREES_RADIANS_CONVERSION = Math.PI / 180.0;
-
- #endregion
-
- #region Properties & Fields
-
- ///
- /// Gets the angle in degrees.
- ///
- public double Degrees { get; }
-
- ///
- /// Gets the angle in radians.
- ///
- public double Radians { get; }
-
- ///
- /// Gets a bool indicating if the rotation is > 0.
- ///
- public bool IsRotated => !Degrees.EqualsInTolerance(0);
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class using the provided values.
- ///
- /// The rotation in degrees.
- public Rotation(double degrees)
- : this(degrees, degrees * DEGREES_RADIANS_CONVERSION)
- { }
-
- private Rotation(double degrees, double radians)
- {
- this.Degrees = degrees % 360.0;
- this.Radians = radians % TWO_PI;
- }
-
- #endregion
-
- #region Methods
-
- ///
- /// Creates a new Rotation out of the given degree-angle.
- ///
- /// The angle in degrees.
- /// The new rotation.
- public static Rotation FromDegrees(double degrees) => new Rotation(degrees);
-
- ///
- /// Creates a new Rotation out of the given radian-angle.
- ///
- /// The angle in radians.
- /// The new rotation.
- public static Rotation FromRadians(double radians) => new Rotation(radians * RADIANS_DEGREES_CONVERSION, radians);
-
- ///
- /// Tests whether the specified is equivalent to this .
- ///
- /// The rotation to test.
- /// true if is equivalent to this ; otherwise, false.
- public bool Equals(Rotation other) => Degrees.EqualsInTolerance(other.Degrees);
-
- ///
- /// Tests whether the specified object is a and is equivalent to this .
- ///
- /// The object to test.
- /// true if is a equivalent to this ; otherwise, false.
- public override bool Equals(object obj) => obj is Rotation other && Equals(other);
-
- ///
- /// Returns a hash code for this .
- ///
- /// An integer value that specifies the hash code for this .
- public override int GetHashCode() => Degrees.GetHashCode();
-
- #endregion
-
- #region Operators
-
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are equal; otherwise, false.
- public static bool operator ==(Rotation rotation1, Rotation rotation2) => rotation1.Equals(rotation2);
-
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are not equal; otherwise, false.
- public static bool operator !=(Rotation rotation1, Rotation rotation2) => !(rotation1 == rotation2);
-
- ///
- /// Returns a new representing the addition of the and the provided value.
- ///
- /// The .
- /// The value to add.
- /// A new representing the addition of the and the provided value.
- public static Rotation operator +(Rotation rotation, double value) => new Rotation(rotation.Degrees + value);
-
- ///
- /// Returns a new representing the subtraction of the and the provided value.
- ///
- /// The .
- /// The value to substract.
- /// A new representing the subtraction of the and the provided value.
- public static Rotation operator -(Rotation rotation, double value) => new Rotation(rotation.Degrees - value);
-
- ///
- /// Returns a new representing the multiplication of the and the provided value.
- ///
- /// The .
- /// The value to multiply with.
- /// A new representing the multiplication of the and the provided value.
- public static Rotation operator *(Rotation rotation, double value) => new Rotation(rotation.Degrees * value);
-
- ///
- /// Returns a new representing the division of the and the provided value.
- ///
- /// The .
- /// The value to device with.
- /// A new representing the division of the and the provided value.
- public static Rotation operator /(Rotation rotation, double value) => value.EqualsInTolerance(0) ? new Rotation(0) : new Rotation(rotation.Degrees / value);
-
- ///
- /// Converts a double to a .
- ///
- /// The rotation in degrees to convert.
- public static implicit operator Rotation(double rotation) => new Rotation(rotation);
-
- ///
- /// Converts to a double representing the rotation in degrees.
- ///
- /// The rotatio to convert.
- public static implicit operator double(Rotation rotation) => rotation.Degrees;
-
- #endregion
+ this.Degrees = degrees % 360.0f;
+ this.Radians = radians % TWO_PI;
}
-}
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Creates a new Rotation out of the specified degree-angle.
+ ///
+ /// The angle in degrees.
+ /// The new rotation.
+ public static Rotation FromDegrees(float degrees) => new(degrees);
+
+ ///
+ /// Creates a new Rotation out of the specified radian-angle.
+ ///
+ /// The angle in radians.
+ /// The new rotation.
+ public static Rotation FromRadians(float radians) => new(radians * RADIANS_DEGREES_CONVERSION, radians);
+
+ ///
+ /// Tests whether the specified is equivalent to this .
+ ///
+ /// The rotation to test.
+ /// true if is equivalent to this ; otherwise, false.
+ public bool Equals(Rotation other) => Degrees.EqualsInTolerance(other.Degrees);
+
+ ///
+ /// Tests whether the specified object is a and is equivalent to this .
+ ///
+ /// The object to test.
+ /// true if is a equivalent to this ; otherwise, false.
+ public override bool Equals(object? obj) => obj is Rotation other && Equals(other);
+
+ ///
+ /// Returns a hash code for this .
+ ///
+ /// An integer value that specifies the hash code for this .
+ public override int GetHashCode() => Degrees.GetHashCode();
+
+ #endregion
+
+ #region Operators
+
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are equal; otherwise, false.
+ public static bool operator ==(in Rotation rotation1, in Rotation rotation2) => rotation1.Equals(rotation2);
+
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are not equal; otherwise, false.
+ public static bool operator !=(in Rotation rotation1, in Rotation rotation2) => !(rotation1 == rotation2);
+
+ ///
+ /// Returns a new representing the addition of the and the provided value.
+ ///
+ /// The .
+ /// The value to add.
+ /// A new representing the addition of the and the provided value.
+ public static Rotation operator +(in Rotation rotation, float value) => new(rotation.Degrees + value);
+
+ ///
+ /// Returns a new representing the subtraction of the and the provided value.
+ ///
+ /// The .
+ /// The value to substract.
+ /// A new representing the subtraction of the and the provided value.
+ public static Rotation operator -(in Rotation rotation, float value) => new(rotation.Degrees - value);
+
+ ///
+ /// Returns a new representing the multiplication of the and the provided value.
+ ///
+ /// The .
+ /// The value to multiply with.
+ /// A new representing the multiplication of the and the provided value.
+ public static Rotation operator *(in Rotation rotation, float value) => new(rotation.Degrees * value);
+
+ ///
+ /// Returns a new representing the division of the and the provided value.
+ ///
+ /// The .
+ /// The value to device with.
+ /// A new representing the division of the and the provided value.
+ public static Rotation operator /(in Rotation rotation, float value) => value.EqualsInTolerance(0) ? new Rotation(0) : new Rotation(rotation.Degrees / value);
+
+ ///
+ /// Converts a float to a .
+ ///
+ /// The rotation in degrees to convert.
+ public static implicit operator Rotation(float rotation) => new(rotation);
+
+ ///
+ /// Converts to a float representing the rotation in degrees.
+ ///
+ /// The rotatio to convert.
+ public static implicit operator float(in Rotation rotation) => rotation.Degrees;
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Positioning/Scale.cs b/RGB.NET.Core/Positioning/Scale.cs
index 04b8f092..8c884069 100644
--- a/RGB.NET.Core/Positioning/Scale.cs
+++ b/RGB.NET.Core/Positioning/Scale.cs
@@ -3,142 +3,141 @@
using System.Diagnostics;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a scaling.
+///
+[DebuggerDisplay("[Horizontal: {Horizontal}, Vertical: {Vertical}]")]
+public readonly struct Scale
{
+ #region Properties & Fields
+
+ ///
+ /// Gets the horizontal scaling value.
+ ///
+ public float Horizontal { get; }
+
+ ///
+ /// Gets the vertical scaling value.
+ ///
+ public float Vertical { get; }
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class using the provided values.
+ ///
+ /// The value used for horizontal and vertical scaling. 0 if not set.
+ public Scale(float scale = 1.0f) : this(scale, scale)
+ { }
+
+ ///
+ /// Initializes a new instance of the class using the provided values.
+ ///
+ /// The value used for horizontal scaling.
+ /// The value used for vertical scaling.
+ public Scale(float horizontal, float vertical)
+ {
+ this.Horizontal = horizontal;
+ this.Vertical = vertical;
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Tests whether the specified is equivalent to this .
+ ///
+ /// The scale to test.
+ /// true if is equivalent to this ; otherwise, false.
+ public bool Equals(Scale other) => Horizontal.EqualsInTolerance(other.Horizontal) && Vertical.EqualsInTolerance(other.Vertical);
+
+ ///
+ /// Tests whether the specified object is a and is equivalent to this .
+ ///
+ /// The object to test.
+ /// true if is a equivalent to this ; otherwise, false.
+ public override bool Equals(object? obj) => obj is Scale other && Equals(other);
+
+ ///
+ /// Returns a hash code for this .
+ ///
+ /// An integer value that specifies the hash code for this .
+ public override int GetHashCode() { unchecked { return (Horizontal.GetHashCode() * 397) ^ Vertical.GetHashCode(); } }
+
///
- /// Represents a scaling.
+ /// Deconstructs the scale into the horizontal and vertical value.
///
- [DebuggerDisplay("[Horizontal: {Horizontal}, Vertical: {Vertical}]")]
- public struct Scale
+ /// The horizontal scaling value.
+ /// The vertical scaling value.
+ public void Deconstruct(out float horizontalScale, out float verticalScale)
{
- #region Properties & Fields
-
- ///
- /// Gets the horizontal scaling value.
- ///
- public double Horizontal { get; }
-
- ///
- /// Gets the vertical scaling value.
- ///
- public double Vertical { get; }
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class using the provided values.
- ///
- /// The value used for horizontal and vertical scaling. 0 if not set.
- public Scale(double scale = 1.0) : this(scale, scale)
- { }
-
- ///
- /// Initializes a new instance of the class using the provided values.
- ///
- /// The value used for horizontal scaling.
- /// The value used for vertical scaling.
- public Scale(double horizontal, double vertical)
- {
- this.Horizontal = horizontal;
- this.Vertical = vertical;
- }
-
- #endregion
-
- #region Methods
-
- ///
- /// Tests whether the specified is equivalent to this .
- ///
- /// The scale to test.
- /// true if is equivalent to this ; otherwise, false.
- public bool Equals(Scale other) => Horizontal.EqualsInTolerance(other.Horizontal) && Vertical.EqualsInTolerance(other.Vertical);
-
- ///
- /// Tests whether the specified object is a and is equivalent to this .
- ///
- /// The object to test.
- /// true if is a equivalent to this ; otherwise, false.
- public override bool Equals(object obj) => obj is Scale other && Equals(other);
-
- ///
- /// Returns a hash code for this .
- ///
- /// An integer value that specifies the hash code for this .
- public override int GetHashCode() { unchecked { return (Horizontal.GetHashCode() * 397) ^ Vertical.GetHashCode(); } }
-
- ///
- /// Deconstructs the scale into the horizontal and vertical value.
- ///
- /// The horizontal scaling value.
- /// The vertical scaling value.
- public void Deconstruct(out double horizontalScale, out double verticalScale)
- {
- horizontalScale = Horizontal;
- verticalScale = Vertical;
- }
-
- #endregion
-
- #region Operators
-
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are equal; otherwise, false.
- public static bool operator ==(Scale scale1, Scale scale2) => scale1.Equals(scale2);
-
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are not equal; otherwise, false.
- public static bool operator !=(Scale scale1, Scale scale2) => !(scale1 == scale2);
-
- ///
- /// Returns a new representing the addition of the and the provided value.
- ///
- /// The .
- /// The value to add.
- /// A new representing the addition of the and the provided value.
- public static Scale operator +(Scale scale, double value) => new Scale(scale.Horizontal + value, scale.Vertical + value);
-
- ///
- /// Returns a new representing the subtraction of the and the provided value.
- ///
- /// The .
- /// The value to substract.
- /// A new representing the subtraction of the and the provided value.
- public static Scale operator -(Scale scale, double value) => new Scale(scale.Horizontal - value, scale.Vertical - value);
-
- ///
- /// Returns a new representing the multiplication of the and the provided value.
- ///
- /// The .
- /// The value to multiply with.
- /// A new representing the multiplication of the and the provided value.
- public static Scale operator *(Scale scale, double value) => new Scale(scale.Horizontal * value, scale.Vertical * value);
-
- ///
- /// Returns a new representing the division of the and the provided value.
- ///
- /// The .
- /// The value to device with.
- /// A new representing the division of the and the provided value.
- public static Scale operator /(Scale scale, double value) => value.EqualsInTolerance(0) ? new Scale(0) : new Scale(scale.Horizontal / value, scale.Vertical / value);
-
-
- ///
- /// Converts a double to a .
- ///
- /// The scale value to convert.
- public static implicit operator Scale(double scale) => new Scale(scale);
-
- #endregion
+ horizontalScale = Horizontal;
+ verticalScale = Vertical;
}
-}
+
+ #endregion
+
+ #region Operators
+
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are equal; otherwise, false.
+ public static bool operator ==(Scale scale1, Scale scale2) => scale1.Equals(scale2);
+
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are not equal; otherwise, false.
+ public static bool operator !=(Scale scale1, Scale scale2) => !(scale1 == scale2);
+
+ ///
+ /// Returns a new representing the addition of the and the provided value.
+ ///
+ /// The .
+ /// The value to add.
+ /// A new representing the addition of the and the provided value.
+ public static Scale operator +(Scale scale, float value) => new(scale.Horizontal + value, scale.Vertical + value);
+
+ ///
+ /// Returns a new representing the subtraction of the and the provided value.
+ ///
+ /// The .
+ /// The value to substract.
+ /// A new representing the subtraction of the and the provided value.
+ public static Scale operator -(Scale scale, float value) => new(scale.Horizontal - value, scale.Vertical - value);
+
+ ///
+ /// Returns a new representing the multiplication of the and the provided value.
+ ///
+ /// The .
+ /// The value to multiply with.
+ /// A new representing the multiplication of the and the provided value.
+ public static Scale operator *(Scale scale, float value) => new(scale.Horizontal * value, scale.Vertical * value);
+
+ ///
+ /// Returns a new representing the division of the and the provided value.
+ ///
+ /// The .
+ /// The value to device with.
+ /// A new representing the division of the and the provided value.
+ public static Scale operator /(Scale scale, float value) => value.EqualsInTolerance(0) ? new Scale(0) : new Scale(scale.Horizontal / value, scale.Vertical / value);
+
+
+ ///
+ /// Converts a float to a .
+ ///
+ /// The scale value to convert.
+ public static implicit operator Scale(float scale) => new(scale);
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Positioning/Shape.cs b/RGB.NET.Core/Positioning/Shape.cs
index f4cdfe01..74e82da9 100644
--- a/RGB.NET.Core/Positioning/Shape.cs
+++ b/RGB.NET.Core/Positioning/Shape.cs
@@ -1,27 +1,25 @@
using System;
-using RGB.NET.Core.Layout;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Contains a list of different shapes used to define the layout of a LED.
+///
+[Serializable]
+public enum Shape
{
///
- /// Contains a list of different shapes used by .
+ /// A custom shape defined by vector-data.
///
- [Serializable]
- public enum Shape
- {
- ///
- /// A custom shape defined by vector-data.
- ///
- Custom = 0,
+ Custom = 0,
- ///
- /// A simple rectangle.
- ///
- Rectangle = 1,
+ ///
+ /// A simple rectangle.
+ ///
+ Rectangle = 1,
- ///
- /// A simple circle.
- ///
- Circle = 2,
- }
-}
+ ///
+ /// A simple circle.
+ ///
+ Circle = 2,
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Positioning/Size.cs b/RGB.NET.Core/Positioning/Size.cs
index 74f91534..daba2ff1 100644
--- a/RGB.NET.Core/Positioning/Size.cs
+++ b/RGB.NET.Core/Positioning/Size.cs
@@ -3,194 +3,194 @@
using System.Diagnostics;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a size consisting of a width and a height.
+///
+[DebuggerDisplay("[Width: {Width}, Height: {Height}]")]
+public readonly struct Size
{
+ #region Constants
+
+ private static readonly Size INVALID = new(float.NaN, float.NaN);
///
- /// Represents a size consisting of a width and a height.
+ /// Gets a [NaN,NaN]-Size.
///
- [DebuggerDisplay("[Width: {Width}, Height: {Height}]")]
- public struct Size
- {
- #region Constants
-
- ///
- /// Gets a [NaN,NaN]-Size.
- ///
- public static Size Invalid => new Size(double.NaN, double.NaN);
-
- #endregion
-
- #region Properties & Fields
-
- ///
- /// Gets or sets the width component value of this .
- ///
- public double Width { get; }
-
- ///
- /// Gets or sets the height component value of this .
- ///
- public double Height { get; }
-
- #endregion
-
- #region Constructors
-
- ///
- ///
- /// Initializes a new instance of the using the provided size to define a square.
- ///
- /// The size used for the component value and the component value.
- public Size(double size)
- : this(size, size)
- { }
-
- ///
- /// Initializes a new instance of the class using the provided values.
- ///
- /// The size used for the component value.
- /// The size used for the component value.
- public Size(double width, double height)
- {
- this.Width = width;
- this.Height = height;
- }
+ public static ref readonly Size Invalid => ref INVALID;
- #endregion
+ #endregion
- #region Methods
+ #region Properties & Fields
- ///
- /// Converts the and of this to a human-readable string.
- ///
- /// A string that contains the and of this . For example "[Width: 100, Height: 20]".
- public override string ToString() => $"[Width: {Width}, Height: {Height}]";
+ ///
+ /// Gets or sets the width component value of this .
+ ///
+ public float Width { get; }
- ///
- /// Tests whether the specified object is a and is equivalent to this .
- ///
- /// The object to test.
- /// true if is a equivalent to this ; otherwise, false.
- public override bool Equals(object obj)
- {
- if (!(obj is Size)) return false;
+ ///
+ /// Gets or sets the height component value of this .
+ ///
+ public float Height { get; }
- Size compareSize = (Size)obj;
- return ((double.IsNaN(Width) && double.IsNaN(compareSize.Width)) || Width.EqualsInTolerance(compareSize.Width))
- && ((double.IsNaN(Height) && double.IsNaN(compareSize.Height)) || Height.EqualsInTolerance(compareSize.Height));
- }
+ #endregion
- ///
- /// Returns a hash code for this .
- ///
- /// An integer value that specifies the hash code for this .
- public override int GetHashCode()
- {
- unchecked
- {
- int hashCode = Width.GetHashCode();
- hashCode = (hashCode * 397) ^ Height.GetHashCode();
- return hashCode;
- }
- }
+ #region Constructors
+
+ ///
+ ///
+ /// Initializes a new instance of the using the provided size to define a square.
+ ///
+ /// The size used for the component value and the component value.
+ public Size(float size)
+ : this(size, size)
+ { }
+
+ ///
+ /// Initializes a new instance of the class using the provided values.
+ ///
+ /// The size used for the component value.
+ /// The size used for the component value.
+ public Size(float width, float height)
+ {
+ this.Width = width;
+ this.Height = height;
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Converts the and of this to a human-readable string.
+ ///
+ /// A string that contains the and of this . For example "[Width: 100, Height: 20]".
+ public override string ToString() => $"[Width: {Width}, Height: {Height}]";
+
+ ///
+ /// Tests whether the specified object is a and is equivalent to this .
+ ///
+ /// The object to test.
+ /// true if is a equivalent to this ; otherwise, false.
+ public override bool Equals(object? obj)
+ {
+ if (obj is not Size size) return false;
+
+ (float width, float height) = size;
+ return ((float.IsNaN(Width) && float.IsNaN(width)) || Width.EqualsInTolerance(width))
+ && ((float.IsNaN(Height) && float.IsNaN(height)) || Height.EqualsInTolerance(height));
+ }
- ///
- /// Deconstructs the size into the width and height value.
- ///
- /// The width.
- /// The height.
- public void Deconstruct(out double width, out double height)
+ ///
+ /// Returns a hash code for this .
+ ///
+ /// An integer value that specifies the hash code for this .
+ public override int GetHashCode()
+ {
+ unchecked
{
- width = Width;
- height = Height;
+ int hashCode = Width.GetHashCode();
+ hashCode = (hashCode * 397) ^ Height.GetHashCode();
+ return hashCode;
}
+ }
- #endregion
-
- #region Operators
-
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are equal; otherwise, false.
- public static bool operator ==(Size size1, Size size2) => size1.Equals(size2);
-
- ///
- /// Returns a value that indicates whether two specified are equal.
- ///
- /// The first to compare.
- /// The second to compare.
- /// true if and are not equal; otherwise, false.
- public static bool operator !=(Size size1, Size size2) => !(size1 == size2);
-
- ///
- /// Returns a new representing the addition of the two provided .
- ///
- /// The first .
- /// The second .
- /// A new representing the addition of the two provided .
- public static Size operator +(Size size1, Size size2) => new Size(size1.Width + size2.Width, size1.Height + size2.Height);
-
- ///
- /// Returns a new created from the provided and .
- ///
- /// The of the rectangle.
- /// The of the rectangle.
- /// The rectangle created from the provided and .
- public static Rectangle operator +(Size size, Point point) => new Rectangle(point, size);
-
- ///
- /// Returns a new representing the subtraction of the two provided .
- ///
- /// The first .
- /// The second .
- /// A new representing the subtraction of the two provided .
- public static Size operator -(Size size1, Size size2) => new Size(size1.Width - size2.Width, size1.Height - size2.Height);
-
- ///
- /// Returns a new representing the multiplication of the two provided .
- ///
- /// The first .
- /// The second .
- /// A new representing the multiplication of the two provided .
- public static Size operator *(Size size1, Size size2) => new Size(size1.Width * size2.Width, size1.Height * size2.Height);
-
- ///
- /// Returns a new representing the multiplication of the and the provided factor.
- ///
- /// The .
- /// The factor by which the should be multiplied.
- /// A new representing the multiplication of the and the provided factor.
- public static Size operator *(Size size, double factor) => new Size(size.Width * factor, size.Height * factor);
-
- ///
- /// Returns a new representing the division of the two provided .
- ///
- /// The first .
- /// The second .
- /// A new representing the division of the two provided .
- public static Size operator /(Size size1, Size size2)
- => size2.Width.EqualsInTolerance(0) || size2.Height.EqualsInTolerance(0)
- ? Invalid : new Size(size1.Width / size2.Width, size1.Height / size2.Height);
-
- ///
- /// Returns a new representing the division of the and the provided factor.
- ///
- /// The .
- /// The factor by which the should be divided.
- /// A new representing the division of the and the provided factor.
- public static Size operator /(Size size, double factor) => factor.EqualsInTolerance(0) ? Invalid : new Size(size.Width / factor, size.Height / factor);
-
- ///
- /// Returns a new representing the multiplication of the and the given .
- ///
- /// The to scale.
- /// The scaling factor.
- /// A new representing the multiplication of the and the given .
- public static Size operator *(Size size, Scale scale) => new Size(size.Width * scale.Horizontal, size.Height * scale.Vertical);
-
- #endregion
+ ///
+ /// Deconstructs the size into the width and height value.
+ ///
+ /// The width.
+ /// The height.
+ public void Deconstruct(out float width, out float height)
+ {
+ width = Width;
+ height = Height;
}
-}
+
+ #endregion
+
+ #region Operators
+
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are equal; otherwise, false.
+ public static bool operator ==(in Size size1, in Size size2) => size1.Equals(size2);
+
+ ///
+ /// Returns a value that indicates whether two specified are equal.
+ ///
+ /// The first to compare.
+ /// The second to compare.
+ /// true if and are not equal; otherwise, false.
+ public static bool operator !=(in Size size1, in Size size2) => !(size1 == size2);
+
+ ///
+ /// Returns a new representing the addition of the two provided .
+ ///
+ /// The first .
+ /// The second .
+ /// A new representing the addition of the two provided .
+ public static Size operator +(in Size size1, in Size size2) => new(size1.Width + size2.Width, size1.Height + size2.Height);
+
+ ///
+ /// Returns a new created from the provided and .
+ ///
+ /// The of the rectangle.
+ /// The of the rectangle.
+ /// The rectangle created from the provided and .
+ public static Rectangle operator +(in Size size, in Point point) => new(point, size);
+
+ ///
+ /// Returns a new representing the subtraction of the two provided .
+ ///
+ /// The first .
+ /// The second .
+ /// A new representing the subtraction of the two provided .
+ public static Size operator -(in Size size1, in Size size2) => new(size1.Width - size2.Width, size1.Height - size2.Height);
+
+ ///
+ /// Returns a new representing the multiplication of the two provided .
+ ///
+ /// The first .
+ /// The second .
+ /// A new representing the multiplication of the two provided .
+ public static Size operator *(in Size size1, in Size size2) => new(size1.Width * size2.Width, size1.Height * size2.Height);
+
+ ///
+ /// Returns a new representing the multiplication of the and the provided factor.
+ ///
+ /// The .
+ /// The factor by which the should be multiplied.
+ /// A new representing the multiplication of the and the provided factor.
+ public static Size operator *(in Size size, float factor) => new(size.Width * factor, size.Height * factor);
+
+ ///
+ /// Returns a new representing the division of the two provided .
+ ///
+ /// The first .
+ /// The second .
+ /// A new representing the division of the two provided .
+ public static Size operator /(in Size size1, in Size size2)
+ => size2.Width.EqualsInTolerance(0) || size2.Height.EqualsInTolerance(0)
+ ? Invalid : new Size(size1.Width / size2.Width, size1.Height / size2.Height);
+
+ ///
+ /// Returns a new representing the division of the and the provided factor.
+ ///
+ /// The .
+ /// The factor by which the should be divided.
+ /// A new representing the division of the and the provided factor.
+ public static Size operator /(in Size size, float factor) => factor.EqualsInTolerance(0) ? Invalid : new Size(size.Width / factor, size.Height / factor);
+
+ ///
+ /// Returns a new representing the multiplication of the and the specified .
+ ///
+ /// The to scale.
+ /// The scaling factor.
+ /// A new representing the multiplication of the and the specified .
+ public static Size operator *(in Size size, in Scale scale) => new(size.Width * scale.Horizontal, size.Height * scale.Vertical);
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/README.md b/RGB.NET.Core/README.md
new file mode 100644
index 00000000..d31978bc
--- /dev/null
+++ b/RGB.NET.Core/README.md
@@ -0,0 +1,36 @@
+[RGB.NET](https://github.com/DarthAffe/RGB.NET) Core-Package.
+
+Required to use RGB.NET
+
+## Getting Started
+```csharp
+// Create a surface - this is where all devices belongs too
+RGBSurface surface = new RGBSurface();
+
+// Load your devices - check out the RGB.NET.Devices-packages for more information
+// TODO: Load device-providers
+
+// Automatically align devices to not overlap - you can ofc also move them by hand
+surface.AlignDevices();
+
+// Register an update-trigger
+surface.RegisterUpdateTrigger(new TimerUpdateTrigger());
+```
+
+## Basis Rendering
+```csharp
+// Create a led-group containing all leds on the surface
+ILedGroup allLeds = new ListLedGroup(surface, surface.Leds);
+
+// Create a rainbow gradient
+RainbowGradient rainbow = new RainbowGradient();
+
+// Animate the gradient to steadily move
+rainbow.AddDecorator(new MoveGradientDecorator(surface));
+
+// Create a texture rendering that gradient
+ITexture texture = new ConicalGradientTexture(new Size(10, 10), rainbow);
+
+// Create a brush rendering the texture and assign it to the group
+allLeds.Brush = new TextureBrush(texture);
+```
\ No newline at end of file
diff --git a/RGB.NET.Core/RGB.NET.Core.csproj b/RGB.NET.Core/RGB.NET.Core.csproj
index 6fab932b..63573888 100644
--- a/RGB.NET.Core/RGB.NET.Core.csproj
+++ b/RGB.NET.Core/RGB.NET.Core.csproj
@@ -1,7 +1,8 @@
- netstandard2.0;net45
- win7-x86;win7-x64
+ net7.0;net6.0;net5.0
+ latest
+ enable
Darth Affe
Wyrez
@@ -14,11 +15,12 @@
RGB.NET.Core
Core-Module of RGB.NET
Core-Module of RGB.NET, a C# (.NET) library for accessing various RGB-peripherals
- Copyright © Darth Affe 2020
- Copyright © Darth Affe 2020
- http://lib.arge.be/icon.png
+ Copyright © Darth Affe 2023
+ Copyright © Darth Affe 2023
+ icon.png
+ README.md
https://github.com/DarthAffe/RGB.NET
- https://raw.githubusercontent.com/DarthAffe/RGB.NET/master/LICENSE
+ LGPL-2.1-only
Github
https://github.com/DarthAffe/RGB.NET
True
@@ -33,32 +35,26 @@
true
True
True
- latest
-
-
-
- NETCORE;NETSTANDARD;NETSTANDARD2_0
-
-
-
- NET45;NETFULL
+ portable
+ snupkg
+ true
$(DefineConstants);TRACE;DEBUG
true
- full
false
- pdbonly
true
$(NoWarn);CS1591;CS1572;CS1573
$(DefineConstants);RELEASE
-
-
+
+
+
+
\ No newline at end of file
diff --git a/RGB.NET.Core/RGB.NET.Core.csproj.DotSettings b/RGB.NET.Core/RGB.NET.Core.csproj.DotSettings
index 9555e90e..bf7655f9 100644
--- a/RGB.NET.Core/RGB.NET.Core.csproj.DotSettings
+++ b/RGB.NET.Core/RGB.NET.Core.csproj.DotSettings
@@ -9,13 +9,20 @@
True
True
True
+ True
True
True
True
True
+ True
True
True
True
+ True
+ True
+ True
+ True
True
True
- True
\ No newline at end of file
+ True
+
\ No newline at end of file
diff --git a/RGB.NET.Core/RGBSurface.cs b/RGB.NET.Core/RGBSurface.cs
index 74bc8829..f8ec4378 100644
--- a/RGB.NET.Core/RGBSurface.cs
+++ b/RGB.NET.Core/RGBSurface.cs
@@ -7,290 +7,379 @@
using System.Diagnostics;
using System.Linq;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+///
+///
+/// Represents a RGB-surface containing multiple devices.
+///
+public sealed class RGBSurface : AbstractBindable, IDisposable
{
- ///
- ///
+ #region Properties & Fields
+
+ private readonly Stopwatch _deltaTimeCounter;
+
+ private readonly IList _devices = new List();
+ private readonly IList _updateTriggers = new List();
+ private readonly List _ledGroups = new();
+
+ ///
+ /// Gets a readonly list containing all loaded .
+ /// This collection should be locked when enumerated in a multi-threaded application.
+ ///
+ public IReadOnlyList Devices { get; }
+
///
- /// Represents a RGB-surface containing multiple devices.
+ /// Gets a readonly list containing all registered .
+ /// This collection should be locked when enumerated in a multi-threaded application.
///
- public partial class RGBSurface : AbstractBindable, IDisposable
+ public IReadOnlyList UpdateTriggers { get; }
+
+ ///
+ /// Gets a copy of the representing this .
+ ///
+ public Rectangle Boundary { get; private set; } = new(new Point(0, 0), new Size(0, 0));
+
+ ///
+ /// Gets a list of all on this .
+ ///
+ public IEnumerable Leds
{
- #region Properties & Fields
+ get
+ {
+ lock (Devices)
+ return _devices.SelectMany(x => x);
+ }
+ }
- ///
- /// Gets the singelot-instance of the class.
- ///
- public static RGBSurface Instance { get; } = new RGBSurface();
+ #endregion
- private Stopwatch _deltaTimeCounter;
+ #region EventHandler
- private IList _deviceProvider = new List();
- private IList _devices = new List();
- private IList _updateTriggers = new List();
+ ///
+ /// Represents the event-handler of the -event.
+ ///
+ /// The arguments provided by the event.
+ public delegate void ExceptionEventHandler(ExceptionEventArgs args);
- // ReSharper disable InconsistentNaming
+ ///
+ /// Represents the event-handler of the -event.
+ ///
+ /// The arguments provided by the event.
+ public delegate void UpdatingEventHandler(UpdatingEventArgs args);
- private readonly LinkedList _ledGroups = new LinkedList();
+ ///
+ /// Represents the event-handler of the -event.
+ ///
+ /// The arguments provided by the event.
+ public delegate void UpdatedEventHandler(UpdatedEventArgs args);
- // ReSharper restore InconsistentNaming
+ ///
+ /// Represents the event-handler of the -event.
+ ///
+ /// The arguments provided by the event.
+ public delegate void SurfaceLayoutChangedEventHandler(SurfaceLayoutChangedEventArgs args);
- ///
- /// Gets a readonly list containing all loaded .
- ///
- public IEnumerable Devices
- {
- get
- {
- lock (_devices)
- return new ReadOnlyCollection(_devices);
- }
- }
+ #endregion
- ///
- /// Gets a readonly list containing all registered .
- ///
- public IEnumerable UpdateTriggers => new ReadOnlyCollection(_updateTriggers);
+ #region Events
- ///
- /// Gets a copy of the representing this .
- ///
- public Rectangle SurfaceRectangle { get; private set; }
+ // ReSharper disable EventNeverSubscribedTo.Global
- ///
- /// Gets a list of all on this .
- ///
- public IEnumerable Leds
- {
- get
- {
- lock (_devices)
- return _devices.SelectMany(x => x);
- }
- }
+ ///
+ /// Occurs when a catched exception is thrown inside the .
+ ///
+ public event ExceptionEventHandler? Exception;
- #endregion
+ ///
+ /// Occurs when the starts updating.
+ ///
+ public event UpdatingEventHandler? Updating;
+
+ ///
+ /// Occurs when the update is done.
+ ///
+ public event UpdatedEventHandler? Updated;
+
+ ///
+ /// Occurs when the layout of this changed.
+ ///
+ public event SurfaceLayoutChangedEventHandler? SurfaceLayoutChanged;
+
+ // ReSharper restore EventNeverSubscribedTo.Global
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public RGBSurface()
+ {
+ _deltaTimeCounter = Stopwatch.StartNew();
+
+ Devices = new ReadOnlyCollection(_devices);
+ UpdateTriggers = new ReadOnlyCollection(_updateTriggers);
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Perform a full update for all devices. Updates only dirty by default, or all , if flushLeds is set to true.
+ ///
+ /// Specifies whether all , (including clean ones) should be updated.
+ public void Update(bool flushLeds = false) => Update(null, new CustomUpdateData((CustomUpdateDataIndex.FLUSH_LEDS, flushLeds)));
- #region Constructors
+ private void Update(object? updateTrigger, CustomUpdateData customData) => Update(updateTrigger as IUpdateTrigger, customData);
- ///
- /// Initializes a new instance of the class.
- ///
- private RGBSurface()
+ private void Update(IUpdateTrigger? updateTrigger, CustomUpdateData customData)
+ {
+ try
+ {
+ bool flushLeds = customData[CustomUpdateDataIndex.FLUSH_LEDS] as bool? ?? false;
+ bool render = customData[CustomUpdateDataIndex.RENDER] as bool? ?? true;
+ bool updateDevices = customData[CustomUpdateDataIndex.UPDATE_DEVICES] as bool? ?? true;
+
+ lock (UpdateTriggers)
+ lock (Devices)
+ {
+ OnUpdating(updateTrigger, customData);
+
+ if (render)
+ lock (_ledGroups)
+ {
+ // Render brushes
+ foreach (ILedGroup ledGroup in _ledGroups)
+ try { Render(ledGroup); }
+ catch (Exception ex) { OnException(ex); }
+ }
+
+ if (updateDevices)
+ foreach (IRGBDevice device in _devices)
+ try { device.Update(flushLeds); }
+ catch (Exception ex) { OnException(ex); }
+
+ OnUpdated();
+ }
+ }
+ catch (Exception ex)
{
- _deltaTimeCounter = Stopwatch.StartNew();
+ OnException(ex);
}
+ }
+
+ ///
+ public void Dispose()
+ {
+ List devices;
+ lock (Devices)
+ devices = new List(_devices);
- #endregion
+ foreach (IRGBDevice device in devices)
+ try { Detach(device); }
+ catch { /* We do what we can */}
- #region Methods
+ foreach (IUpdateTrigger updateTrigger in _updateTriggers)
+ try { updateTrigger.Dispose(); }
+ catch { /* We do what we can */}
- ///
- /// Perform a full update for all devices. Updates only dirty by default, or all , if flushLeds is set to true.
- ///
- /// Specifies whether all , (including clean ones) should be updated.
- public void Update(bool flushLeds = false) => Update(null, new CustomUpdateData(("flushLeds", flushLeds)));
+ _ledGroups.Clear();
+ }
+
+ ///
+ /// Renders a ledgroup.
+ ///
+ /// The led group to render.
+ /// Thrown if the of the Brush is not valid.
+ private void Render(ILedGroup ledGroup)
+ {
+ IList leds = ledGroup.ToList();
+ IBrush? brush = ledGroup.Brush;
- private void Update(object updateTrigger, CustomUpdateData customData) => Update(updateTrigger as IUpdateTrigger, customData);
+ if ((brush == null) || !brush.IsEnabled) return;
- private void Update(IUpdateTrigger updateTrigger, CustomUpdateData customData)
+ IEnumerable<(RenderTarget renderTarget, Color color)> render;
+ switch (brush.CalculationMode)
{
- if (customData == null)
- customData = new CustomUpdateData();
-
- try
- {
- bool flushLeds = customData["flushLeds"] as bool? ?? false;
- bool syncBack = customData["syncBack"] as bool? ?? true;
- bool render = customData["render"] as bool? ?? true;
- bool updateDevices = customData["updateDevices"] as bool? ?? true;
-
- lock (_updateTriggers)
- lock (_devices)
- {
- OnUpdating(updateTrigger, customData);
-
- if (syncBack)
- foreach (IRGBDevice device in _devices)
- if (device.UpdateMode.HasFlag(DeviceUpdateMode.SyncBack) && device.DeviceInfo.SupportsSyncBack)
- try { device.SyncBack(); }
- catch (Exception ex) { OnException(ex); }
-
- if (render)
- lock (_ledGroups)
- {
- // Render brushes
- foreach (ILedGroup ledGroup in _ledGroups.OrderBy(x => x.ZIndex))
- try { Render(ledGroup); }
- catch (Exception ex) { OnException(ex); }
- }
-
- if (updateDevices)
- foreach (IRGBDevice device in _devices)
- if (!device.UpdateMode.HasFlag(DeviceUpdateMode.NoUpdate))
- try { device.Update(flushLeds); }
- catch (Exception ex) { OnException(ex); }
-
- OnUpdated();
- }
- }
- catch (Exception ex)
- {
- OnException(ex);
- }
+ case RenderMode.Relative:
+ Rectangle brushRectangle = new(leds.Select(led => led.AbsoluteBoundary));
+ Point offset = new(-brushRectangle.Location.X, -brushRectangle.Location.Y);
+ brushRectangle = brushRectangle.SetLocation(new Point(0, 0));
+ render = brush.Render(brushRectangle, leds.Select(led => new RenderTarget(led, led.AbsoluteBoundary.Translate(offset))));
+ break;
+ case RenderMode.Absolute:
+ render = brush.Render(Boundary, leds.Select(led => new RenderTarget(led, led.AbsoluteBoundary)));
+ break;
+ default:
+ throw new ArgumentException($"The CalculationMode '{brush.CalculationMode}' is not valid.");
}
- ///
- public void Dispose()
+ foreach ((RenderTarget renderTarget, Color c) in render)
+ renderTarget.Led.Color = c;
+ }
+
+ ///
+ /// Attaches the specified .
+ ///
+ /// The to attach.
+ /// true if the could be attached; otherwise, false.
+ public bool Attach(ILedGroup ledGroup)
+ {
+ lock (_ledGroups)
{
- lock (_devices)
- foreach (IRGBDevice device in _devices)
- try { device.Dispose(); }
- catch { /* We do what we can */}
-
- lock (_deviceProvider)
- foreach (IRGBDeviceProvider deviceProvider in _deviceProvider)
- try { deviceProvider.Dispose(); }
- catch { /* We do what we can */}
-
- foreach (IUpdateTrigger updateTrigger in _updateTriggers)
- try { updateTrigger.Dispose(); }
- catch { /* We do what we can */}
-
- _ledGroups.Clear();
- _devices = null;
- _deviceProvider = null;
+ if (ledGroup.Surface != null) return false;
+
+ ledGroup.Surface = this;
+ _ledGroups.Add(ledGroup);
+ _ledGroups.Sort((group1, group2) => group1.ZIndex.CompareTo(group2.ZIndex));
+ ledGroup.OnAttach();
+
+ return true;
}
+ }
- ///
- /// Renders a ledgroup.
- ///
- /// The led group to render.
- private void Render(ILedGroup ledGroup)
+ ///
+ /// Detaches the specified .
+ ///
+ /// The to detache.
+ /// true if the could be detached; false otherwise.
+ public bool Detach(ILedGroup ledGroup)
+ {
+ lock (_ledGroups)
{
- IList leds = ledGroup.GetLeds().ToList();
- IBrush brush = ledGroup.Brush;
-
- if ((brush == null) || !brush.IsEnabled) return;
-
- switch (brush.BrushCalculationMode)
- {
- case BrushCalculationMode.Relative:
- Rectangle brushRectangle = new Rectangle(leds.Select(led => led.AbsoluteLedRectangle));
- Point offset = new Point(-brushRectangle.Location.X, -brushRectangle.Location.Y);
- brushRectangle = brushRectangle.SetLocation(new Point(0, 0));
- brush.PerformRender(brushRectangle, leds.Select(led => new BrushRenderTarget(led, led.AbsoluteLedRectangle.Translate(offset))));
- break;
- case BrushCalculationMode.Absolute:
- brush.PerformRender(SurfaceRectangle, leds.Select(led => new BrushRenderTarget(led, led.AbsoluteLedRectangle)));
- break;
- default:
- throw new ArgumentException();
- }
-
- //brush.UpdateEffects();
- brush.PerformFinalize();
-
- foreach (KeyValuePair renders in brush.RenderedTargets)
- renders.Key.Led.Color = renders.Value;
+ if (!_ledGroups.Remove(ledGroup)) return false;
+ ledGroup.OnDetach();
+ ledGroup.Surface = null;
+
+ return true;
}
+ }
- ///
- /// Attaches the given .
- ///
- /// The to attach.
- /// true if the could be attached; otherwise, false.
- public bool AttachLedGroup(ILedGroup ledGroup)
+ ///
+ /// Attaches the specified .
+ ///
+ /// The to attach.
+ public void Attach(IRGBDevice device)
+ {
+ lock (Devices)
{
- if (ledGroup == null) return false;
-
- lock (_ledGroups)
- {
- if (_ledGroups.Contains(ledGroup)) return false;
+ if (string.IsNullOrWhiteSpace(device.DeviceInfo.DeviceName)) throw new RGBDeviceException($"The device '{device.DeviceInfo.Manufacturer} {device.DeviceInfo.Model}' has no valid name.");
+ if (device.Surface != null) throw new RGBSurfaceException($"The device '{device.DeviceInfo.DeviceName}' is already attached to a surface.");
- _ledGroups.AddLast(ledGroup);
- ledGroup.OnAttach();
+ device.Surface = this;
+ device.BoundaryChanged += DeviceOnBoundaryChanged;
- return true;
- }
+ _devices.Add(device);
+ OnSurfaceLayoutChanged(SurfaceLayoutChangedEventArgs.FromAddedDevice(device));
}
+ }
- ///
- /// Detaches the given .
- ///
- /// The to detached.
- /// true if the could be detached; otherwise, false.
- public bool DetachLedGroup(ILedGroup ledGroup)
+ ///
+ /// Detaches the specified .
+ ///
+ /// The to detache.
+ /// true if the could be detached; false otherwise.
+ public void Detach(IRGBDevice device)
+ {
+ lock (Devices)
{
- if (ledGroup == null) return false;
+ if (!_devices.Contains(device)) throw new RGBSurfaceException($"The device '{device.DeviceInfo.DeviceName}' is not attached to this surface.");
- lock (_ledGroups)
- {
- LinkedListNode node = _ledGroups.Find(ledGroup);
- if (node == null) return false;
+ device.BoundaryChanged -= DeviceOnBoundaryChanged;
+ device.Surface = null;
- _ledGroups.Remove(node);
- node.Value.OnDetach();
+ _devices.Remove(device);
- return true;
- }
+ OnSurfaceLayoutChanged(SurfaceLayoutChangedEventArgs.FromRemovedDevice(device));
}
+ }
+
+ // ReSharper restore UnusedMember.Global
+
+ private void DeviceOnBoundaryChanged(object? sender, EventArgs args)
+ => OnSurfaceLayoutChanged((sender is IRGBDevice device) ? SurfaceLayoutChangedEventArgs.FromChangedDevice(device) : SurfaceLayoutChangedEventArgs.Misc());
- private void UpdateSurfaceRectangle()
+ private void OnSurfaceLayoutChanged(SurfaceLayoutChangedEventArgs args)
+ {
+ UpdateSurfaceRectangle();
+
+ SurfaceLayoutChanged?.Invoke(args);
+ }
+
+ private void UpdateSurfaceRectangle()
+ {
+ lock (Devices)
{
- lock (_devices)
- {
- Rectangle devicesRectangle = new Rectangle(_devices.Select(d => d.DeviceRectangle));
- SurfaceRectangle = SurfaceRectangle.SetSize(new Size(devicesRectangle.Location.X + devicesRectangle.Size.Width, devicesRectangle.Location.Y + devicesRectangle.Size.Height));
- }
+ Rectangle devicesRectangle = new(_devices.Select(d => d.Boundary));
+ Boundary = Boundary.SetSize(new Size(devicesRectangle.Location.X + devicesRectangle.Size.Width, devicesRectangle.Location.Y + devicesRectangle.Size.Height));
}
+ }
- ///
- /// Gets all devices of a specific type.
- ///
- /// The type of devices to get.
- /// A list of devices with the specified type.
- public IList GetDevices()
- where T : class
+ ///
+ /// Registers the provided .
+ ///
+ /// The to register.
+ public void RegisterUpdateTrigger(IUpdateTrigger updateTrigger)
+ {
+ if (!_updateTriggers.Contains(updateTrigger))
{
- lock (_devices)
- return new ReadOnlyCollection(_devices.Select(x => x as T).Where(x => x != null).ToList());
+ _updateTriggers.Add(updateTrigger);
+ updateTrigger.Update += Update;
}
+ }
+
+ ///
+ /// Unregisters the provided .
+ ///
+ /// The to unregister.
+ public void UnregisterUpdateTrigger(IUpdateTrigger updateTrigger)
+ {
+ if (_updateTriggers.Remove(updateTrigger))
+ updateTrigger.Update -= Update;
+ }
- ///
- /// Gets all devices of the specified .
- ///
- /// The of the devices to get.
- /// a list of devices matching the specified .
- public IList GetDevices(RGBDeviceType deviceType)
+ ///
+ /// Handles the needed event-calls for an exception.
+ ///
+ /// The exception previously thrown.
+ private void OnException(Exception ex)
+ {
+ try
{
- lock (_devices)
- return new ReadOnlyCollection(_devices.Where(d => deviceType.HasFlag(d.DeviceInfo.DeviceType)).ToList());
+ Exception?.Invoke(new ExceptionEventArgs(ex));
}
+ catch { /* Well ... that's not my fault */ }
+ }
- ///
- /// Registers the provided .
- ///
- /// The to register.
- public void RegisterUpdateTrigger(IUpdateTrigger updateTrigger)
+ ///
+ /// Handles the needed event-calls before updating.
+ ///
+ private void OnUpdating(IUpdateTrigger? trigger, CustomUpdateData customData)
+ {
+ try
{
- if (!_updateTriggers.Contains(updateTrigger))
- {
- _updateTriggers.Add(updateTrigger);
- updateTrigger.Update += Update;
- }
+ double deltaTime = _deltaTimeCounter.Elapsed.TotalSeconds;
+ _deltaTimeCounter.Restart();
+ Updating?.Invoke(new UpdatingEventArgs(deltaTime, trigger, customData));
}
+ catch { /* Well ... that's not my fault */ }
+ }
- ///
- /// Unregisters the provided .
- ///
- /// The to unregister.
- public void UnregisterUpdateTrigger(IUpdateTrigger updateTrigger)
+ ///
+ /// Handles the needed event-calls after an update.
+ ///
+ private void OnUpdated()
+ {
+ try
{
- if (_updateTriggers.Remove(updateTrigger))
- updateTrigger.Update -= Update;
+ Updated?.Invoke(new UpdatedEventArgs());
}
-
- #endregion
+ catch { /* Well ... that's not my fault */ }
}
-}
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/RGBSurfaceDeviceEvents.cs b/RGB.NET.Core/RGBSurfaceDeviceEvents.cs
deleted file mode 100644
index 8af4f06f..00000000
--- a/RGB.NET.Core/RGBSurfaceDeviceEvents.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-using System;
-
-namespace RGB.NET.Core
-{
- public partial class RGBSurface
- {
- #region EventHandler
-
- ///
- /// Represents the event-handler of the -event.
- ///
- /// The arguments provided by the event.
- public delegate void ExceptionEventHandler(ExceptionEventArgs args);
-
- ///
- /// Represents the event-handler of the -event.
- ///
- /// The arguments provided by the event.
- public delegate void UpdatingEventHandler(UpdatingEventArgs args);
-
- ///
- /// Represents the event-handler of the -event.
- ///
- /// The arguments provided by the event.
- public delegate void UpdatedEventHandler(UpdatedEventArgs args);
-
- ///
- /// Represents the event-handler of the -event.
- ///
- ///
- public delegate void SurfaceLayoutChangedEventHandler(SurfaceLayoutChangedEventArgs args);
-
- #endregion
-
- #region Events
-
- // ReSharper disable EventNeverSubscribedTo.Global
-
- ///
- /// Occurs when a catched exception is thrown inside the .
- ///
- public event ExceptionEventHandler Exception;
-
- ///
- /// Occurs when the starts updating.
- ///
- public event UpdatingEventHandler Updating;
-
- ///
- /// Occurs when the update is done.
- ///
- public event UpdatedEventHandler Updated;
-
- ///
- /// Occurs when the layout of this changed.
- ///
- public event SurfaceLayoutChangedEventHandler SurfaceLayoutChanged;
-
- // ReSharper restore EventNeverSubscribedTo.Global
-
- #endregion
-
- #region Methods
-
- ///
- /// Handles the needed event-calls for an exception.
- ///
- /// The exception previously thrown.
- private void OnException(Exception ex)
- {
- try
- {
- Exception?.Invoke(new ExceptionEventArgs(ex));
- }
- catch { /* Well ... that's not my fault */ }
- }
-
- ///
- /// Handles the needed event-calls before updating.
- ///
- private void OnUpdating(IUpdateTrigger trigger, CustomUpdateData customData)
- {
- try
- {
- double deltaTime = _deltaTimeCounter.Elapsed.TotalSeconds;
- _deltaTimeCounter.Restart();
- Updating?.Invoke(new UpdatingEventArgs(deltaTime, trigger, customData));
- }
- catch { /* Well ... that's not my fault */ }
- }
-
- ///
- /// Handles the needed event-calls after an update.
- ///
- private void OnUpdated()
- {
- try
- {
- Updated?.Invoke(new UpdatedEventArgs());
- }
- catch { /* Well ... that's not my fault */ }
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Core/RGBSurfaceDeviceLoader.cs b/RGB.NET.Core/RGBSurfaceDeviceLoader.cs
deleted file mode 100644
index df760c32..00000000
--- a/RGB.NET.Core/RGBSurfaceDeviceLoader.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-
-namespace RGB.NET.Core
-{
- public partial class RGBSurface
- {
- #region Methods
-
- // ReSharper disable UnusedMember.Global
- ///
- /// Loads all devices the given by the provided by the give .
- ///
- /// The which provides the to load the devices from.
- /// Specifies which types of devices to load.
- /// Specifies whether the application should request exclusive access of possible or not.
- /// Specifies whether exception during the initialization sequence should be thrown or not.
- public void LoadDevices(IRGBDeviceProviderLoader deviceProviderLoader, RGBDeviceType loadFilter = RGBDeviceType.All,
- bool exclusiveAccessIfPossible = false, bool throwExceptions = false)
- => LoadDevices(deviceProviderLoader.GetDeviceProvider(), loadFilter, exclusiveAccessIfPossible, throwExceptions);
-
- ///
- /// Loads all devices the given is able to provide.
- ///
- /// The to load the devices from.
- /// Specifies which types of devices to load.
- /// Specifies whether the application should request exclusive access of possible or not.
- /// Specifies whether exception during the initialization sequence should be thrown or not.
- public void LoadDevices(IRGBDeviceProvider deviceProvider, RGBDeviceType loadFilter = RGBDeviceType.All, bool exclusiveAccessIfPossible = false, bool throwExceptions = false)
- {
- lock (_deviceProvider)
- {
- if (_deviceProvider.Contains(deviceProvider) || _deviceProvider.Any(x => x.GetType() == deviceProvider.GetType())) return;
-
- List addedDevices = new List();
- if (deviceProvider.IsInitialized || deviceProvider.Initialize(loadFilter, exclusiveAccessIfPossible, throwExceptions))
- {
- _deviceProvider.Add(deviceProvider);
- lock (_devices)
- foreach (IRGBDevice device in deviceProvider.Devices)
- {
- if (_devices.Contains(device)) continue;
-
- addedDevices.Add(device);
-
- device.PropertyChanged += DeviceOnPropertyChanged;
- _devices.Add(device);
- }
- }
-
- if (addedDevices.Any())
- {
- UpdateSurfaceRectangle();
- SurfaceLayoutChanged?.Invoke(new SurfaceLayoutChangedEventArgs(addedDevices, true, false));
- }
- }
- }
-
- ///
- /// Automatically aligns all devices to prevent overlaps.
- ///
- public void AlignDevices()
- {
- double posX = 0;
- foreach (IRGBDevice device in Devices)
- {
- device.Location += new Point(posX, 0);
- posX += device.ActualSize.Width + 1;
- }
- }
-
- // ReSharper restore UnusedMember.Global
-
- private void DeviceOnPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
- {
- UpdateSurfaceRectangle();
- SurfaceLayoutChanged?.Invoke(new SurfaceLayoutChangedEventArgs(new[] { sender as IRGBDevice }, false, true));
- }
-
- #endregion
- }
-}
diff --git a/RGB.NET.Core/Rendering/Brushes/AbstractBrush.cs b/RGB.NET.Core/Rendering/Brushes/AbstractBrush.cs
new file mode 100644
index 00000000..553e53b1
--- /dev/null
+++ b/RGB.NET.Core/Rendering/Brushes/AbstractBrush.cs
@@ -0,0 +1,108 @@
+// ReSharper disable VirtualMemberNeverOverriden.Global
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable VirtualMemberNeverOverridden.Global
+
+using System.Collections.Generic;
+
+namespace RGB.NET.Core;
+
+///
+///
+///
+/// Represents a basic brush.
+///
+public abstract class AbstractBrush : AbstractDecoratable, IBrush
+{
+ #region Properties & Fields
+
+ ///
+ public bool IsEnabled { get; set; } = true;
+
+ ///
+ public RenderMode CalculationMode { get; set; } = RenderMode.Relative;
+
+ ///
+ public float Brightness { get; set; }
+
+ ///
+ public float Opacity { get; set; }
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The overall percentage brightness of the brush. (default: 1.0)
+ /// The overall percentage opacity of the brush. (default: 1.0)
+ protected AbstractBrush(float brightness = 1, float opacity = 1)
+ {
+ this.Brightness = brightness;
+ this.Opacity = opacity;
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Renders the brush to the specified list of .
+ ///
+ /// The bounding box the brush is rendered in.
+ /// The targets to render to.
+ /// A enumerable containing the rendered for each .
+ public virtual IEnumerable<(RenderTarget renderTarget, Color color)> Render(Rectangle rectangle, IEnumerable renderTargets)
+ {
+ foreach (RenderTarget renderTarget in renderTargets)
+ {
+ Color color = GetColorAtPoint(rectangle, renderTarget);
+ ApplyDecorators(rectangle, renderTarget, ref color);
+ FinalizeColor(ref color);
+ yield return (renderTarget, color);
+ }
+ }
+
+ ///
+ /// Applies all attached and enabled decorators to the brush.
+ ///
+ /// The rectangle in which the brush should be drawn.
+ /// The target (key/point) from which the color should be taken.
+ /// The to be modified.
+ protected virtual void ApplyDecorators(in Rectangle rectangle, in RenderTarget renderTarget, ref Color color)
+ {
+ if (Decorators.Count == 0) return;
+
+ lock (Decorators)
+ foreach (IBrushDecorator decorator in Decorators)
+ if (decorator.IsEnabled)
+ decorator.ManipulateColor(rectangle, renderTarget, ref color);
+ }
+
+ ///
+ /// Gets the color at an specific point assuming the brush is drawn into the specified rectangle.
+ ///
+ /// The rectangle in which the brush should be drawn.
+ /// The target (key/point) from which the color should be taken.
+ /// The color at the specified point.
+ protected abstract Color GetColorAtPoint(in Rectangle rectangle, in RenderTarget renderTarget);
+
+ ///
+ /// Finalizes the color by appliing the overall brightness and opacity.
+ ///
+ /// The color to finalize.
+ /// The finalized color.
+ protected virtual void FinalizeColor(ref Color color)
+ {
+ // Since we use HSV to calculate there is no way to make a color 'brighter' than 100%
+ // Be carefull with the naming: Since we use HSV the correct term is 'value' but outside we call it 'brightness'
+ // THIS IS NOT A HSB CALCULATION!!!
+ if (Brightness < 1)
+ color = color.MultiplyHSV(value: Brightness.Clamp(0, 1));
+
+ if (Opacity < 1)
+ color = color.MultiplyA(Opacity.Clamp(0, 1));
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/Brushes/IBrush.cs b/RGB.NET.Core/Rendering/Brushes/IBrush.cs
new file mode 100644
index 00000000..cefa339e
--- /dev/null
+++ b/RGB.NET.Core/Rendering/Brushes/IBrush.cs
@@ -0,0 +1,40 @@
+// ReSharper disable UnusedMemberInSuper.Global
+// ReSharper disable UnusedMember.Global
+// ReSharper disable ReturnTypeCanBeEnumerable.Global
+
+using System.Collections.Generic;
+
+namespace RGB.NET.Core;
+
+///
+/// Represents a basic brush.
+///
+public interface IBrush : IDecoratable
+{
+ ///
+ /// Gets or sets if the is enabled and will be drawn on an update.
+ ///
+ bool IsEnabled { get; set; }
+
+ ///
+ /// Gets or sets the calculation mode used for the rectangle/points used for color-selection in brushes.
+ ///
+ RenderMode CalculationMode { get; set; }
+
+ ///
+ /// Gets or sets the overall percentage brightness of the .
+ ///
+ float Brightness { get; set; }
+
+ ///
+ /// Gets or sets the overall percentage opacity of the .
+ ///
+ float Opacity { get; set; }
+
+ ///
+ /// Performs the render pass of the and calculates the raw for all requested .
+ ///
+ /// The in which the brush should be drawn.
+ /// The (keys/points) of which the color should be calculated.
+ IEnumerable<(RenderTarget renderTarget, Color color)> Render(Rectangle rectangle, IEnumerable renderTargets);
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/Brushes/SolidColorBrush.cs b/RGB.NET.Core/Rendering/Brushes/SolidColorBrush.cs
new file mode 100644
index 00000000..4175db11
--- /dev/null
+++ b/RGB.NET.Core/Rendering/Brushes/SolidColorBrush.cs
@@ -0,0 +1,61 @@
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
+
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents a brush drawing only a single color.
+///
+public class SolidColorBrush : AbstractBrush
+{
+ #region Properties & Fields
+
+ private Color _color;
+ ///
+ /// Gets or sets the drawn by this .
+ ///
+ public Color Color
+ {
+ get => _color;
+ set => SetProperty(ref _color, value);
+ }
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The drawn by this .
+ public SolidColorBrush(Color color)
+ {
+ this.Color = color;
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ protected override Color GetColorAtPoint(in Rectangle rectangle, in RenderTarget renderTarget) => Color;
+
+ #endregion
+
+ #region Operators
+
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
+ public static explicit operator SolidColorBrush(Color color) => new(color);
+
+ ///
+ /// Converts a to a .
+ ///
+ /// The to convert.
+ public static implicit operator Color(SolidColorBrush brush) => brush.Color;
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/Brushes/TextureBrush.cs b/RGB.NET.Core/Rendering/Brushes/TextureBrush.cs
new file mode 100644
index 00000000..4a2de6e7
--- /dev/null
+++ b/RGB.NET.Core/Rendering/Brushes/TextureBrush.cs
@@ -0,0 +1,46 @@
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents a brush drawing a texture.
+///
+public class TextureBrush : AbstractBrush
+{
+ #region Properties & Fields
+
+ private ITexture _texture = ITexture.Empty;
+ ///
+ /// Gets or sets the texture drawn by this brush.
+ ///
+ public ITexture Texture
+ {
+ get => _texture;
+ set => SetProperty(ref _texture, value);
+ }
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The texture drawn by this brush.
+ public TextureBrush(ITexture texture)
+ {
+ this.Texture = texture;
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ protected override Color GetColorAtPoint(in Rectangle rectangle, in RenderTarget renderTarget)
+ {
+ Rectangle normalizedRect = renderTarget.Rectangle / rectangle;
+ return Texture[normalizedRect];
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/RenderMode.cs b/RGB.NET.Core/Rendering/RenderMode.cs
new file mode 100644
index 00000000..4c9199e5
--- /dev/null
+++ b/RGB.NET.Core/Rendering/RenderMode.cs
@@ -0,0 +1,19 @@
+// ReSharper disable UnusedMember.Global
+
+namespace RGB.NET.Core;
+
+///
+/// Contains a list of all brush calculation modes.
+///
+public enum RenderMode
+{
+ ///
+ /// The calculation for will be the rectangle around the the is applied to.
+ ///
+ Relative,
+
+ ///
+ /// The calculation for will always be the whole .
+ ///
+ Absolute
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/RenderTarget.cs b/RGB.NET.Core/Rendering/RenderTarget.cs
new file mode 100644
index 00000000..f8b6d6af
--- /dev/null
+++ b/RGB.NET.Core/Rendering/RenderTarget.cs
@@ -0,0 +1,44 @@
+// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable UnusedAutoPropertyAccessor.Global
+
+namespace RGB.NET.Core;
+
+///
+/// Represents a single target of a brush render.
+///
+public readonly struct RenderTarget
+{
+ #region Properties & Fields
+
+ ///
+ /// Gets the target-.
+ ///
+ public Led Led { get; }
+
+ ///
+ /// Gets the representing the area to render the target-.
+ ///
+ public Rectangle Rectangle { get; }
+
+ ///
+ /// Gets the representing the position to render the target-.
+ ///
+ public Point Point => Rectangle.Center;
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The target-.
+ /// The representing the area to render the target-.
+ public RenderTarget(Led led, Rectangle rectangle)
+ {
+ this.Led = led;
+ this.Rectangle = rectangle;
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/Textures/EmptyTexture.cs b/RGB.NET.Core/Rendering/Textures/EmptyTexture.cs
new file mode 100644
index 00000000..588b62b8
--- /dev/null
+++ b/RGB.NET.Core/Rendering/Textures/EmptyTexture.cs
@@ -0,0 +1,12 @@
+namespace RGB.NET.Core;
+
+internal class EmptyTexture : ITexture
+{
+ #region Properties & Fields
+
+ public Size Size { get; } = new(0, 0);
+ public Color this[in Point point] => Color.Transparent;
+ public Color this[in Rectangle rectangle] => Color.Transparent;
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/Textures/ITexture.cs b/RGB.NET.Core/Rendering/Textures/ITexture.cs
new file mode 100644
index 00000000..8fdd2ae7
--- /dev/null
+++ b/RGB.NET.Core/Rendering/Textures/ITexture.cs
@@ -0,0 +1,31 @@
+namespace RGB.NET.Core;
+
+///
+/// Represents a generic texture.
+///
+public interface ITexture
+{
+ ///
+ /// Gets a empty texture.
+ ///
+ static ITexture Empty => new EmptyTexture();
+
+ ///
+ /// Gets the size of the texture
+ ///
+ Size Size { get; }
+
+ ///
+ /// Gets the color at the specified location.
+ ///
+ /// The location to get the color from.
+ /// The color at the specified location.
+ Color this[in Point point] { get; }
+
+ ///
+ /// Gets the sampled color inside the specified rectangle.
+ ///
+ /// The rectangle to get the color from.
+ /// The sampled color.
+ Color this[in Rectangle rectangle] { get; }
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/Textures/PixelTexture.cs b/RGB.NET.Core/Rendering/Textures/PixelTexture.cs
new file mode 100644
index 00000000..3672e2ce
--- /dev/null
+++ b/RGB.NET.Core/Rendering/Textures/PixelTexture.cs
@@ -0,0 +1,231 @@
+using System;
+using System.Buffers;
+using System.Runtime.CompilerServices;
+
+namespace RGB.NET.Core;
+
+///
+///
+/// Represents a texture made of pixels (like a common image).
+///
+/// The type of the pixels.
+public abstract class PixelTexture : ITexture
+ where T : unmanaged
+{
+ #region Constants
+
+ private const int STACK_ALLOC_LIMIT = 1024;
+
+ #endregion
+
+ #region Properties & Fields
+
+ private readonly int _dataPerPixel;
+ private readonly int _stride;
+
+ ///
+ /// Gets or sets the sampler used to get the color of a region.
+ ///
+ public ISampler Sampler { get; set; }
+
+ ///
+ public Size Size { get; }
+
+ ///
+ /// Gets the underlying pixel data.
+ ///
+ protected abstract ReadOnlySpan Data { get; }
+
+ ///
+ public virtual Color this[in Point point]
+ {
+ get
+ {
+ if (Data.Length == 0) return Color.Transparent;
+
+ int x = (int)MathF.Round((Size.Width - 1) * point.X.Clamp(0, 1));
+ int y = (int)MathF.Round((Size.Height - 1) * point.Y.Clamp(0, 1));
+ return GetColor(GetPixelData(x, y));
+ }
+ }
+
+ ///
+ public virtual Color this[in Rectangle rectangle]
+ {
+ get
+ {
+ if (Data.Length == 0) return Color.Transparent;
+
+ int x = (int)MathF.Round((Size.Width - 1) * rectangle.Location.X.Clamp(0, 1));
+ int y = (int)MathF.Round((Size.Height - 1) * rectangle.Location.Y.Clamp(0, 1));
+ int width = (int)MathF.Round(Size.Width * rectangle.Size.Width.Clamp(0, 1));
+ int height = (int)MathF.Round(Size.Height * rectangle.Size.Height.Clamp(0, 1));
+
+ if ((width == 0) && (rectangle.Size.Width > 0)) width = 1;
+ if ((height == 0) && (rectangle.Size.Height > 0)) height = 1;
+
+ return this[x, y, width, height];
+ }
+ }
+
+ ///
+ /// Gets the sampled color inside the specified region.
+ ///
+ /// The x-location of the region.
+ /// The y-location of the region.
+ /// The with of the region.
+ /// The height of the region.
+ /// The sampled color.
+ public virtual Color this[int x, int y, int width, int height]
+ {
+ get
+ {
+ if (Data.Length == 0) return Color.Transparent;
+
+ if ((width == 0) || (height == 0)) return Color.Transparent;
+ if ((width == 1) && (height == 1)) return GetColor(GetPixelData(x, y));
+
+ int bufferSize = width * height * _dataPerPixel;
+ if (bufferSize <= STACK_ALLOC_LIMIT)
+ {
+ Span buffer = stackalloc T[bufferSize];
+ GetRegionData(x, y, width, height, buffer);
+
+ Span pixelData = stackalloc T[_dataPerPixel];
+ Sampler.Sample(new SamplerInfo(width, height, buffer), pixelData);
+
+ return GetColor(pixelData);
+ }
+ else
+ {
+ T[] rent = ArrayPool.Shared.Rent(bufferSize);
+
+ Span buffer = new Span(rent)[..bufferSize];
+ GetRegionData(x, y, width, height, buffer);
+
+ Span pixelData = stackalloc T[_dataPerPixel];
+ Sampler.Sample(new SamplerInfo(width, height, buffer), pixelData);
+
+ ArrayPool.Shared.Return(rent);
+
+ return GetColor(pixelData);
+ }
+ }
+ }
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The width of the texture.
+ /// The height of the texture.
+ /// The amount of data-entries per pixel.
+ /// The sampler used to get the color of a region.
+ /// The stride of the data or -1 if the width should be used.
+ public PixelTexture(int with, int height, int dataPerPixel, ISampler sampler, int stride = -1)
+ {
+ this._stride = stride == -1 ? with : stride;
+ this._dataPerPixel = dataPerPixel;
+ this.Sampler = sampler;
+
+ Size = new Size(with, height);
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Converts the pixel-data to a color.
+ ///
+ /// The pixel-data to convert.
+ /// The color represented by the specified pixel-data.
+ protected abstract Color GetColor(in ReadOnlySpan pixel);
+
+ ///
+ /// Gets the pixel-data at the specified location.
+ ///
+ /// The x-location.
+ /// The y-location.
+ /// The pixel-data on the specified location.
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ protected virtual ReadOnlySpan GetPixelData(int x, int y) => Data.Slice((y * _stride) + x, _dataPerPixel);
+
+ ///
+ /// Writes the pixel-data of the specified region to the passed buffer.
+ ///
+ /// The x-location of the region to get the data for.
+ /// The y-location of the region to get the data for.
+ /// The width of the region to get the data for.
+ /// The height of the region to get the data for.
+ /// The buffer to write the data to.
+ protected virtual void GetRegionData(int x, int y, int width, int height, in Span buffer)
+ {
+ int dataWidth = width * _dataPerPixel;
+ ReadOnlySpan data = Data;
+ for (int i = 0; i < height; i++)
+ {
+ ReadOnlySpan dataSlice = data.Slice((((y + i) * _stride) + x) * _dataPerPixel, dataWidth);
+ Span destination = buffer.Slice(i * dataWidth, dataWidth);
+ dataSlice.CopyTo(destination);
+ }
+ }
+
+ #endregion
+}
+
+///
+///
+/// Represents a texture made of color-pixels.
+///
+public sealed class PixelTexture : PixelTexture
+{
+ #region Properties & Fields
+
+ private readonly Color[] _data;
+
+ ///
+ protected override ReadOnlySpan Data => _data;
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ /// A is used.
+ ///
+ /// The width of the texture.
+ /// The height of the texture.
+ /// The pixel-data of the texture.
+ public PixelTexture(int with, int height, Color[] data)
+ : this(with, height, data, new AverageColorSampler())
+ { }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The width of the texture.
+ /// The height of the texture.
+ /// The pixel-data of the texture.
+ /// The sampler used to get the color of a region.
+ public PixelTexture(int with, int height, Color[] data, ISampler sampler)
+ : base(with, height, 1, sampler)
+ {
+ this._data = data;
+
+ if (Data.Length != (with * height)) throw new ArgumentException($"Data-Length {Data.Length} differs from the specified size {with}x{height} ({with * height}).");
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ protected override Color GetColor(in ReadOnlySpan pixel) => pixel[0];
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/Textures/Sampler/AverageColorSampler.cs b/RGB.NET.Core/Rendering/Textures/Sampler/AverageColorSampler.cs
new file mode 100644
index 00000000..f93d2120
--- /dev/null
+++ b/RGB.NET.Core/Rendering/Textures/Sampler/AverageColorSampler.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Numerics;
+using System.Runtime.InteropServices;
+
+namespace RGB.NET.Core;
+
+///
+/// Represents a sampled that averages multiple color to a single color.
+///
+///
+/// Averages all components (A, R, G, B) of the colors separately which isn't ideal in cases where multiple different colors are combined.
+///
+public class AverageColorSampler : ISampler
+{
+ #region Constants
+
+ private const int VALUES_PER_COLOR = 4;
+ private static readonly int ELEMENTS_PER_VECTOR = Vector.Count / VALUES_PER_COLOR;
+ private static readonly int VALUES_PER_VECTOR = ELEMENTS_PER_VECTOR * VALUES_PER_COLOR;
+
+ #endregion
+
+ #region Methods
+
+ ///
+ public unsafe void Sample(in SamplerInfo info, in Span pixelData)
+ {
+ int count = info.Width * info.Height;
+ if (count == 0) return;
+
+ float a = 0, r = 0, g = 0, b = 0;
+
+ if (Vector.IsHardwareAccelerated && (info.Data.Length >= Vector.Count))
+ {
+ int chunks = info.Data.Length / ELEMENTS_PER_VECTOR;
+ int missingElements = info.Data.Length - (chunks * ELEMENTS_PER_VECTOR);
+
+ Vector sum = Vector.Zero;
+
+ fixed (Color* colorPtr = &MemoryMarshal.GetReference(info.Data))
+ {
+ Color* current = colorPtr;
+ for (int i = 0; i < chunks; i++)
+ {
+ sum = Vector.Add(sum, *(Vector*)current);
+ current += ELEMENTS_PER_VECTOR;
+ }
+ }
+
+ for (int i = 0; i < VALUES_PER_VECTOR; i += VALUES_PER_COLOR)
+ {
+ a += sum[i];
+ r += sum[i + 1];
+ g += sum[i + 2];
+ b += sum[i + 3];
+ }
+
+ for (int i = 0; i < missingElements; i++)
+ {
+ Color color = info.Data[^(i + 1)];
+
+ a += color.A;
+ r += color.R;
+ g += color.G;
+ b += color.B;
+ }
+ }
+ else
+ {
+ foreach (Color color in info.Data)
+ {
+ a += color.A;
+ r += color.R;
+ g += color.G;
+ b += color.B;
+ }
+ }
+
+ pixelData[0] = new Color(a / count, r / count, g / count, b / count);
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/Textures/Sampler/ISampler.cs b/RGB.NET.Core/Rendering/Textures/Sampler/ISampler.cs
new file mode 100644
index 00000000..9a2c4f10
--- /dev/null
+++ b/RGB.NET.Core/Rendering/Textures/Sampler/ISampler.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace RGB.NET.Core;
+
+///
+/// Represents a generic sampler to combine multipel data entries to a single one.
+///
+/// The type of the data to sample.
+public interface ISampler
+{
+ ///
+ /// Samples the specified data to a single pixel-buffer.
+ ///
+ /// The information containing the data to sample.
+ /// The buffer used to write the resulting pixel to.
+ void Sample(in SamplerInfo info, in Span pixelData);
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Rendering/Textures/Sampler/SamplerInfo.cs b/RGB.NET.Core/Rendering/Textures/Sampler/SamplerInfo.cs
new file mode 100644
index 00000000..ab7a0a19
--- /dev/null
+++ b/RGB.NET.Core/Rendering/Textures/Sampler/SamplerInfo.cs
@@ -0,0 +1,46 @@
+using System;
+
+namespace RGB.NET.Core;
+
+///
+/// Represents the information used to sample data.
+///
+/// The type of the data to sample.
+public readonly ref struct SamplerInfo
+{
+ #region Properties & Fields
+
+ ///
+ /// Gets the width of the region the data comes from.
+ ///
+ public int Width { get; }
+
+ ///
+ /// Gets the height of region the data comes from.
+ ///
+ public int Height { get; }
+
+ ///
+ /// Gets the data to sample.
+ ///
+ public ReadOnlySpan Data { get; }
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The width of the region the data comes from.
+ /// The height of region the data comes from.
+ /// The data to sample.
+ public SamplerInfo(int width, int height, ReadOnlySpan data)
+ {
+ this.Width = width;
+ this.Height = height;
+ this.Data = data;
+ }
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Update/AbstractUpdateTrigger.cs b/RGB.NET.Core/Update/AbstractUpdateTrigger.cs
index e311037a..974e0b08 100644
--- a/RGB.NET.Core/Update/AbstractUpdateTrigger.cs
+++ b/RGB.NET.Core/Update/AbstractUpdateTrigger.cs
@@ -1,38 +1,47 @@
using System;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents a generic update trigger.
+///
+public abstract class AbstractUpdateTrigger : AbstractBindable, IUpdateTrigger
{
- ///
- /// Represents a generic update trigger.
- ///
- public abstract class AbstractUpdateTrigger : AbstractBindable, IUpdateTrigger
- {
- #region Events
+ #region Properties & Fields
+
+ ///
+ public abstract double LastUpdateTime { get; protected set; }
+
+ #endregion
+
+ #region Events
- ///
- public event EventHandler Starting;
- ///
- public event EventHandler Update;
+ ///
+ public event EventHandler? Starting;
+ ///
+ public event EventHandler? Update;
- #endregion
+ #endregion
- #region Methods
+ #region Methods
- ///
- /// Invokes the -event.
- ///
- /// Optional custom-data passed to the subscribers of the .event.
- protected virtual void OnStartup(CustomUpdateData updateData = null) => Starting?.Invoke(this, updateData);
+ ///
+ /// Invokes the -event.
+ ///
+ /// Optional custom-data passed to the subscribers of the .event.
+ protected virtual void OnStartup(CustomUpdateData? updateData = null) => Starting?.Invoke(this, updateData ?? new CustomUpdateData());
+
+ ///
+ /// Invokes the -event.
+ ///
+ /// Optional custom-data passed to the subscribers of the .event.
+ protected virtual void OnUpdate(CustomUpdateData? updateData = null) => Update?.Invoke(this, updateData ?? new CustomUpdateData());
- ///
- /// Invokes the -event.
- ///
- /// Optional custom-data passed to the subscribers of the .event.
- protected virtual void OnUpdate(CustomUpdateData updateData = null) => Update?.Invoke(this, updateData);
+ ///
+ public abstract void Start();
- ///
- public abstract void Dispose();
+ ///
+ public abstract void Dispose();
- #endregion
- }
-}
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Update/CustomUpdateData.cs b/RGB.NET.Core/Update/CustomUpdateData.cs
index 0ecfc7f9..88f734aa 100644
--- a/RGB.NET.Core/Update/CustomUpdateData.cs
+++ b/RGB.NET.Core/Update/CustomUpdateData.cs
@@ -1,51 +1,79 @@
using System.Collections.Generic;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents an index used to identify data in the .
+///
+public static class CustomUpdateDataIndex
+{
+ ///
+ /// Checked by the to see if all LEDs needs to be flushed even if they aren't changed in this update.
+ /// default: false
+ ///
+ public const string FLUSH_LEDS = "flushLeds";
+
+ ///
+ /// Checked by the to see if the surface should be rendered in this update.
+ /// default: true
+ ///
+ public const string RENDER = "render";
+
+ ///
+ /// Checked by the to see if devies should be updated after rendering.
+ /// default: true
+ ///
+ public const string UPDATE_DEVICES = "updateDevices";
+
+ ///
+ /// Used by to indicate heatbeat updates.
+ ///
+ public const string HEARTBEAT = "heartbeat";
+}
+
+///
+/// Represents a set of custom data, each indexed by a string-key.
+///
+public class CustomUpdateData
{
+ #region Properties & Fields
+
+ private Dictionary _data = new();
+
+ #endregion
+
+ #region Indexer
+
///
- /// Represents a set of custom data, each indexed by a string-key.
+ /// Gets or sets the value for a specific key.
///
- public class CustomUpdateData
+ /// The key of the value.
+ /// The value represented by the specified key.
+ public object? this[string key]
{
- #region Properties & Fields
-
- private Dictionary _data = new Dictionary();
-
- #endregion
-
- #region Indexer
-
- ///
- /// Gets or sets the value for a specific key.
- ///
- /// The key of the value.
- /// The value represented by the given key.
- public object this[string key]
- {
- get => _data.TryGetValue(key?.ToUpperInvariant() ?? string.Empty, out object data) ? data : default;
- set => _data[key?.ToUpperInvariant() ?? string.Empty] = value;
- }
-
- #endregion
-
- #region Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CustomUpdateData()
- { }
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// A params-list of tuples containing the key (string) and the value of a specific custom-data.
- public CustomUpdateData(params (string key, object value)[] values)
- {
- foreach ((string key, object value) in values)
- this[key] = value;
- }
-
- #endregion
+ get => _data.TryGetValue(key.ToUpperInvariant(), out object? data) ? data : default;
+ set => _data[key.ToUpperInvariant()] = value;
}
+
+ #endregion
+
+ #region Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CustomUpdateData()
+ { }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// A params-list of tuples containing the key (string) and the value of a specific custom-data.
+ public CustomUpdateData(params (string key, object value)[] values)
+ {
+ foreach ((string key, object value) in values)
+ this[key] = value;
+ }
+
+ #endregion
}
diff --git a/RGB.NET.Core/Update/Devices/DeviceUpdateTrigger.cs b/RGB.NET.Core/Update/Devices/DeviceUpdateTrigger.cs
index 8f4bebae..5d357b6a 100644
--- a/RGB.NET.Core/Update/Devices/DeviceUpdateTrigger.cs
+++ b/RGB.NET.Core/Update/Devices/DeviceUpdateTrigger.cs
@@ -4,149 +4,181 @@
using System.Threading;
using System.Threading.Tasks;
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents an update-trigger used to update devices with a maximum update-rate.
+///
+public class DeviceUpdateTrigger : AbstractUpdateTrigger, IDeviceUpdateTrigger
{
+ #region Properties & Fields
+
+ ///
+ /// Gets or sets the timeout used by the blocking wait for data availability.
+ ///
+ public int Timeout { get; set; } = 100;
+
///
- /// Represents an update-trigger used to update devices with a maximum update-rate.
+ /// Gets the update frequency used by the trigger if not limited by data shortage.
///
- public class DeviceUpdateTrigger : AbstractUpdateTrigger, IDeviceUpdateTrigger
+ public double UpdateFrequency { get; private set; }
+
+ private double _maxUpdateRate;
+ ///
+ /// Gets or sets the maximum update rate of this trigger (is overwriten if the is smaller).
+ /// <= 0 removes the limit.
+ ///
+ public double MaxUpdateRate
{
- #region Properties & Fields
-
- ///
- /// Gets or sets the timeout used by the blocking wait for data availability.
- ///
- public int Timeout { get; set; } = 100;
-
- ///
- /// Gets the update frequency used by the trigger if not limited by data shortage.
- ///
- public double UpdateFrequency { get; private set; }
-
- private double _maxUpdateRate;
- ///
- /// Gets or sets the maximum update rate of this trigger (is overwriten if the is smaller).
- /// <= 0 removes the limit.
- ///
- public double MaxUpdateRate
+ get => _maxUpdateRate;
+ set
{
- get => _maxUpdateRate;
- set
- {
- _maxUpdateRate = value;
- UpdateUpdateFrequency();
- }
+ _maxUpdateRate = value;
+ UpdateUpdateFrequency();
}
+ }
- private double _updateRateHardLimit;
- ///
- /// Gets the hard limit of the update rate of this trigger. Updates will never perform faster then then this value if it's set.
- /// <= 0 removes the limit.
- ///
- public double UpdateRateHardLimit
+ private double _updateRateHardLimit;
+ ///
+ /// Gets the hard limit of the update rate of this trigger. Updates will never perform faster then then this value if it's set.
+ /// <= 0 removes the limit.
+ ///
+ public double UpdateRateHardLimit
+ {
+ get => _updateRateHardLimit;
+ protected set
{
- get => _updateRateHardLimit;
- protected set
- {
- _updateRateHardLimit = value;
- UpdateUpdateFrequency();
- }
+ _updateRateHardLimit = value;
+ UpdateUpdateFrequency();
}
+ }
- protected AutoResetEvent HasDataEvent = new AutoResetEvent(false);
+ ///
+ /// Gets or sets the time in ms after which a refresh-request is sent even if no changes are made in the meantime to prevent the target from timing out or similar problems.
+ /// To disable heartbeats leave it at 0.
+ ///
+ public int HeartbeatTimer { get; set; }
- protected bool IsRunning;
- protected Task UpdateTask;
- protected CancellationTokenSource UpdateTokenSource;
- protected CancellationToken UpdateToken;
+ ///
+ public override double LastUpdateTime { get; protected set; }
- #endregion
+ ///
+ /// Gets or sets the timestamp of the last update.
+ ///
+ protected long LastUpdateTimestamp { get; set; }
- #region Constructors
+ ///
+ /// Gets or sets the event to trigger when new data is available ().
+ ///
+ protected AutoResetEvent HasDataEvent { get; set; } = new(false);
- ///
- /// Initializes a new instance of the class.
- ///
- public DeviceUpdateTrigger()
- { }
+ ///
+ /// Gets or sets a bool indicating if the trigger is currently updating.
+ ///
+ protected bool IsRunning { get; set; }
- ///
- /// Initializes a new instance of the class.
- ///
- /// The hard limit of the update rate of this trigger.
- public DeviceUpdateTrigger(double updateRateHardLimit)
- {
- this.UpdateRateHardLimit = updateRateHardLimit;
- }
+ ///
+ /// Gets or sets the update loop of this trigger.
+ ///
+ protected Task? UpdateTask { get; set; }
- #endregion
+ ///
+ /// Gets or sets the cancellation token source used to create the cancellation token checked by the .
+ ///
+ protected CancellationTokenSource? UpdateTokenSource { get; set; }
- #region Methods
+ ///
+ /// Gets or sets the cancellation token checked by the .
+ ///
+ protected CancellationToken UpdateToken { get; set; }
- ///
- /// Starts the trigger.
- ///
- public void Start()
- {
- if (IsRunning) return;
+ #endregion
- IsRunning = true;
+ #region Constructors
- UpdateTokenSource?.Dispose();
- UpdateTokenSource = new CancellationTokenSource();
- UpdateTask = Task.Factory.StartNew(UpdateLoop, (UpdateToken = UpdateTokenSource.Token), TaskCreationOptions.LongRunning, TaskScheduler.Default);
- }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DeviceUpdateTrigger()
+ { }
- ///
- /// Stops the trigger.
- ///
- public async void Stop()
- {
- if (!IsRunning) return;
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The hard limit of the update rate of this trigger.
+ public DeviceUpdateTrigger(double updateRateHardLimit)
+ {
+ this.UpdateRateHardLimit = updateRateHardLimit;
+ }
+
+ #endregion
+
+ #region Methods
+
+ ///
+ /// Starts the trigger.
+ ///
+ public override void Start()
+ {
+ if (IsRunning) return;
- IsRunning = false;
+ IsRunning = true;
- UpdateTokenSource.Cancel();
+ UpdateTokenSource?.Dispose();
+ UpdateTokenSource = new CancellationTokenSource();
+ UpdateTask = Task.Factory.StartNew(UpdateLoop, (UpdateToken = UpdateTokenSource.Token), TaskCreationOptions.LongRunning, TaskScheduler.Default);
+ }
+
+ ///
+ /// Stops the trigger.
+ ///
+ public async void Stop()
+ {
+ if (!IsRunning) return;
+
+ IsRunning = false;
+
+ UpdateTokenSource?.Cancel();
+ if (UpdateTask != null)
await UpdateTask;
- UpdateTask.Dispose();
- UpdateTask = null;
- }
- protected virtual void UpdateLoop()
- {
- OnStartup();
+ UpdateTask?.Dispose();
+ UpdateTask = null;
+ }
+
+ ///
+ /// The update loop called by the .
+ ///
+ protected virtual void UpdateLoop()
+ {
+ OnStartup();
+
+ using (TimerHelper.RequestHighResolutionTimer())
while (!UpdateToken.IsCancellationRequested)
- {
if (HasDataEvent.WaitOne(Timeout))
- {
- long preUpdateTicks = Stopwatch.GetTimestamp();
-
- OnUpdate();
-
- if (UpdateFrequency > 0)
- {
- double lastUpdateTime = ((Stopwatch.GetTimestamp() - preUpdateTicks) / 10000.0);
- int sleep = (int)((UpdateFrequency * 1000.0) - lastUpdateTime);
- if (sleep > 0)
- Thread.Sleep(sleep);
- }
- }
- }
- }
-
- ///
- public void TriggerHasData() => HasDataEvent.Set();
+ LastUpdateTime = TimerHelper.Execute(() => OnUpdate(), UpdateFrequency * 1000);
+ else if ((HeartbeatTimer > 0) && (LastUpdateTimestamp > 0) && (TimerHelper.GetElapsedTime(LastUpdateTimestamp) > HeartbeatTimer))
+ OnUpdate(new CustomUpdateData().Heartbeat());
+ }
- private void UpdateUpdateFrequency()
- {
- UpdateFrequency = MaxUpdateRate;
- if ((UpdateFrequency <= 0) || ((UpdateRateHardLimit > 0) && (UpdateRateHardLimit < UpdateFrequency)))
- UpdateFrequency = UpdateRateHardLimit;
- }
+ protected override void OnUpdate(CustomUpdateData? updateData = null)
+ {
+ base.OnUpdate(updateData);
+ LastUpdateTimestamp = Stopwatch.GetTimestamp();
+ }
- ///
- public override void Dispose() => Stop();
+ ///
+ public void TriggerHasData() => HasDataEvent.Set();
- #endregion
+ private void UpdateUpdateFrequency()
+ {
+ UpdateFrequency = MaxUpdateRate;
+ if ((UpdateFrequency <= 0) || ((UpdateRateHardLimit > 0) && (UpdateRateHardLimit < UpdateFrequency)))
+ UpdateFrequency = UpdateRateHardLimit;
}
-}
+
+ ///
+ public override void Dispose() => Stop();
+
+ #endregion
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Update/Devices/IDeviceUpdateTrigger.cs b/RGB.NET.Core/Update/Devices/IDeviceUpdateTrigger.cs
index 81303c1d..8fcd758c 100644
--- a/RGB.NET.Core/Update/Devices/IDeviceUpdateTrigger.cs
+++ b/RGB.NET.Core/Update/Devices/IDeviceUpdateTrigger.cs
@@ -1,13 +1,12 @@
-namespace RGB.NET.Core
+namespace RGB.NET.Core;
+
+///
+/// Represents an update trigger used to trigger device-updates.
+///
+public interface IDeviceUpdateTrigger : IUpdateTrigger
{
///
- /// Represents an update trigger used to trigger device-updates.
+ /// Indicates that there's data available to process.
///
- public interface IDeviceUpdateTrigger : IUpdateTrigger
- {
- ///
- /// Indicates that there's data available to process.
- ///
- void TriggerHasData();
- }
-}
+ void TriggerHasData();
+}
\ No newline at end of file
diff --git a/RGB.NET.Core/Update/Devices/IUpdateQueue.cs b/RGB.NET.Core/Update/Devices/IUpdateQueue.cs
new file mode 100644
index 00000000..3a0f63a5
--- /dev/null
+++ b/RGB.NET.Core/Update/Devices/IUpdateQueue.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+
+namespace RGB.NET.Core;
+
+///
+/// Represents a generic update queue.
+///
+/// The identifier used to identify the data processed by this queue.
+/// The type of the data processed by this queue.
+public interface IUpdateQueue : IDisposable
+ where TIdentifier : notnull
+{
+ ///
+ /// Sets or merges the provided data set in the current dataset and notifies the trigger that there is new data available.
+ ///
+ /// The set of data.
+ // ReSharper disable once MemberCanBeProtected.Global
+ void SetData(IEnumerable<(TIdentifier, TData)> dataSet);
+
+ ///
+ /// Resets the current data set.
+ ///
+ void Reset();
+}
+
+///
+/// Represents a generic update queue processing -data using -identifiers.
+///
+public interface IUpdateQueue : IUpdateQueue