/// <summary> /// Reads a <see cref="Polygon2d"/> from an <see cref="Ibasa.IO.BinaryReader">. /// </summary> public static Polygon2d ReadPolygon2d(this Ibasa.IO.BinaryReader reader) { var length = reader.ReadInt32(); var array = new Point2d[length]; for (int i = 0; i < length; ++i) { array[i] = reader.ReadPoint2d(); } return(new Polygon2d(array)); }
/// <summary> /// Reads a <see cref="Line2d"/> from an <see cref="Ibasa.IO.BinaryReader">. /// </summary> public static Line2d ReadLine2d(this Ibasa.IO.BinaryReader reader) { return(new Line2d(reader.ReadPoint2d(), reader.ReadPoint2d())); }