Exemple #1
0
        protected override void OnDirect2DInitialized(Direct2DGraphics g)
        {
            theme = Theme.CreateResourcesForGraphics(g);

            bmpTracks[Channel.Square1]  = g.ConvertBitmap(Resources.Square);
            bmpTracks[Channel.Square2]  = g.ConvertBitmap(Resources.Square);
            bmpTracks[Channel.Triangle] = g.ConvertBitmap(Resources.Triangle);
            bmpTracks[Channel.Noise]    = g.ConvertBitmap(Resources.Noise);
            bmpTracks[Channel.DPCM]     = g.ConvertBitmap(Resources.DPCM);

            bmpEdit      = g.ConvertBitmap(Resources.EditSmall);
            bmpGhostNote = g.ConvertBitmap(Resources.GhostSmall);

            playPositionBrush = g.CreateSolidBrush(new RawColor4(Theme.LightGreyFillColor1.R, Theme.LightGreyFillColor1.G, Theme.LightGreyFillColor1.B, 0.75f));

            whiteKeyBrush        = g.CreateHorizontalGradientBrush(0, TrackNameSizeX, Theme.LightGreyFillColor1, Theme.LightGreyFillColor2);
            patternHeaderBrush   = g.CreateVerticalGradientBrush(0, PatternHeaderSizeY, Theme.LightGreyFillColor1, Theme.LightGreyFillColor2);
            selectedPatternBrush = g.CreateSolidBrush(new RawColor4(Theme.LightGreyFillColor1.R, Theme.LightGreyFillColor1.G, Theme.LightGreyFillColor1.B, 0.5f));
        }
Exemple #2
0
        public static Theme CreateResourcesForGraphics(Direct2DGraphics g)
        {
            var theme = new Theme();

            theme.BlackBrush          = g.CreateSolidBrush(BlackColor);
            theme.LightGreyFillBrush1 = g.CreateSolidBrush(LightGreyFillColor1);
            theme.LightGreyFillBrush2 = g.CreateSolidBrush(LightGreyFillColor2);
            theme.DarkGreyLineBrush1  = g.CreateSolidBrush(DarkGreyLineColor1);
            theme.DarkGreyLineBrush2  = g.CreateSolidBrush(DarkGreyLineColor2);
            theme.DarkGreyFillBrush1  = g.CreateSolidBrush(DarkGreyFillColor1);
            theme.DarkGreyFillBrush2  = g.CreateSolidBrush(DarkGreyFillColor2);

            return(theme);
        }