Revert "Changed creation of canvas context for 2d drawing"

This reverts commit bdde0f88a7e379f0e46e2f0c938785abe4b81584.