コード例 #1
0
ファイル: Shape3DScene.cs プロジェクト: xoposhiy/npoi
 public CT_Scene3D()
 {
     this.extLstField = new CT_OfficeArtExtensionList();
     this.backdropField = new CT_Backdrop();
     this.lightRigField = new CT_LightRig();
     this.cameraField = new CT_Camera();
 }
コード例 #2
0
        public static CT_Scene3D Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Scene3D ctObj = new CT_Scene3D();

            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "camera")
                {
                    ctObj.camera = CT_Camera.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "lightRig")
                {
                    ctObj.lightRig = CT_LightRig.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "backdrop")
                {
                    ctObj.backdrop = CT_Backdrop.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "extLst")
                {
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
コード例 #3
0
ファイル: Shape3DScene.cs プロジェクト: thachgiasoft/shuijin
 public CT_Scene3D()
 {
     this.extLstField   = new CT_OfficeArtExtensionList();
     this.backdropField = new CT_Backdrop();
     this.lightRigField = new CT_LightRig();
     this.cameraField   = new CT_Camera();
 }
コード例 #4
0
 public static CT_Camera Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_Camera ctObj = new CT_Camera();
     if (node.Attributes["prst"] != null)
         ctObj.prst = (ST_PresetCameraType)Enum.Parse(typeof(ST_PresetCameraType), node.Attributes["prst"].Value);
     ctObj.fov = XmlHelper.ReadInt(node.Attributes["fov"]);
     ctObj.zoom = XmlHelper.ReadInt(node.Attributes["zoom"]);
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "rot")
             ctObj.rot = CT_SphereCoords.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }
コード例 #5
0
ファイル: Shape3DCamera.cs プロジェクト: hiodava/Romero
        public static CT_Camera Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Camera ctObj = new CT_Camera();

            if (node.Attributes["prst"] != null)
            {
                ctObj.prst = (ST_PresetCameraType)Enum.Parse(typeof(ST_PresetCameraType), node.Attributes["prst"].Value);
            }
            ctObj.fov  = XmlHelper.ReadInt(node.Attributes["fov"]);
            ctObj.zoom = XmlHelper.ReadInt(node.Attributes["zoom"]);
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "rot")
                {
                    ctObj.rot = CT_SphereCoords.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }