1

I use ggez and would like to resize the window. The only way I found is

graphics::set_drawable_size(&mut ctx, width, height);

However, when I use it, the white circle I drawn turns into a white ellipse, and a seemingly grey circle appears below. So is there another way of resizing window, one that doesn't distort what is drawn ?

Samuel
  • 51
  • 6
  • 3
    Please don't edit your question to add the answer, but add a post that contains the answer, and mark it as the answer. This is just because it will otherwise be considered as a question without answer, and may even get deleted after some time of inactivity. – jthulhu Jun 18 '22 at 13:57

1 Answers1

1

use

graphics::set_screen_coordinates(ctx,rect)

right after declaring changing size with graphics::set_mode(ctx,windowmode) turns the ellipse back into a circle. The gray shape vanishes after reducing the window (this is a pretty obscure thing).

Samuel
  • 51
  • 6