示例#1
0
        /// <summary>
        /// Constructor of the Circle object
        /// </summary>
        /// <param name="Vertices">The coordinates of the points that describe the center of the circle</param>
        /// <param name="Owner">The user owning the Circle Object</param>
        /// <param name="Radius">The radius of the circle</param>
        /// <param name="Config">The graphical configuration of the circle</param>
        /// <param name="ID">The unique id of the shape</param>
        public Circle(List <Tuple <double, double> > Vertices, User Owner, double Radius, ShapeConfig Config, uint ID) : base(Vertices, Owner, Config, ID)
        {
            if (Radius < 0)
            {
                throw new NegativeRadiusException();
            }

            this.Radius = Radius;
            this.Code   = ShapeCode.Circle;
        }
示例#2
0
 /// <summary>
 /// Constructor of the Polygon object
 /// </summary>
 /// <param name="Vertices">The coordinates of the points that describe the polygon</param>
 /// <param name="Owner">The user owning the polygon</param>
 /// <param name="Config">The graphical configuration of the polygon</param>
 /// <param name="ID">The unique id of the shape</param>
 public Polygon(List <Tuple <double, double> > Vertices, User Owner, ShapeConfig Config, uint ID) : base(Vertices, Owner, Config, ID)
 {
     this.Code = ShapeCode.Polygon;
 }
示例#3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="Vertices">The coordinates of the points that describe the location of the Text object</param>
 /// <param name="Owner">The user owning the Text object</param>
 /// <param name="InnerText">Text written in the Text object</param>
 /// <param name="FontSize">Font size of the text</param>
 /// <param name="Config">The graphical configuration of the text</param>
 /// <param name="ID">The unique id of the shape</param>
 public Text(List <Tuple <double, double> > Vertices, User Owner, string InnerText, uint FontSize, ShapeConfig Config, uint ID) :
     base(Vertices, Owner, Config, ID)
 {
     this.InnerText = InnerText;
     this.FontSize  = FontSize;
     this.Code      = ShapeCode.Text;
 }