Add EllipsePrimitive to DTO Converter
This commit is contained in:
@@ -8,6 +8,17 @@ namespace StructureHelperCommon.Models.Shapes
|
||||
{
|
||||
public class CircleShape : ICircleShape
|
||||
{
|
||||
public Guid Id { get; }
|
||||
public double Diameter { get; set; }
|
||||
public CircleShape(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public CircleShape() : this (Guid.NewGuid())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
{
|
||||
public interface IShape
|
||||
public interface IShape : ISaveable
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
using System;
|
||||
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class LineShape : ILineShape
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public IPoint2D StartPoint { get; set; }
|
||||
public Guid Id { get; }
|
||||
/// <inheritdoc />
|
||||
public IPoint2D EndPoint { get; set; }
|
||||
public IPoint2D StartPoint { get; set; } = new Point2D();
|
||||
/// <inheritdoc />
|
||||
public double Thickness { get; set; }
|
||||
public IPoint2D EndPoint { get; set; } = new Point2D();
|
||||
/// <inheritdoc />
|
||||
public double Thickness { get; set; } = 0d;
|
||||
|
||||
public LineShape()
|
||||
public LineShape(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public LineShape() : this (Guid.NewGuid())
|
||||
{
|
||||
StartPoint = new Point2D();
|
||||
EndPoint = new Point2D();
|
||||
Thickness = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,20 @@
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
using System;
|
||||
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
{
|
||||
public class PointShape : IPointShape
|
||||
{
|
||||
public Guid Id { get; }
|
||||
public double Area { get; set; }
|
||||
|
||||
public PointShape(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public PointShape() : this (Guid.NewGuid())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,25 @@
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
using System;
|
||||
|
||||
namespace StructureHelperCommon.Models.Shapes
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class RectangleShape : IRectangleShape
|
||||
{
|
||||
public Guid Id { get; }
|
||||
/// <inheritdoc />
|
||||
public double Width { get; set; }
|
||||
/// <inheritdoc />
|
||||
public double Height { get; set; }
|
||||
/// <inheritdoc />
|
||||
public double Angle { get; set; }
|
||||
|
||||
public RectangleShape(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
public RectangleShape() : this (Guid.NewGuid())
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user