Drawing after window_resize


Hello! I have recently been experimenting with Html5, and window resizing with some games I have already made for windows. To ensure that the screen fits in any browser I resize it, this scales down the positions and size of objects on the screen, but not anything that is drawn using the draw event. Is there any way to fix this, or a way to scale down objects and things that have been drawn? Thanks!


One way is to draw to a separate surface first, then draw that surface. That way everything scales together. Another method is to calculate the scale factor and multiply all your draw values by that.

Someone might have better ideas.