Exemple #1
0
    def chair(self, party):
        style = 'stroke:black;stroke-width:4.0;fill:%s;'
        head = ShapeBuilder().createCircle(30, 25, 16)
        head.set_class('head')
        head.set_style(style % party.head_color)
        body = ShapeBuilder().createPolygon('12,50,47,50,30,15')
        body.set_class('body')
        body.set_style(style % party.body_color)

        group = g()
        group.set_id(party.initials)
        group.addElement(body)
        group.addElement(head)

        return group