Files
shape_library/Shapes/Shape.cs
2019-10-25 03:16:17 -06:00

33 lines
800 B
C#

using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Runtime.Serialization;
namespace Shapes
{
[DataContract]
[KnownType(typeof(CompositeShape))]
public abstract class Shape
{
public Shape()
{
CompositeShape = false;
}
[DataMember] public virtual List<Point> Points { get; internal set; }
[DataMember] public abstract Color Fill { get; set; }
[DataMember] public abstract Color Stroke { get; set; }
[DataMember] protected internal bool CompositeShape { get; set; }
public abstract double ComputeArea();
public abstract void Scale(double scaleFactor);
public abstract void Save(Stream stream);
public abstract void Draw(Stream stream);
}
}