Example #1
0
        /// <summary>
        /// Reads a <see cref="Polygon2l"/> from an <see cref="Ibasa.IO.BinaryReader">.
        /// </summary>
        public static Polygon2l ReadPolygon2l(this Ibasa.IO.BinaryReader reader)
        {
            var length = reader.ReadInt32();
            var array  = new Point2l[length];

            for (int i = 0; i < length; ++i)
            {
                array[i] = reader.ReadPoint2l();
            }
            return(new Polygon2l(array));
        }
Example #2
0
 /// <summary>
 /// Reads a <see cref="Line2l"/> from an <see cref="Ibasa.IO.BinaryReader">.
 /// </summary>
 public static Line2l ReadLine2l(this Ibasa.IO.BinaryReader reader)
 {
     return(new Line2l(reader.ReadPoint2l(), reader.ReadPoint2l()));
 }