public override Shape ConvertToShape(string drawingSessionID) { string id1 = ""; //null; string id2 = ""; //null; if (this.Shape1 != null) { id1 = this.Shape1.Id; } if (this.Shape2 != null) { id2 = this.Shape2.Id; } int[] ptsX = new int[this.StylusPoints.Count]; int[] ptsY = new int[this.StylusPoints.Count]; for (int i = 0; i < this.StylusPoints.Count; i++) { ptsX[i] = (int)this.StylusPoints[i].X; ptsY[i] = (int)this.StylusPoints[i].Y; // pts[i] = this.StylusPoints[i].ToPoint(); } ShapeProperties properties = new ShapeProperties(this.Type, this.Remplissage.ToString(), this.DrawingAttributes.Color.ToString(), null, (int)this.DrawingAttributes.Height, (int)this.DrawingAttributes.Height, -1, this.BorderStyle, this.Label, null, null, id1, id2, this.Index1, this.Index2, this.Q1, this.Q2, ptsX, ptsY, this.Category); return(new Shape(this.Id, drawingSessionID, this.Author, properties)); }
public Shape(string id, string imageId, string author, ShapeProperties properties) { this.id = id; this.imageId = imageId; this.author = author; this.properties = properties; }
public virtual Shape ConvertToShape(string drawingSessionID) { int[] middlePoint = new int[2] { (int)this.Center.X, (int)this.Center.Y }; ShapeProperties properties = new ShapeProperties(this.Type, this.Remplissage.ToString(), this.BorderColor.ToString() /* this.DrawingAttributes.Color.ToString()*/, middlePoint, (int)this.Height, (int)this.Width, this.CurrentRotation, this.BorderStyle, this.Label, null, null, null, null, -1, -1, null, null, null, null, null); return(new Shape(this.Id, drawingSessionID, this.Author, properties)); }