Exemplo n.º 1
0
        /**
         * Construct a new Surface from the given image resource
         */
        public Surface(string Resourcepath)
        {
            texture = TextureManager.Get(Resourcepath);
            texture.Ref();
            width = texture.ImageWidth;
            height = texture.ImageHeight;

            Left = 0;
            Top = 0;
            Right = texture.UVRight;
            Bottom = texture.UVBottom;
        }
Exemplo n.º 2
0
        /// <summary>Construct a new Surface from the given image resource</summary>
        public Surface(string Resourcepath)
        {
            texture = TextureManager.Get(Resourcepath);
            texture.Ref();
            width  = texture.ImageWidth;
            height = texture.ImageHeight;

            Left   = 0;
            Top    = 0;
            Right  = texture.UVRight;
            Bottom = texture.UVBottom;
        }
Exemplo n.º 3
0
        public Surface(Surface other)
        {
            texture = other.texture;
            texture.Ref();

            width = other.width;
            height = other.height;

            Left = other.Left;
            Top = other.Top;
            Right = other.Right;
            Bottom = other.Bottom;
        }
Exemplo n.º 4
0
        public Surface(string Resourcepath, float x, float y, float w, float h)
        {
            texture = TextureManager.Get(Resourcepath);
            texture.Ref();

            width = w;
            height = h;

            Left = x / texture.Width;
            Top = y / texture.Height;
            Right = (x+w) / texture.Width;
            Bottom = (y+h) / texture.Height;
        }
Exemplo n.º 5
0
        public Surface(Surface other)
        {
            texture = other.texture;
            texture.Ref();

            width  = other.width;
            height = other.height;

            Left   = other.Left;
            Top    = other.Top;
            Right  = other.Right;
            Bottom = other.Bottom;
        }
Exemplo n.º 6
0
        public Surface(string Resourcepath, float x, float y, float w, float h)
        {
            texture = TextureManager.Get(Resourcepath);
            texture.Ref();

            width  = w;
            height = h;

            Left   = x / texture.Width;
            Top    = y / texture.Height;
            Right  = (x + w) / texture.Width;
            Bottom = (y + h) / texture.Height;
        }