Zheng

I've added some new Canvas2D test cases.

commit 6db6f05 tries to refact the engine. I'am not sure whether this code style is Ok. So this is a small change, mainly move global defined parameters to a class.