Hrm not really sure why I need this
This commit is contained in:
parent
5f88062cba
commit
9dd98949e5
@ -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):
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user