[#234] added a `setMaxSize` function to limit the display canvas size when scaling