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)); } }
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); }
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); }
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); }