public override string ToSVG() { return(String.Format("<text x=\"{0}\" y=\"{1}\" font-family=\"arial\" font-size=\"{2}\" fill=\"{3}\">{4}</text>", Vertices[0].Item1, Vertices[0].Item2, FontSize, Config.Color.IsEmpty ? "#00000000" : ShapeUtils.ColorToHex(Config.Color), InnerText)); }
public override string ToSVG() { return(String.Format("<circle cx = \"{0}\" cy = \"{1}\" r = \"{2}\" stroke = \"{3}\" fill = \"{4}\" stroke-width = \"{5}\" transform = \"rotate({6}) translate({7} {8}) scale({9} {10})\"/>", Vertices[0].Item1, Vertices[0].Item2, Radius.ToString(CultureInfo.InvariantCulture.NumberFormat), ShapeUtils.ColorToHex(Config.BorderColor), Config.Color.IsEmpty ? "#00000000" : ShapeUtils.ColorToHex(Config.Color), Config.Thickness, Config.Rotation, Config.OffsetX, Config.OffsetY, Config.ScaleX == 0 ? 1 : Config.ScaleX, Config.ScaleY == 0 ? 1 : Config.ScaleY)); }
public override string ToSVG() { return(String.Format("<line x1 = \"{0}\" x2 = \"{1}\" y1 = \"{2}\" y2 = \"{3}\" stroke = \"{4}\" fill = \"{5}\" stroke-width = \"{6}\" transform = \"rotate({7}) translate({8} {9}) scale({10} {11})\"/>", Vertices[0].Item1, Vertices[1].Item1, Vertices[0].Item2, Vertices[1].Item2, ShapeUtils.ColorToHex(Config.BorderColor), Config.Color.IsEmpty ? "#00000000" : ShapeUtils.ColorToHex(Config.Color), Config.Thickness, Config.Rotation, Config.OffsetX, Config.OffsetY, Config.ScaleX == 0 ? 1 : Config.ScaleX, Config.ScaleY == 0 ? 1 : Config.ScaleY)); }
public override string ToSVG() { string polygon = ""; foreach (Tuple <double, double> point in Vertices) { polygon += String.Format("{0} {1}", point.Item1, point.Item2); } return(String.Format("<polygon points=\"{0}\" stroke = \"{1}\" fill = \"{2}\" stroke-width = \"{3}\" transform = \"rotate({4}) translate({5} {6}) scale({7} {8})\"/>", polygon, ShapeUtils.ColorToHex(Config.BorderColor), Config.Color.IsEmpty ? "#00000000" : ShapeUtils.ColorToHex(Config.Color), Config.Thickness, Config.Rotation, Config.OffsetX, Config.OffsetY, Config.ScaleX == 0 ? 1 : Config.ScaleX, Config.ScaleY == 0 ? 1 : Config.ScaleY)); }