protected override CorsairColor GetColorAtPoint(RectangleF rectangle, BrushRenderTarget renderTarget)
{
if (Image == null || Image.Width == 0 || Image.Height == 0)
return CorsairColor.Transparent;
//TODO DarthAffe 16.03.2016: Refactor to allow more scale-/interpolation-modes
float scaleX = Image.Width / rectangle.Width;
float scaleY = Image.Height / rectangle.Height;
int x = (int)(renderTarget.Point.X * scaleX);
int y = (int)(renderTarget.Point.Y * scaleY);
x = Math.Max(0, Math.Min(x, Image.Width - 1));
y = Math.Max(0, Math.Min(y, Image.Height - 1));
return Image.GetPixel(x, y);
}