+ # A tri-tetraflexagon only have one visible backface, the first one.
+ group = self.groups["Backfaces"]
+ for tile in self.tetraflexagon.squares[0].tiles:
+ m = self.get_backface_tile_transform(tile)
+ svg_matrix = "matrix(%f, %f, %f, %f, %f, %f)" % (m[0], m[3],
+ m[1], m[4],
+ m[2], m[5])
+ tile_href = "#square0-tile%d" % tile.index
+ ref = self.backend.svg.use("#square0-content")
+ ref['transform'] = svg_matrix
+ ref['clip-path'] = "url(%s)" % (tile_href + '-clip-path')
+ group.add(ref)
+