public override void writeBinary(BinaryWriter bw) { // Writing binary/design criteria for Rectangle bw.Write("Rect"); bw.Write(PenColor.ToArgb()); bw.Write(PenWidth); bw.Write(Pt1.X); bw.Write(Pt1.Y); bw.Write(Pt2.X); bw.Write(Pt2.Y); }
public override void writeBinary(BinaryWriter bw) { // YOUR CODE HERE bw.Write("Rectangle"); bw.Write(Pt1.X); bw.Write(Pt1.Y); bw.Write(Pt2.X); bw.Write(Pt2.Y); bw.Write((int)PenWidth); bw.Write(PenColor.ToArgb()); }
public override void writeBinary(BinaryWriter bw) { // Writing binary/design criteria for Line bw.Write("Line"); bw.Write(Pt1.X); bw.Write(Pt1.Y); bw.Write(Pt2.X); bw.Write(Pt2.Y); bw.Write(PenColor.ToArgb()); bw.Write((int)PenWidth); }
public override void writeBinary(BinaryWriter bw) { // Writing binary/design criteria for Free Line bw.Write("FreeLine"); bw.Write(PenColor.ToArgb()); bw.Write(PenWidth); bw.Write(FreeList.Count); foreach (Point pointElement in FreeList) { bw.Write(pointElement.X); bw.Write(pointElement.Y); } }
public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("ShapeId", ShapeId); info.AddValue("CurrentShape", CurrentShape); info.AddValue("BrushType", BrushType); info.AddValue("PenType", PenType); info.AddValue("Width", ShapeSize.Width); info.AddValue("Height", ShapeSize.Height); info.AddValue("X", ShapeLoc.X); info.AddValue("Y", ShapeLoc.Y); info.AddValue("PenColor", PenColor.ToArgb()); info.AddValue("BrushColor", BrushColor.ToArgb()); info.AddValue("IsBrush", IsBrush); }
public override void writeBinary(BinaryWriter bw) { // YOUR CODE HERE bw.Write("Text"); bw.Write(Pt1.X); bw.Write(Pt1.Y); bw.Write(TextLine); // bw.Write((String)TextFont.FontFamily); var cvt = new FontConverter(); bw.Write(TextFont.FontFamily.Name); bw.Write(TextFont.Size); bw.Write(PenColor.ToArgb()); Console.WriteLine("Text data :" + ToString()); }
public override void writeBinary(BinaryWriter bw) { // YOUR CODE HERE bw.Write("FreeLine"); bw.Write((int)PenWidth); bw.Write(PenColor.ToArgb()); Point[] pts = FreeList.ToArray(); bw.Write(pts.Length); foreach (Point p in FreeList) { bw.Write(p.X); bw.Write(p.Y); } bw.Write("\n"); }
public override void writeBinary(BinaryWriter bw) { // Writing binary/design criteria for Text bw.Write("Text"); bw.Write(Pt1.X + "," + Pt1.Y + "," + TextLine + "," + TextFont.FontFamily.Name + "," + TextFont.SizeInPoints + "," + PenColor.ToArgb()); }