Skip to content

Commit

Permalink
Update SvgGraphWriter.cs
Browse files Browse the repository at this point in the history
use the fontsize of the label
  • Loading branch information
levnach authored Jul 22, 2024
1 parent 2b1c6dc commit 29b730c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions GraphLayout/Drawing/SvgGraphWriter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
Expand Down Expand Up @@ -156,12 +156,12 @@ protected virtual void WriteLabel(Label label)
{
if (!LabelIsValid(label))
return;
//need to remove these hecks. TODO
//need to remove the hack. TODO
const double yScaleAdjustment = 1.5;

var x = label.Center.X - label.Width / 2;
var y = label.Center.Y + label.Height / (2 * yScaleAdjustment);
var fontSize = 16;
var fontSize = label.fontsize;
WriteStartElement("text");
WriteAttribute("x", x);
WriteAttribute("y", y);
Expand Down Expand Up @@ -955,4 +955,4 @@ public void WriteLine(Point a, Point b) {
WriteEndElement();
}
}
}
}

0 comments on commit 29b730c

Please sign in to comment.