/// <summary> /// Reads a <see cref="Polygon2i"/> from an <see cref="Ibasa.IO.BinaryReader">. /// </summary> public static Polygon2i ReadPolygon2i(this Ibasa.IO.BinaryReader reader) { var length = reader.ReadInt32(); var array = new Point2i[length]; for (int i=0; i<length; ++i) { array[i] = reader.ReadPoint2i(); } return new Polygon2i(array); }
/// <summary> /// Reads a <see cref="Line2i"/> from an <see cref="Ibasa.IO.BinaryReader">. /// </summary> public static Line2i ReadLine2i(this Ibasa.IO.BinaryReader reader) { return(new Line2i(reader.ReadPoint2i(), reader.ReadPoint2i())); }