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

Compare commits

..

No commits in common. "877129ab867830fe81764db3f55d560170460c37" and "2d07d85330abac159bdc92a53ac9c8be31af3b81" have entirely different histories.

2 changed files with 5 additions and 8 deletions

View File

@ -87,7 +87,7 @@ public class Led : Placeable
if (RequestedColor.HasValue)
RequestedColor = RequestedColor.Value + value;
else
RequestedColor = _color + value;
RequestedColor = value;
}
}

View File

@ -43,8 +43,8 @@ public abstract class PixelTexture<T> : ITexture
{
if (Data.Length == 0) return Color.Transparent;
int x = (int)MathF.Round((Size.Width - 1) * point.X.Clamp(0, 1));
int y = (int)MathF.Round((Size.Height - 1) * point.Y.Clamp(0, 1));
int x = (int)MathF.Round(Size.Width * point.X.Clamp(0, 1));
int y = (int)MathF.Round(Size.Height * point.Y.Clamp(0, 1));
return GetColor(GetPixelData(x, y));
}
}
@ -56,14 +56,11 @@ public abstract class PixelTexture<T> : ITexture
{
if (Data.Length == 0) return Color.Transparent;
int x = (int)MathF.Round((Size.Width - 1) * rectangle.Location.X.Clamp(0, 1));
int y = (int)MathF.Round((Size.Height - 1) * rectangle.Location.Y.Clamp(0, 1));
int x = (int)MathF.Round(Size.Width * rectangle.Location.X.Clamp(0, 1));
int y = (int)MathF.Round(Size.Height * rectangle.Location.Y.Clamp(0, 1));
int width = (int)MathF.Round(Size.Width * rectangle.Size.Width.Clamp(0, 1));
int height = (int)MathF.Round(Size.Height * rectangle.Size.Height.Clamp(0, 1));
if ((width == 0) && (rectangle.Size.Width > 0)) width = 1;
if ((height == 0) && (rectangle.Size.Height > 0)) height = 1;
return this[x, y, width, height];
}
}