diff --git a/MusicBoxConverter/MusicBoxScoreGenerator.cs b/MusicBoxConverter/MusicBoxScoreGenerator.cs index 272a559..ff34294 100644 --- a/MusicBoxConverter/MusicBoxScoreGenerator.cs +++ b/MusicBoxConverter/MusicBoxScoreGenerator.cs @@ -151,9 +151,9 @@ namespace MusicBoxConverter HoleSize // radius ); - svg.WriteCross( + svg.WritePlus( holePosition, - new Vector2(HoleSize, HoleSize) + new Vector2(HoleSize, HoleSize).Multiply(1.5f) ); svg.WriteText( diff --git a/MusicBoxConverter/SvgWriter.cs b/MusicBoxConverter/SvgWriter.cs index e0180e8..0576970 100644 --- a/MusicBoxConverter/SvgWriter.cs +++ b/MusicBoxConverter/SvgWriter.cs @@ -123,6 +123,23 @@ namespace MusicBoxConverter } + public void WritePlus(Vector2 centre, Vector2 radius, string strokeStyle = "red", float strokeWidth = 1) + { + WriteLine( + centre.Subtract(new Vector2(0, radius.Y)), + centre.Add(new Vector2(0, radius.Y)), + strokeStyle, + strokeWidth + ); + WriteLine( + centre.Subtract(new Vector2(radius.X, 0)), + centre.Add(new Vector2(radius.X, 0)), + strokeStyle, + strokeWidth + ); + + } + public void StartScaleTransform(float scale) { xml.WriteStartElement("g"); diff --git a/MusicBoxConverter/Utilities/Vector2.cs b/MusicBoxConverter/Utilities/Vector2.cs index 580f1f2..0457c68 100644 --- a/MusicBoxConverter/Utilities/Vector2.cs +++ b/MusicBoxConverter/Utilities/Vector2.cs @@ -49,7 +49,7 @@ namespace SBRL.Utilities Y - b.Y ); } - public Vector2 Divide(int b) + public Vector2 Divide(float b) { return new Vector2( X / b, @@ -63,7 +63,7 @@ namespace SBRL.Utilities Y / b.Y ); } - public Vector2 Multiply(int b) + public Vector2 Multiply(float b) { return new Vector2( X * b,