First steps in implementing margins

Width and height could already be changed with the rect object, but now
the origin x and y positions are used as well.