def _center_transform(self, transform):
dx, dy = self._get_center()<EOL>t = cairo.Matrix()<EOL>t.translate(dx, dy)<EOL>t = transform * t<EOL>t.translate(-dx, -dy)<EOL>return t<EOL>
Works like setupTransform of a version of java nodebox
http://dev.nodebox.net/browser/nodebox-java/branches/rewrite/src/java/net/nodebox/graphics/Grob.java