support for pre- and post- rasterize functions in widgets