add window-resize support for graphics

add window-resize support for graphics