Engine.Objects.HWSurfaceInstance.HWSurfaceInstance C# (CSharp) Method

HWSurfaceInstance() public method

public HWSurfaceInstance ( ScriptEngine parent, string filename ) : System
parent ScriptEngine
filename string
return System
        public HWSurfaceInstance(ScriptEngine parent, string filename)
            : base(parent.Object.InstancePrototype)
        {
            using (Texture tex = new Texture(filename))
            {
                _width = tex.Size.X;
                _height = tex.Size.Y;
                _tex = new RenderTexture(_width, _height);
                _myBatch = new SpriteBatch(_tex);
                _myBatch.SetBlendMode(BlendMode.None);
                _myBatch.Add(tex, 0, 0);
                _myBatch.Flush();
                Update();
            }
            Init();
        }

Same methods

HWSurfaceInstance::HWSurfaceInstance ( ) : System
HWSurfaceInstance::HWSurfaceInstance ( ScriptEngine parent, Image image ) : System
HWSurfaceInstance::HWSurfaceInstance ( ScriptEngine parent, Texture texture ) : System
HWSurfaceInstance::HWSurfaceInstance ( ScriptEngine parent, int width, int height, System.Color bg_color ) : System