예제 #1
0
        protected override void OnCreateResources()
        {
            // We don't need to free any resources because the base class will
            // call OnFreeResources if necessary before calling this method.
            //this.redBrush = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(1, 0, 0));
            float[] t;
            sst = Factory.CreateStrokeStyle(new D2D.StrokeStyleProperties()
            {
                DashStyle = D2D.DashStyle.Dash
            });
            foreach (string key in _st.GetColorDictionary().Keys)
            {
                t = _st.GetColorDictionary()[key];
                brushes.Add(key, this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(t[0], t[1], t[2], t[3])));
                if (!halobrushes.ContainsKey(key))
                {
                    halobrushes.Add(key, this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(t[0], t[1], t[2], 0.2f)));
                }
            }

            neutralBrush = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(0.8f, 0.8f, 0.8f));
            regionBrush  = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(1.0f, 0.8f, 0.8f, 0.3f));

            //base.OnCreateResources(); // Call this last to start the animation
        }
예제 #2
0
        protected override void OnCreateResources()
        {
            float[] t;
            foreach (string key in _st.GetColorDictionary().Keys)
            {
                t = _st.GetColorDictionary()[key];
                brushes.Add(key, this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(t[0], t[1], t[2], t[3])));
            }

            neutralBrush     = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(0.8f, 0.0f, 0.0f, 0.3f));
            alternativeBrush = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(0.8f, 0.8f, 0.8f, 0.3f));
            base.OnCreateResources();
        }
예제 #3
0
        protected override void OnCreateResources()
        {
            // We don't need to free any resources because the base class will
            // call OnFreeResources if necessary before calling this method.
            //this.redBrush = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(1, 0, 0));
            float[] t;
            foreach (string key in _st.GetColorDictionary().Keys)
            {
                t = _st.GetColorDictionary()[key];
                brushes.Add(key, this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(t[0], t[1], t[2], t[3])));
            }

            neutralBrush = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(0.8f, 0.8f, 0.8f, 0.5f));
            //neutralBrush = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(0.95f, 0.95f, 0.95f, 0.5f));
            //neutralBrush = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(0.7f, 0.7f, 0.7f));
            //neutralBrush = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(1.0f, 0.2f, 0.2f, 0.5f));
            base.OnCreateResources(); // Call this last to start the animation
        }