Implement the style part for shape(). Besides, update some issues in the
test file, e.g. avoid using viewport height so we get the fixed result
on different devices.
I will refactor PathCommand to let it be a specialization of
GenericShapeCommand in the following path.