Write plus symbol over each hole

This commit is contained in:
Starbeamrainbowlabs 2021-01-27 19:16:16 +00:00
parent a87f3bb6bd
commit 7b7bab1f85
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
3 changed files with 21 additions and 4 deletions

View file

@ -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(

View file

@ -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");

View file

@ -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,