Write plus symbol over each hole
This commit is contained in:
parent
a87f3bb6bd
commit
7b7bab1f85
3 changed files with 21 additions and 4 deletions
|
@ -151,9 +151,9 @@ namespace MusicBoxConverter
|
||||||
HoleSize // radius
|
HoleSize // radius
|
||||||
);
|
);
|
||||||
|
|
||||||
svg.WriteCross(
|
svg.WritePlus(
|
||||||
holePosition,
|
holePosition,
|
||||||
new Vector2(HoleSize, HoleSize)
|
new Vector2(HoleSize, HoleSize).Multiply(1.5f)
|
||||||
);
|
);
|
||||||
|
|
||||||
svg.WriteText(
|
svg.WriteText(
|
||||||
|
|
|
@ -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)
|
public void StartScaleTransform(float scale)
|
||||||
{
|
{
|
||||||
xml.WriteStartElement("g");
|
xml.WriteStartElement("g");
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace SBRL.Utilities
|
||||||
Y - b.Y
|
Y - b.Y
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public Vector2 Divide(int b)
|
public Vector2 Divide(float b)
|
||||||
{
|
{
|
||||||
return new Vector2(
|
return new Vector2(
|
||||||
X / b,
|
X / b,
|
||||||
|
@ -63,7 +63,7 @@ namespace SBRL.Utilities
|
||||||
Y / b.Y
|
Y / b.Y
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public Vector2 Multiply(int b)
|
public Vector2 Multiply(float b)
|
||||||
{
|
{
|
||||||
return new Vector2(
|
return new Vector2(
|
||||||
X * b,
|
X * b,
|
||||||
|
|
Loading…
Reference in a new issue