AlphaTab.Platform.JavaScript.Html5Canvas.BeginRender C# (CSharp) Method

BeginRender() public method

public BeginRender ( float width, float height ) : void
width float
height float
return void
        public void BeginRender(float width, float height)
        {
            _canvas = (HtmlCanvasElement) document.createElement("canvas");
            _canvas.width = (int) width;
            _canvas.height = (int) height;
            _canvas.style.width = width + "px";
            _canvas.style.height = height + "px";
            _context = (CanvasRenderingContext2D)_canvas.getContext("2d");
            _context.textBaseline = "top";
        }