Пример #1
0
        public static Image Add(Image.Name ImageName, Texture.Name TextureName, float x, float y, float width, float height)
        {
            ImageMan pMan = ImageMan.privGetInstance();

            Debug.Assert(pMan != null);

            Image pNode = (Image)pMan.baseAdd();

            Debug.Assert(pNode != null);

            // Initialize the data
            Texture pTexture = TextureMan.Find(TextureName);

            Debug.Assert(pTexture != null);

            pNode.Set(ImageName, pTexture, x, y, width, height);

            return(pNode);
        }
Пример #2
0
        public static Image Add(Image.Name imageName, Texture.Name textureName, float x, float y, float width, float height)
        {
            // ensure call Create() first
            ImageMan pMan = ImageMan.GetInstance();

            Debug.Assert(pMan != null);

            // add Image to active list
            Image pImage = (Image)pMan.baseAdd();

            Debug.Assert(pImage != null);

            // find the texture by texture name
            Texture pTexture = TextureMan.Find(textureName);

            Debug.Assert(pTexture != null);

            // set new Image
            pImage.set(imageName, pTexture, x, y, width, height);

            return(pImage);
        }