Example #1
0
        Color ShadedColor(Rect2d tile, Frame frame, Color color, bool shade, bool underMouse)
        {
            if (underMouse)
            {
                var position = tile.center;
                frame.Polygon(color,
                              Rect2d.FromCenterAndSize(position, new Vector2d(FrameworkSettings.Timeline.TileLength / 6))
                              - new Vector2d(FrameworkSettings.Timeline.TileWidth * 0.8, 0));
            }

            //  if(underMouse)
            //      return Color.FromArgb(255, color.R, color.G, color.B);

            if (!shade)
            {
                return(Color.FromArgb(150, color.R, color.G, color.B));
            }
            return(Color.FromArgb(80, color.R, color.G, color.B));
        }