Пример #1
0
        private void DrawEllipseShadow(Steema.TeeChart.Drawing.Graphics3D g, Color AColor, Rectangle R)
        {
            int    x, y, t;
            int    Steps;
            double tmpW, tmpH;

            g.Pen.Visible   = false;
            g.Brush.Solid   = true;
            g.Brush.Visible = true;
            g.Brush.Color   = AColor;


            x = (R.Left + R.Right) / 2;
            y = (R.Top + R.Bottom) / 2;

            Steps = Math.Min(x, y) / 10;
            tmpW  = 0.5 * (R.Right - R.Left) / Steps;
            tmpH  = 0.5 * (R.Bottom - R.Top) / Steps;

            for (t = Steps; t > 0; --t)
            {
                Graphics3D.ApplyDark(ref AColor, 8);
                g.Brush.Color = AColor;
                R             = Rectangle.FromLTRB(x - Convert.ToInt32(t * tmpW), y - Convert.ToInt32(t * tmpH), x + Convert.ToInt32(t * tmpW), y + Convert.ToInt32(t * tmpH));
                g.Ellipse(R);
            }
        }