mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 01:58:30 +00:00
Small fixes
This commit is contained in:
parent
70ccc4d575
commit
4ee55c6725
@ -7,6 +7,7 @@ using System.Buffers;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace RGB.NET.Core;
|
namespace RGB.NET.Core;
|
||||||
|
|
||||||
@ -120,6 +121,7 @@ public abstract class AbstractRGBDevice<TDeviceInfo> : Placeable, IRGBDevice<TDe
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="leds">The enumerable of leds to convert.</param>
|
/// <param name="leds">The enumerable of leds to convert.</param>
|
||||||
/// <returns>The enumerable of custom data and color tuples for the specified leds.</returns>
|
/// <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)
|
protected (object key, Color color) GetUpdateData(Led led)
|
||||||
{
|
{
|
||||||
Color color = led.Color;
|
Color color = led.Color;
|
||||||
|
|||||||
@ -217,8 +217,7 @@ public sealed class RGBSurface : AbstractBindable, IDisposable
|
|||||||
Rectangle brushRectangle = new(leds);
|
Rectangle brushRectangle = new(leds);
|
||||||
Point offset = new(-brushRectangle.Location.X, -brushRectangle.Location.Y);
|
Point offset = new(-brushRectangle.Location.X, -brushRectangle.Location.Y);
|
||||||
brushRectangle = brushRectangle.SetLocation(new Point(0, 0));
|
brushRectangle = brushRectangle.SetLocation(new Point(0, 0));
|
||||||
render = brush.Render(brushRectangle,
|
render = brush.Render(brushRectangle, leds.Select(led => new RenderTarget(led, led.AbsoluteBoundary.Translate(offset))));
|
||||||
leds.Select(led => new RenderTarget(led, led.AbsoluteBoundary.Translate(offset))));
|
|
||||||
break;
|
break;
|
||||||
case RenderMode.Absolute:
|
case RenderMode.Absolute:
|
||||||
render = brush.Render(Boundary, leds.Select(led => new RenderTarget(led, led.AbsoluteBoundary)));
|
render = brush.Render(Boundary, leds.Select(led => new RenderTarget(led, led.AbsoluteBoundary)));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user