refactoring
This commit is contained in:
parent
d1beaf9490
commit
9f6b6133ac
13 changed files with 40 additions and 44 deletions
|
|
@ -266,19 +266,19 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
|
||||
if (shape == null)
|
||||
{
|
||||
yield return new VertexData(ShapePath.FlagsAndCommand.MoveTo, 0, 0);
|
||||
yield return new VertexData(ShapePath.FlagsAndCommand.LineTo, 20, 0);
|
||||
yield return new VertexData(ShapePath.FlagsAndCommand.LineTo, 0, 20);
|
||||
yield return new VertexData(FlagsAndCommand.MoveTo, 0, 0);
|
||||
yield return new VertexData(FlagsAndCommand.LineTo, 20, 0);
|
||||
yield return new VertexData(FlagsAndCommand.LineTo, 0, 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var poly in shape)
|
||||
{
|
||||
var command = ShapePath.FlagsAndCommand.MoveTo;
|
||||
var command = FlagsAndCommand.MoveTo;
|
||||
foreach (var point in poly)
|
||||
{
|
||||
yield return new VertexData(command, point.X / 1000.0, point.Y / 1000.0);
|
||||
command = ShapePath.FlagsAndCommand.LineTo;
|
||||
command = FlagsAndCommand.LineTo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public static class VertexSourceExtensions
|
|||
|
||||
VertexStorage output = outputPolys.CreateVertexStorage();
|
||||
|
||||
output.Add(0, 0, ShapePath.FlagsAndCommand.Stop);
|
||||
output.Add(0, 0, FlagsAndCommand.Stop);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue