Not sure exactly what you are hoping to achieve but you might want to look at setResizable
If you want to distort the display to ‘fit’ the new size I can think of 2 alternatives
- scale change the scale based on the previous and the new display size
- in the draw method all positions and sizes used for draw commands e.g. line, rect, ellipse etc. are expressed as a proportion of the display width and height