Exemplo n.º 1
0
        public static void Remove(Image pImage)
        {
            // ensure call Create() first
            ImageMan pMan = ImageMan.GetInstance();

            Debug.Assert(pMan != null);

            // ensure pImage is not null
            Debug.Assert(pImage != null);
            pMan.baseRemove(pImage);
        }
Exemplo n.º 2
0
        public static void Destory()
        {
            // ensure call Create() first
            ImageMan pMan = ImageMan.GetInstance();

            Debug.Assert(pMan != null);

            pMan.baseDestory();

            pMan.poNodeForCompare = null;
            ImageMan.pInstance    = null;
        }
Exemplo n.º 3
0
        public static Image Find(Image.Name name)
        {
            // ensure call Create() first
            ImageMan pMan = ImageMan.GetInstance();

            Debug.Assert(pMan != null);

            // find the image by specific image name
            pMan.poNodeForCompare.setName(name);
            Image pImage = (Image)pMan.baseFind(pMan.poNodeForCompare);

            return(pImage);
        }
Exemplo n.º 4
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);
        }