1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00

Small fixes

This commit is contained in:
Darth Affe 2023-04-13 01:24:53 +02:00
parent 70ccc4d575
commit 4ee55c6725
2 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@ using System.Buffers;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace RGB.NET.Core;
@ -120,6 +121,7 @@ public abstract class AbstractRGBDevice<TDeviceInfo> : Placeable, IRGBDevice<TDe
/// </remarks>
/// <param name="leds">The enumerable of leds to convert.</param>
/// <returns>The enumerable of custom data and color tuples for the specified leds.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
protected (object key, Color color) GetUpdateData(Led led)
{
Color color = led.Color;

View File

@ -217,8 +217,7 @@ public sealed class RGBSurface : AbstractBindable, IDisposable
Rectangle brushRectangle = new(leds);
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))));
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)));