Hrm not really sure why I need this

This commit is contained in:
Marco Pesenti Gritti 2006-09-25 19:59:47 +02:00
parent 5f88062cba
commit 9dd98949e5
2 changed files with 6 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class SnowflakeLayout:
[width, height] = self._root.get_size_request()
matrix = cairo.Matrix(1, 0, 0, 1, 0, 0)
matrix.translate(self._cx - (width / 2), self._cy - (height / 2))
matrix.translate(self._cx, self._cy)
self._root.set_transform(matrix)
def _layout_child(self, child, index):

View File

@ -60,6 +60,11 @@ group.translate(500, 500)
_create_snowflake(group, 8)
root.add_child(group)
layout = SnowflakeLayout()
group = goocanvas.Group()
group.translate(20, 500)
_create_snowflake(group, 2)
root.add_child(group)
canvas.set_model(canvas_model)