Beispiel #1
0
        public SvgRoot RenderConnectedDiagram(ClassDiagram classDiagram)
        {
            _classDiagram = classDiagram;
            _mainDiagram  = _classDiagramSvgRenderer.RenderDiagram(_classDiagram);

            CalculateMainMarginsAndSize();
            PositionMainDiagram();
            DrawBaseTypes();
            DrawImplementedInterfaces();
            DrawUsedBy();
            DrawUses();

            return(_mainDiagram);
        }
Beispiel #2
0
        public string ToSvg(double maxWidth)
        {
            _renderedSvgDiagram = _classDiagramSvgRenderer.RenderDiagram(this);

            if (_renderedSvgDiagram.Width > maxWidth)
            {
                _renderedSvgDiagram.Scale = maxWidth / _renderedSvgDiagram.Width;
            }

            return(_renderedSvgDiagram.ToString());
        }