diff options
author | Thomas Jourdan <b.vehikel@googlemail.com> | 2009-12-31 07:28:45 (GMT) |
---|---|---|
committer | Thomas Jourdan <b.vehikel@googlemail.com> | 2009-12-31 07:28:45 (GMT) |
commit | ee878465ad84f8b2fd25eccf690ea29dde27e7df (patch) | |
tree | bf93ed14c343f6468d7e5ec5846feff118aac31b /ep_layer_markovchain.py | |
parent | ad81db80eab45f50b47e74e96912983e2bd07eb0 (diff) |
using unicode characters as stamps
Diffstat (limited to 'ep_layer_markovchain.py')
-rw-r--r-- | ep_layer_markovchain.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/ep_layer_markovchain.py b/ep_layer_markovchain.py index a0d9e5f..b245556 100644 --- a/ep_layer_markovchain.py +++ b/ep_layer_markovchain.py @@ -267,19 +267,12 @@ class MarkovChainLayer(model_layer.Layer): self.begin_render(ctx, width, height) cell_rand = random.Random(self.random_seed) cell_state = 0 -# delta = 1.0 / self.number_of_tiles for point in self.sampler.get_sample_points(): rgba = self.cell_colors[cell_state].rgba ctx.set_source_rgba(rgba[0], rgba[1], rgba[2], rgba[3]) - self.stamp.render(ctx, (point[0]-0.5, point[1]-0.5) ) + self.stamp.render(ctx, (point[0]-0.5, point[1]-0.5), + state=cell_state) cell_state = self._next_state(cell_state, cell_rand) -# for y_index in range(self.number_of_tiles): -# for x_index in range(self.number_of_tiles): -# rgba = self.cell_colors[cell_state].rgba -# ctx.set_source_rgba(rgba[0], rgba[1], rgba[2], rgba[3]) -# self.stamp.render(ctx, (delta*(x_index+0.5)-0.5, -# delta*(y_index+0.5)-0.5) ) -# cell_state = self._next_state(cell_state, cell_rand) def _next_state(self, cell_state, cell_rand): next_cell_state = self.states-1 |