コード例 #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
ファイル: DisplayScene.cs プロジェクト: priyanr/Vixen
 private void RenderPixel(D2D.RenderTarget rt, PreviewPixel p, D2D.SolidColorBrush brush)
 {
     //if (p.PixelSize <= 4)
     //rt.DrawLine(new D2D.Point2F(p.X, p.Y), new D2D.Point2F(p.X + 1, p.Y + 1), brush, p.PixelSize);
     //else
     //rt.FillEllipse(new D2D.Ellipse() { Point = new D2D.Point2F(p.X, p.Y), RadiusX = p.PixelSize / 2, RadiusY = p.PixelSize / 2 }, brush);
 }
コード例 #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));
            neutralBrush = this.RenderTarget.CreateSolidColorBrush(new D2D.ColorF(0.17f, 0.48f, 0.71f));

            //base.OnCreateResources(); // Call this last to start the animation
        }
コード例 #4
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();
        }
コード例 #5
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
        }