Ejemplo n.º 1
0
        /// <summary>
        /// The target method for paintChemModel, paintReaction, and paintMolecule.
        /// </summary>
        /// <param name="drawVisitor">the visitor to draw with</param>
        /// <param name="diagram">the IRenderingElement tree to render</param>
        protected virtual void Paint(IDrawVisitor drawVisitor, IRenderingElement diagram)
        {
            if (diagram == null)
            {
                return;
            }

            // cache the diagram for quick-redraw
            this.cachedDiagram = diagram;

            fontManager.FontName   = rendererModel.GetFontName();
            fontManager.FontWeight = rendererModel.GetUsedFontStyle();

            drawVisitor.FontManager   = this.fontManager;
            drawVisitor.RendererModel = this.rendererModel;
            diagram.Accept(drawVisitor, this.transform);
        }