mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-11 13:06:24 +00:00
Moved brush calculation mode to the brush
This makes obviously more sense ...
This commit is contained in:
1 parent
286a6ea284
commit
a783e52c41
3 files changed
+13
-6
No files matched your search
@@ -1,6 +1,7 @@
|
|||||||
// ReSharper disable VirtualMemberNeverOverriden.Global
|
// ReSharper disable VirtualMemberNeverOverriden.Global
|
||||||
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using CUE.NET.Devices.Keyboard.Enums;
|
||||||
using CUE.NET.Helper;
|
using CUE.NET.Helper;
|
||||||
|
|
||||||
namespace CUE.NET.Brushes
|
namespace CUE.NET.Brushes
|
||||||
@@ -12,6 +13,11 @@ namespace CUE.NET.Brushes
|
|||||||
{
|
{
|
||||||
#region Properties & Fields
|
#region Properties & Fields
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the calculation mode used for the rectangle/points used for color-selection in brushes.
|
||||||
|
/// </summary>
|
||||||
|
public BrushCalculationMode BrushCalculationMode { get; set; } = BrushCalculationMode.Relative;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the overall percentage brightness of the brush.
|
/// Gets or sets the overall percentage brightness of the brush.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// ReSharper disable UnusedMemberInSuper.Global
|
// ReSharper disable UnusedMemberInSuper.Global
|
||||||
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using CUE.NET.Devices.Keyboard.Enums;
|
||||||
|
|
||||||
namespace CUE.NET.Brushes
|
namespace CUE.NET.Brushes
|
||||||
{
|
{
|
||||||
@@ -9,6 +10,11 @@ namespace CUE.NET.Brushes
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IBrush
|
public interface IBrush
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the calculation mode used for the rectangle/points used for color-selection in brushes.
|
||||||
|
/// </summary>
|
||||||
|
BrushCalculationMode BrushCalculationMode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the overall percentage brightness of the brush.
|
/// Gets or sets the overall percentage brightness of the brush.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -106,11 +106,6 @@ namespace CUE.NET.Devices.Keyboard
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int ZIndex { get; set; } = 0;
|
public int ZIndex { get; set; } = 0;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the calculation mode used for the rectangle/points used for color-selection in brushes.
|
|
||||||
/// </summary>
|
|
||||||
public BrushCalculationMode BrushCalculationMode { get; set; } = BrushCalculationMode.Relative;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating if the keyboard has an active effect to deal with or not.
|
/// Gets a value indicating if the keyboard has an active effect to deal with or not.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -175,7 +170,7 @@ namespace CUE.NET.Devices.Keyboard
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
switch (BrushCalculationMode)
|
switch (brush.BrushCalculationMode)
|
||||||
{
|
{
|
||||||
case BrushCalculationMode.Relative:
|
case BrushCalculationMode.Relative:
|
||||||
RectangleF brushRectangle = RectangleHelper.CreateRectangleFromRectangles(keys.Select(x => x.KeyRectangle));
|
RectangleF brushRectangle = RectangleHelper.CreateRectangleFromRectangles(keys.Select(x => x.KeyRectangle));
|
||||||
|
|||||||
Reference in new issue
Block a user