/// <summary> /// Initialize a new empty instance of the <c>Graphmatic.Interaction.Annotations.Picture</c> class from serialized XML data. /// </summary> /// <param name="xml">The XML data to use for deserializing this Resource.</param> public Picture(XElement xml) : base(xml) { string base64ImageData = xml.Element("ImageData").Value; ImageData = ResourceSerializationExtensionMethods.ImageToByteArray(Convert.FromBase64String(base64ImageData)); }
/// <summary> /// Initialize a new empty instance of the <c>Graphmatic.Interaction.Annotations.Annotation</c> class from serialized XML data. /// </summary> /// <param name="xml">The XML data to use for deserializing this Resource.</param> public Annotation(XElement xml) { X = Double.Parse(xml.Element("X").Value); Y = Double.Parse(xml.Element("Y").Value); Width = Double.Parse(xml.Element("Width").Value); Height = Double.Parse(xml.Element("Height").Value); Color = ResourceSerializationExtensionMethods.XmlStringToColor(xml.Element("Color").Value); }
/// <summary> /// Initialize a new instance of the <c>Graphmatic.Interaction.Plotting.PlottableParameters</c> class from serialized XML data. /// </summary> /// <param name="xml">The serialized XML data to use for deserialization.</param> public PlottableParameters(XElement xml) { PlotColor = ResourceSerializationExtensionMethods.XmlStringToColor(xml.Element("PlotColor").Value); }