public static Polygon IncrementalPolygon(MetafileReader reader)
        {
            var points    = new List <PointF>();
            var lastPoint = reader.ReadPoint();

            points.Add(lastPoint);
            while (reader.HasMoreData(2))
            {
                double deltaX = reader.ReadVdc();
                double deltaY = reader.ReadVdc();
                lastPoint = new PointF((float)(lastPoint.X + deltaX), (float)(lastPoint.Y + deltaY));
                points.Add(lastPoint);
            }
            return(new Polygon(points.ToArray()));
        }
        private static List <PointF> ReadIncrementalPointList(MetafileReader reader)
        {
            var points    = new List <PointF>();
            var lastPoint = reader.ReadPoint();

            points.Add(lastPoint);
            while (reader.HasMoreData(2))
            {
                double deltaX = reader.ReadVdc();
                double deltaY = reader.ReadVdc();
                lastPoint = new PointF((float)(lastPoint.X + deltaX), (float)(lastPoint.Y + deltaY));
                points.Add(lastPoint);
            }

            return(points);
        }
        public static PolygonSet IncrementalPolygonSet(MetafileReader reader)
        {
            var points    = new List <PointF>();
            var flags     = new List <EdgeOutFlags>();
            var lastPoint = reader.ReadPoint();

            points.Add(lastPoint);
            flags.Add(ParseEdgeOutFlags(reader.ReadEnum()));
            while (reader.HasMoreData(3))
            {
                double deltaX = reader.ReadVdc();
                double deltaY = reader.ReadVdc();
                lastPoint = new PointF((float)(lastPoint.X + deltaX), (float)(lastPoint.Y + deltaY));
                points.Add(lastPoint);
                flags.Add(ParseEdgeOutFlags(reader.ReadEnum()));
            }
            return(new PolygonSet(points.ToArray(), flags.ToArray()));
        }
 public static RestrictedText RestrictedText(MetafileReader reader)
 {
     return(new RestrictedText(reader.ReadVdc(), reader.ReadVdc(), reader.ReadPoint(), ParseFinalFlag(reader.ReadEnum()), reader.ReadString()));
 }
 public static CircularArcCenterReversed CircularArcCenterReversed(MetafileReader reader)
 {
     return(new CircularArcCenterReversed(reader.ReadPoint(), reader.ReadPoint(), reader.ReadPoint(), reader.ReadVdc()));
 }
 public static CircularArcCenterClose CircularArcCenterClose(MetafileReader reader)
 {
     return(new CircularArcCenterClose(reader.ReadPoint(), reader.ReadPoint(), reader.ReadPoint(), reader.ReadVdc(), ParseArcClosure(reader.ReadEnum())));
 }
 public static Circle Circle(MetafileReader reader)
 {
     return(new Circle(reader.ReadPoint(), reader.ReadVdc()));
 }
Esempio n. 8
0
 public static CharacterHeight CharacterHeight(MetafileReader reader)
 {
     return(new CharacterHeight(reader.ReadVdc()));
 }