def draw(self): VG.set(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE) old_matrix = VG.get_matrix() VG.translate(*self.body.position) VG.rotate(math.degrees(self.body.angle)) old_paint = VG.get_paint(VG_FILL_PATH) VG.set_paint(self.fill_paint, VG_FILL_PATH) with self.style: self.path.draw(VG_STROKE_PATH | VG_FILL_PATH) VG.set_paint(old_paint, VG_FILL_PATH) VG.load_matrix(old_matrix)