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

HWSurfaceInstance() public method

public HWSurfaceInstance ( ScriptEngine parent, int width, int height, System.Color bg_color ) : System
parent ScriptEngine
width int
height int
bg_color System.Color
return System
        public HWSurfaceInstance(ScriptEngine parent, int width, int height, Color bg_color)
            : base(parent.Object.InstancePrototype)
        {
            Console.WriteLine("Create surf: {0}x{1} {2}", width, height, bg_color);
            if (width <= 0)
                throw new ArgumentOutOfRangeException("width", "Width must be > 0.");
            _width = (uint)width;

            if (height <= 0)
                throw new ArgumentOutOfRangeException("height", "Height must be > 0.");
            _height = (uint)height;

            _tex = new RenderTexture(_width, _height);
            _tex.Clear(bg_color);

            Init();
        }

Same methods

HWSurfaceInstance::HWSurfaceInstance ( ) : System
HWSurfaceInstance::HWSurfaceInstance ( ScriptEngine parent, Image image ) : System
HWSurfaceInstance::HWSurfaceInstance ( ScriptEngine parent, Texture texture ) : System
HWSurfaceInstance::HWSurfaceInstance ( ScriptEngine parent, string filename ) : System