Added key-rectangle to BrushRenderTarget

This commit is contained in:
DarthAffe committed 2016-11-06 17:38:01 +01:00
1 parent 74824e3363
commit deb043b6b2
3 files changed
+26 -6

No files matched your search

+11 -3
View File
@@ -3,6 +3,7 @@
using System.Drawing;
using CUE.NET.Devices.Generic.Enums;
using CUE.NET.Helper;
namespace CUE.NET.Brushes
{
@@ -18,6 +19,11 @@ namespace CUE.NET.Brushes
/// </summary>
public CorsairLedId LedId { get; }
/// <summary>
/// Gets the rectangle representing the area to render the target-LED.
/// </summary>
public RectangleF Rectangle { get; }
/// <summary>
/// Gets the point representing the position to render the target-LED.
/// </summary>
@@ -31,11 +37,13 @@ namespace CUE.NET.Brushes
/// Initializes a new instance of the <see cref="BrushRenderTarget"/> class.
/// </summary>
/// <param name="ledId">The ID of the target-LED.</param>
/// <param name="point">The point representing the position to render the target-LED.</param>
public BrushRenderTarget(CorsairLedId ledId, PointF point)
/// <param name="rectangle">The rectangle representing the area to render the target-LED.</param>
public BrushRenderTarget(CorsairLedId ledId, RectangleF rectangle)
{
this.Point = point;
this.Rectangle = rectangle;
this.LedId = ledId;
Point = rectangle.GetCenter();
}
#endregion