Пример #1
0
        public static void FromXml(XElement xShape, IList <IShapeRecordEx> records)
        {
            var xEdges = xShape.RequiredElement("edges");

            foreach (var xShapeRecord in xEdges.Elements())
            {
                records.Add(XShapeRecord.ExFromXml(xShapeRecord));
            }
        }
Пример #2
0
        public static Glyph FromXml(XElement xGlyph, Glyph glyph)
        {
            var xEdges = xGlyph.RequiredElement("edges");

            foreach (var xShapeRecord in xEdges.Elements())
            {
                glyph.Records.Add(XShapeRecord.RGBFromXml(xShapeRecord));
            }
            return(glyph);
        }
Пример #3
0
        public static XElement ToXml(Glyph glyph)
        {
            var xShape = new XElement("GlyphShape");
            var xEdges = new XElement("edges");

            foreach (var shapeRecord in glyph.Records)
            {
                xEdges.Add(XShapeRecord.ToXml(shapeRecord));
            }

            xShape.Add(xEdges);
            return(xShape);
        }
Пример #4
0
        public static XElement ToXml(IList <IShapeRecordRGB> records)
        {
            var xShape = new XElement("Shape");
            var xEdges = new XElement("edges");

            foreach (var shapeRecord in records)
            {
                xEdges.Add(XShapeRecord.ToXml(shapeRecord));
            }


            xShape.Add(xEdges);
            return(xShape);
        }