public SvgText(SvgRoot rootSvg, string text, double x, double y) : base(rootSvg, "text") { CreateElement(); X = x; Y = y; Text = text; }
private void CreateElement(SvgRoot svg) { XmlElement = svg.CreateElement("a"); _href = svg.CreateAttribute("href", "xlink"); XmlElement.Attributes.Append(_href); XmlElement.AppendChild(Text.XmlElement); }
public SvgText(SvgRoot svg, string text, double x, double y) { CreateElement(svg); X = x; Y = y; Text = text; }
public SvgRectangle(SvgRoot rootSvg, double x, double y, double width, double height) : base(rootSvg, "rect") { CreateElement(); X = x; Y = y; Width = width; Height = height; }
public SvgRectangle(SvgRoot svg, double x, double y, double width, double height) { CreateElement(svg); X = x; Y = y; Width = width; Height = height; }
public SvgImage(SvgRoot svg, double x, double y, double width, double height, string href) { CreateElement(svg); X = x; Y = y; Width = width; Height = height; Href = href; }
public SvgImage(SvgRoot rootSvg, double x, double y, double width, double height, string href) : base(rootSvg, "image") { CreateElement(); X = x; Y = y; Width = width; Height = height; Href = href; }
public string ToSvg(double maxWidth) { _renderedSvgDiagram = _sequenceDiagramSvgRenderer.RenderDiagram(this); if (_renderedSvgDiagram.Width > maxWidth) { _renderedSvgDiagram.Scale = maxWidth / _renderedSvgDiagram.Width; } return _renderedSvgDiagram.ToString(); }
private void CreateElement(SvgRoot svg) { XmlElement = svg.CreateElement("path"); _d = svg.CreateAttribute("d"); _stroke = svg.CreateAttribute("stroke"); _strokeWidth = svg.CreateAttribute("stroke-width"); XmlElement.Attributes.Append(_d); XmlElement.Attributes.Append(_stroke); XmlElement.Attributes.Append(_strokeWidth); }
public SvgLink(SvgRoot svg, string text, string href, double x, double y) { Text = new SvgText(svg, text, x, y); CreateElement(svg); Text.Fill = "#1382CE"; Text.OnMouseOut = "this.setAttribute('fill', '#1382CE')"; Text.OnMouseOver = "this.setAttribute('fill', '#F58026')"; Href = href; Text.X = x; Text.Y = y; }
public SvgLink(SvgRoot rootSvg, string text, string href, double x, double y) : base(rootSvg, "a") { Text = new SvgText(rootSvg, text, x, y); CreateElement(); Text.Fill = "#1382CE"; Text.OnMouseOut = "this.setAttribute('fill', '#1382CE')"; Text.OnMouseOver = "this.setAttribute('fill', '#F58026')"; Href = href; Text.X = x; Text.Y = y; }
public SvgRoot RenderConnectedDiagram(ClassDiagram classDiagram) { _classDiagram = classDiagram; _mainDiagram = _classDiagramSvgRenderer.RenderDiagram(_classDiagram); CalculateMainMarginsAndSize(); PositionMainDiagram(); DrawBaseTypes(); DrawImplementedInterfaces(); DrawUsedBy(); DrawUses(); return _mainDiagram; }
private void CreateElement(SvgRoot svg) { XmlElement = svg.CreateElement("polygon"); _points = svg.CreateAttribute("points"); _fill = svg.CreateAttribute("fill"); _stroke = svg.CreateAttribute("stroke"); _strokeWidth = svg.CreateAttribute("stroke-width"); XmlElement.Attributes.Append(_points); XmlElement.Attributes.Append(_fill); XmlElement.Attributes.Append(_stroke); XmlElement.Attributes.Append(_strokeWidth); }
public SvgRoot RenderDiagram(ClassDiagram classDiagram) { _classDiagram = classDiagram; _diagramSize = new Size(CalculateDiagramWidth(classDiagram), CalculateDiagramHeight(classDiagram)); _svgRoot = new SvgRoot() { Width = _diagramSize.Width, Height = _diagramSize.Height }; _svgGraphic = new SvgGraphic(_svgRoot); _svgRoot.Add(_svgGraphic); RenderFrame(); RenderHeader(); RenderAllRowSections(); return _svgRoot; }
public SvgRoot RenderDiagram(SequenceDiagram sequenceDiagram) { _nodeMiddlePoints = new Dictionary<Guid, double>(); _diagramSize = new Size(0.5, 80.5); _svgRoot = new SvgRoot(0, 0); DrawAllNodes(sequenceDiagram); DrawAllDiagramElements(sequenceDiagram); DrawVerticalLines(sequenceDiagram); _svgRoot.Height = _diagramSize.Height; _svgRoot.Width = _diagramSize.Width; return _svgRoot; }
private void CreateElement(SvgRoot svg) { XmlElement = svg.CreateElement("image"); _width = svg.CreateAttribute("width"); _height = svg.CreateAttribute("height"); _x = svg.CreateAttribute("x"); _y = svg.CreateAttribute("y"); _preserveAspectRatio = svg.CreateAttribute("preserveAspectRatio"); _href = svg.CreateAttribute("href", "xlink"); XmlElement.Attributes.Append(_width); XmlElement.Attributes.Append(_height); XmlElement.Attributes.Append(_x); XmlElement.Attributes.Append(_y); XmlElement.Attributes.Append(_preserveAspectRatio); XmlElement.Attributes.Append(_href); }
public SvgRoot RenderDiagram(ClassDiagram classDiagram) { _diagramWidth = CalculateDiagramWidth(classDiagram); _svgRoot = new SvgRoot(100, _diagramWidth); var rect = new SvgRectangle(_svgRoot, 0.5, 0.5, _diagramWidth - 1, 100); rect.StrokeWidth = 1; rect.Stroke = "#979797"; rect.Fill = "#FFFFFF"; _svgRoot.AppendChild(rect.XmlElement); double position = 20.5d; position = RenderHeader(classDiagram, position); position = RenderAllRowSections(classDiagram, position); rect.Height = position - 9.5; _svgRoot.Height = position - 5; return _svgRoot; }
private void CreateElement(SvgRoot svg) { XmlElement = svg.CreateElement("rect"); _height = svg.CreateAttribute("height"); _width = svg.CreateAttribute("width"); _x = svg.CreateAttribute("x"); _y = svg.CreateAttribute("y"); _fill = svg.CreateAttribute("fill"); _stroke = svg.CreateAttribute("stroke"); _strokeWidth = svg.CreateAttribute("stroke-width"); XmlElement.Attributes.Append(_height); XmlElement.Attributes.Append(_width); XmlElement.Attributes.Append(_x); XmlElement.Attributes.Append(_y); XmlElement.Attributes.Append(_fill); XmlElement.Attributes.Append(_stroke); XmlElement.Attributes.Append(_strokeWidth); }
private void CreateElement(SvgRoot svg) { XmlElement = svg.CreateElement("text"); _x = svg.CreateAttribute("x"); _y = svg.CreateAttribute("y"); _fill = svg.CreateAttribute("fill"); _style = svg.CreateAttribute("style"); _textAnchor = svg.CreateAttribute("text-anchor"); _fontFamily = svg.CreateAttribute("font-family"); _fontSize = svg.CreateAttribute("font-size"); _onMouseOver = svg.CreateAttribute("onmouseover"); _onMouseOut = svg.CreateAttribute("onmouseout"); XmlElement.Attributes.Append(_x); XmlElement.Attributes.Append(_y); XmlElement.Attributes.Append(_fill); XmlElement.Attributes.Append(_style); XmlElement.Attributes.Append(_textAnchor); XmlElement.Attributes.Append(_fontFamily); XmlElement.Attributes.Append(_fontSize); XmlElement.Attributes.Append(_onMouseOver); XmlElement.Attributes.Append(_onMouseOut); }
public SvgGraphic(SvgRoot rootSvg) : base(rootSvg, "g") { }
public Size GetSvgSize() { _renderedSvgDiagram = _classDiagramSvgRenderer.RenderConnectedDiagram(this); return new Size((int)_renderedSvgDiagram.Width, (int)_renderedSvgDiagram.Height); }
public SvgElement(SvgRoot rootSvg, string elementName) : base(string.Empty, elementName, string.Empty, rootSvg) { _rootSvg = rootSvg; }
public SDTemplate ToSvg() { _renderedSvgDiagram = _classDiagramSvgRenderer.RenderConnectedDiagram(this); return new SDTemplate(_renderedSvgDiagram.ToString()); }
public SvgPolygon(SvgRoot rootSvg, string points) : base(rootSvg, "polygon") { CreateElement(); Points = points; }
public SvgPolygon(SvgRoot svg, string points) { CreateElement(svg); Points = points; }
public SvgPath(SvgRoot rootSvg, string d) : base(rootSvg, "path") { CreateElement(); D = d; }
public SDTemplate ToSvg() { _renderedSvgDiagram = _sequenceDiagramSvgRenderer.RenderDiagram(this); return new SDTemplate(_renderedSvgDiagram.ToString()); }
public Size GetSvgSize() { _renderedSvgDiagram = _sequenceDiagramSvgRenderer.RenderDiagram(this); return new Size((int)_renderedSvgDiagram.Width, (int)_renderedSvgDiagram.Height); }
public SvgPath(SvgRoot svg, string d) { CreateElement(svg); D = d; }