Nearly fully implemented surface rearranging

This commit is contained in:
SpoinkyNL committed 2019-08-25 22:26:10 +02:00
1 parent 171f63a1db
commit 9184bbdec2
9 files changed
+175 -547

No files matched your search

@@ -23,8 +23,13 @@ namespace Artemis.Core.RGB.NET
public Color ManipulateColor(Rectangle rectangle, BrushRenderTarget renderTarget, Color color)
{
var point = renderTarget.Point;
var pixel = _bitmap.GetPixel((int) point.X, (int) point.Y);
return new Color(pixel.A, pixel.R, pixel.G, pixel.B);
if (_bitmap.Width - 1 >= point.X && _bitmap.Height - 1 >= point.Y)
{
var pixel = _bitmap.GetPixel((int) point.X, (int) point.Y);
return new Color(pixel.A, pixel.R, pixel.G, pixel.B);
}
return new Color(0, 0, 0);
}
public Graphics GetGraphics()