Ejemplo n.º 1
0
        public void print(Rectangle rect, PaintMode printMode, Color MathColor)
        {
            try
            {
                if (box == null)
                {
                    return;
                }

                box.Draw(this, printMode, MathColor);

                NodesList nodesList  = GetChildrenNodes();
                Node      node       = nodesList.Next();
                bool      notOnWhite = false;

                while (node != null)
                {
                    if (!notOnWhite &&
                        (((type_.type == ElementType.Math) ||
                          (type_.type == ElementType.Mtd)) ||
                         (type_.type == ElementType.Mrow)))
                    {
                        notOnWhite = node.NotOnWhite();
                    }
                    if (node.isVisible && (node.type_.type != ElementType.Mphantom))
                    {
                        node.print(rect, printMode, MathColor);
                    }
                    node = nodesList.Next();
                }

                if ((printMode == PaintMode.BACKGROUND))
                {
                    if (!notOnWhite ||
                        (((type_.type != ElementType.Math) &&
                          (type_.type != ElementType.Mtd)) &&
                         (type_.type != ElementType.Mrow)))
                    {
                        return;
                    }
                    ((BaseBox)box).painter_.FillBackground(this);
                }
            }
            catch
            {
            }
        }