Esempio n. 1
0
        public static CT_Scene3D Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Scene3D ctObj = new CT_Scene3D();

            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "camera")
                {
                    ctObj.camera = CT_Camera.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "lightRig")
                {
                    ctObj.lightRig = CT_LightRig.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "backdrop")
                {
                    ctObj.backdrop = CT_Backdrop.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "extLst")
                {
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Esempio n. 2
0
        public static CT_Camera Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Camera ctObj = new CT_Camera();

            if (node.Attribute("prst") != null)
            {
                ctObj.prst = (ST_PresetCameraType)Enum.Parse(typeof(ST_PresetCameraType), node.Attribute("prst").Value);
            }
            ctObj.fov  = XmlHelper.ReadInt(node.Attribute("fov"));
            ctObj.zoom = XmlHelper.ReadInt(node.Attribute("zoom"));
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "rot")
                {
                    ctObj.rot = CT_SphereCoords.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }