Inheritance: AssetCatalogItemWithVariants
コード例 #1
0
        public AssetImageSet OpenImageSet(string name, string idiom, string role, int width, int height)
        {
            AssetImageSet item = new AssetImageSet(base.m_Path, name, base.authorId);

            this.AddItem(item, idiom, role, width, height);
            return(item);
        }
コード例 #2
0
ファイル: AssetBrandAssetGroup.cs プロジェクト: li5414/Usdk
        public AssetImageSet OpenImageSet(string name, string idiom, string role, int width, int height)
        {
            AssetImageSet assetImageSet = new AssetImageSet(this.m_Path, name, this.authorId);

            this.AddItem((AssetCatalogItem)assetImageSet, idiom, role, width, height);
            return(assetImageSet);
        }
コード例 #3
0
 internal AssetImageStackLayer(string assetCatalogPath, string name, string authorId) : base(name, authorId)
 {
     this.m_Imageset = null;
     this.m_ReferencedName = null;
     base.m_Path = Path.Combine(assetCatalogPath, name + ".imagestacklayer");
     this.m_Imageset = new AssetImageSet(base.m_Path, "Content", authorId);
 }
コード例 #4
0
 internal AssetImageStackLayer(string assetCatalogPath, string name, string authorId) : base(name, authorId)
 {
     this.m_Imageset       = null;
     this.m_ReferencedName = null;
     base.m_Path           = Path.Combine(assetCatalogPath, name + ".imagestacklayer");
     this.m_Imageset       = new AssetImageSet(base.m_Path, "Content", authorId);
 }
コード例 #5
0
ファイル: AssetCatalog.cs プロジェクト: acechat/xcodeapi
        public AssetImageSet OpenImageSet(string name, string idiom, string role, int width, int height)
        {
            var newItem = new AssetImageSet(m_Path, name, authorId);

            AddItem(newItem, idiom, role, width, height);
            return(newItem);
        }
コード例 #6
0
        public AssetImageSet OpenImageSet(string name)
        {
            AssetImageSet existingItemWithType = this.GetExistingItemWithType <AssetImageSet>(name);

            if (existingItemWithType != null)
            {
                return(existingItemWithType);
            }
            AssetImageSet assetImageSet = new AssetImageSet(this.m_Path, name, this.authorId);

            this.m_Items.Add((AssetCatalogItem)assetImageSet);
            return(assetImageSet);
        }
コード例 #7
0
        public AssetImageSet OpenImageSet(string name)
        {
            AssetImageSet existingItemWithType = this.GetExistingItemWithType <AssetImageSet>(name);

            if (existingItemWithType != null)
            {
                return(existingItemWithType);
            }
            AssetImageSet item = new AssetImageSet(base.m_Path, name, base.authorId);

            this.m_Items.Add(item);
            return(item);
        }
コード例 #8
0
        // Checks if an imageset with given name exists and returns it if it does.
        // Otherwise, creates a new image set.
        public AssetImageSet OpenImageSet(string name)
        {
            var item = GetExistingItemWithType <AssetImageSet>(name);

            if (item != null)
            {
                return(item);
            }

            var imageset = new AssetImageSet(m_Path, name, authorId);

            m_Items.Add(imageset);
            return(imageset);
        }
コード例 #9
0
ファイル: AssetImageSet.cs プロジェクト: li5414/Usdk
        private void WriteResizingToJson(JsonElementDict item, ImageResizing resizing)
        {
            JsonElementDict dict1 = item.CreateDict("resizing");

            dict1.SetString("mode", AssetImageSet.GetSlicingMode(resizing.type));
            JsonElementDict dict2 = dict1.CreateDict("center");

            dict2.SetString("mode", AssetImageSet.GetCenterResizeMode(resizing.centerResizeMode));
            dict2.SetInteger("width", resizing.centerWidth);
            dict2.SetInteger("height", resizing.centerHeight);
            JsonElementDict dict3 = dict1.CreateDict("cap-insets");

            dict3.SetInteger("top", resizing.top);
            dict3.SetInteger("bottom", resizing.bottom);
            dict3.SetInteger("left", resizing.left);
            dict3.SetInteger("right", resizing.right);
        }
コード例 #10
0
 public void SetReference(string name)
 {
     this.m_Imageset = null;
     this.m_ReferencedName = name;
 }
コード例 #11
0
ファイル: AssetImageStackLayer.cs プロジェクト: li5414/Usdk
 public void SetReference(string name)
 {
     this.m_Imageset       = (AssetImageSet)null;
     this.m_ReferencedName = name;
 }
コード例 #12
0
 public AssetImageSet OpenImageSet(string name, string idiom, string role, int width, int height)
 {
     AssetImageSet item = new AssetImageSet(base.m_Path, name, base.authorId);
     this.AddItem(item, idiom, role, width, height);
     return item;
 }
コード例 #13
0
 public void SetReference(string name)
 {
     m_Imageset       = null;
     m_ReferencedName = name;
 }
コード例 #14
0
 internal AssetImageStackLayer(string assetCatalogPath, string name, string authorId) : base(name, authorId)
 {
     m_Path     = Path.Combine(assetCatalogPath, name + ".imagestacklayer");
     m_Imageset = new AssetImageSet(m_Path, "Content", authorId);
 }