예제 #1
0
        protected override Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget)
        {
            if ((KeyColors != null) &&
                LedMapping.TryGetValue(renderTarget.Led.Id, out DeviceKeys key) &&
                KeyColors.TryGetValue(key, out System.Drawing.Color color))
            {
                return(new Color(color.A, color.R, color.G, color.B));
            }

            return(Color.Transparent);
        }
예제 #2
0
        protected override Color GetColorAtPoint(Rectangle rectangle, BrushRenderTarget renderTarget)
        {
            if (KeyColors != null &&
                LedMapping.TryGetValue(renderTarget.Led.Id, out DeviceKeys key) &&
                KeyColors.TryGetValue(key, out System.Drawing.Color color))
            {
                var c = ColorUtils.CorrectWithAlpha(color);
                return(new Color(c.A, c.R, c.G, c.B));
            }

            return(Color.Transparent);
        }