/// <summary>
        /// Draws itself on component
        /// </summary>
        /// <param name="g">The graphics to draw</param>
        /// <param name="brush">The drawing brush</param>
        /// <param name="pen">The drawing pen</param>
        public static void DrawOnComponent(IDrawableSymbol sym, Graphics g, Brush brush, Pen pen)
        {
            MathSymbol ms = sym as MathSymbol;
            char       ch = ms.Symbol;

            if ((ch != '\u2216') & (ch != '\u2217') & (ch != '\u8835') & (ch != '\u2295') & (ch != '\u2297')
                | MathFormula.Resources.ContainsKey(ms.Symbol + ""))
            {
                SimpleSymbolDrawable.DrawOnComponent(sym, g, brush, pen);
                return;
            }

            PureDrawableSymbol pDrawable = sym.PureDrawable;

            int    shift = 8;
            string ss    = ms.String;

            if (ss == null)
            {
                ss = "" + ch;
            }
            if (ss.Length == 0)
            {
                ss += ch;
            }
            int w = (int)g.MeasureString(ss, BracketsSymbolDrawable.FontB).Width;
            int h = pDrawable.RectForShow.Height;
            int s = (w < h) ? w : h;

            s = (int)(0.6 * (float)s);
            int x = pDrawable.RectForShow.X + w / 2;
            int y = pDrawable.RectForShow.Y + h / 2;

            if (ch == '\u2216')
            {
                g.DrawLine(PureDrawableSymbol.WidePen, pDrawable.RectForShow.X + shift, pDrawable.RectForShow.Y + pDrawable.RectForShow.Height - shift,
                           pDrawable.RectForShow.X + pDrawable.RectForShow.Width / 2, pDrawable.RectForShow.Y + shift);
                g.DrawLine(PureDrawableSymbol.WidePen, pDrawable.RectForShow.X + pDrawable.RectForShow.Width / 2, pDrawable.RectForShow.Y + shift,
                           pDrawable.RectForShow.X + pDrawable.RectForShow.Width - shift, pDrawable.RectForShow.Y + pDrawable.RectForShow.Height - shift);
            }
            else if (ch == '\u2217')
            {
                g.DrawLine(PureDrawableSymbol.WidePen, pDrawable.RectForShow.X + shift, pDrawable.RectForShow.Y + shift,
                           pDrawable.RectForShow.X + pDrawable.RectForShow.Width / 2, pDrawable.RectForShow.Y + pDrawable.RectForShow.Height - shift);
                g.DrawLine(PureDrawableSymbol.WidePen, pDrawable.RectForShow.X + pDrawable.RectForShow.Width / 2, pDrawable.RectForShow.Y + pDrawable.RectForShow.Height - shift,
                           pDrawable.RectForShow.X + pDrawable.RectForShow.Width - shift, pDrawable.RectForShow.Y + shift);
            }
            else if (ch == '\u8835')
            {
                g.DrawLine(PureDrawableSymbol.WidePen, pDrawable.RectForShow.X + shift, pDrawable.RectForShow.Y + shift,
                           pDrawable.RectForShow.X + pDrawable.RectForShow.Width / 2, pDrawable.RectForShow.Y + pDrawable.RectForShow.Height - shift);
                g.DrawLine(PureDrawableSymbol.WidePen, pDrawable.RectForShow.X + pDrawable.RectForShow.Width / 2, pDrawable.RectForShow.Y + pDrawable.RectForShow.Height - shift,
                           pDrawable.RectForShow.X + pDrawable.RectForShow.Width - shift, pDrawable.RectForShow.Y + shift);
            }
            else if (ch == '\u2295')
            {
                DrawCircledPlus(g, PureDrawableSymbol.LinePen, x, y, s);
            }
            else if (ch == '\u2297')
            {
                DrawCircledProduct(g, PureDrawableSymbol.LinePen, x, y, s);
            }
        }