aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Container.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2017-08-13 19:11:00 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2017-08-13 19:11:00 +0200
commit5f68cf21b47b88e4e1de7fed7bd9b8b56b5dfa3d (patch)
tree5571df47d1e938e51d204372a7fa874b343313a9 /src/GraphicObjects/Container.cs
parent8776ccb3ca259053c2b93b0a068b76a9bf8032f3 (diff)
cairo.region to handle clipping, native pointer leaking...
Diffstat (limited to 'src/GraphicObjects/Container.cs')
-rw-r--r--src/GraphicObjects/Container.cs55
1 files changed, 1 insertions, 54 deletions
diff --git a/src/GraphicObjects/Container.cs b/src/GraphicObjects/Container.cs
index aac35946..df14b8e2 100644
--- a/src/GraphicObjects/Container.cs
+++ b/src/GraphicObjects/Container.cs
@@ -33,7 +33,7 @@ using System.Threading;
namespace Crow
{
- public class Container : PrivateContainer, IXmlSerializable
+ public class Container : PrivateContainer
{
#region CTOR
public Container()
@@ -51,59 +51,6 @@ namespace Crow
{
base.SetChild (_child);
}
-
- #region IXmlSerializable
-
- public override System.Xml.Schema.XmlSchema GetSchema()
- {
- return null;
- }
- public override void ReadXml(System.Xml.XmlReader reader)
- {
- //only read attributes in GraphicObject IXmlReader implementation
- base.ReadXml(reader);
-
-
- using (System.Xml.XmlReader subTree = reader.ReadSubtree())
- {
- subTree.Read(); //skip current node
- subTree.Read(); //read first child
-
- if (!subTree.IsStartElement())
- return;
-
- Type t = Type.GetType("Crow." + subTree.Name);
- if (t == null) {
- Assembly a = Assembly.GetEntryAssembly ();
- foreach (Type expT in a.GetExportedTypes ()) {
- if (expT.Name == subTree.Name) {
- t = expT;
- break;
- }
- }
- }
- GraphicObject go = (GraphicObject)Activator.CreateInstance(t);
-
- (go as IXmlSerializable).ReadXml(subTree);
-
- SetChild(go);
-
- subTree.Read();//closing tag
- }
- }
- public override void WriteXml(System.Xml.XmlWriter writer)
- {
- base.WriteXml(writer);
-
- if (Child == null)
- return;
-
- writer.WriteStartElement(Child.GetType().Name);
- (Child as IXmlSerializable).WriteXml(writer);
- writer.WriteEndElement();
- }
-
- #endregion
}
}