mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Syntax style
This commit is contained in:
parent
36058efc4d
commit
52809a6c9a
@ -102,9 +102,9 @@ namespace Artemis.Core
|
|||||||
Point scaledLocation = renderTarget.Point * Scale;
|
Point scaledLocation = renderTarget.Point * Scale;
|
||||||
if (scaledLocation.X < Bitmap.Width && scaledLocation.Y < Bitmap.Height)
|
if (scaledLocation.X < Bitmap.Width && scaledLocation.Y < Bitmap.Height)
|
||||||
{
|
{
|
||||||
var pixel = Bitmap.GetPixel(scaledLocation.X.RoundToInt(), scaledLocation.Y.RoundToInt()).ToRgbColor();
|
Color pixel = Bitmap.GetPixel(scaledLocation.X.RoundToInt(), scaledLocation.Y.RoundToInt()).ToRgbColor();
|
||||||
var artemisDevice = Surface?.GetArtemisLed(renderTarget.Led)?.Device;
|
ArtemisDevice? artemisDevice = Surface?.GetArtemisLed(renderTarget.Led)?.Device;
|
||||||
if (artemisDevice is not null)
|
if (artemisDevice != null)
|
||||||
pixel = pixel.MultiplyRGB(artemisDevice.RedScale, artemisDevice.GreenScale, artemisDevice.BlueScale);
|
pixel = pixel.MultiplyRGB(artemisDevice.RedScale, artemisDevice.GreenScale, artemisDevice.BlueScale);
|
||||||
RenderedTargets[renderTarget] = pixel;
|
RenderedTargets[renderTarget] = pixel;
|
||||||
}
|
}
|
||||||
@ -154,9 +154,10 @@ namespace Artemis.Core
|
|||||||
// Bitmap.SetPixel(x, y, new SKColor(0, 255, 0));
|
// Bitmap.SetPixel(x, y, new SKColor(0, 255, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var pixel = new Color(a / sampleSize, r / sampleSize, g / sampleSize, b / sampleSize);
|
|
||||||
|
|
||||||
var artemisDevice = Surface?.GetArtemisLed(renderTarget.Led)?.Device;
|
Color pixel = new Color(a / sampleSize, r / sampleSize, g / sampleSize, b / sampleSize);
|
||||||
|
|
||||||
|
ArtemisDevice? artemisDevice = Surface?.GetArtemisLed(renderTarget.Led)?.Device;
|
||||||
if (artemisDevice is not null)
|
if (artemisDevice is not null)
|
||||||
pixel = pixel.MultiplyRGB(artemisDevice.RedScale, artemisDevice.GreenScale, artemisDevice.BlueScale);
|
pixel = pixel.MultiplyRGB(artemisDevice.RedScale, artemisDevice.GreenScale, artemisDevice.BlueScale);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user