From 8d8009ea73b77fc37c165462b21a342fb3614416 Mon Sep 17 00:00:00 2001 From: Thomas Jourdan Date: Sat, 09 Jan 2010 21:24:55 +0000 Subject: Themes and categories for stamps. --- (limited to 'ep_stamp_filledcyclic.py') diff --git a/ep_stamp_filledcyclic.py b/ep_stamp_filledcyclic.py index 5881991..cf33415 100644 --- a/ep_stamp_filledcyclic.py +++ b/ep_stamp_filledcyclic.py @@ -40,9 +40,10 @@ class FilledCyclicStamp(model_allele.Allele): 'min' : 0.01, 'max': 0.25}, ] - def __init__(self, trunk): + def __init__(self, trunk, maxstates): """Constructor for a flip merger.""" super(FilledCyclicStamp, self).__init__(trunk) + self.max_states = maxstates self.order = 1.0 # special case for circle self.radius = 0.1 @@ -81,17 +82,17 @@ class FilledCyclicStamp(model_allele.Allele): post: __return__ is not other post: model_locus.unique_check(__return__, self, other) == '' """ - new_one = FilledCyclicStamp(self.get_trunk()) + new_one = FilledCyclicStamp(self.get_trunk(), self.max_states) cross_sequence = model_random.crossing_sequence(2) new_one.order = self.order if cross_sequence[0] else other.order new_one.radius = self.radius if cross_sequence[1] else other.radius return new_one - def set_extent(self, width, height): - """Set extent of stamp. Some stamps will ignore this.""" + def set_stamp_extent(self, width, height): + """Set extent of stamp. This stamps will ignore these parameters.""" pass - def render(self, ctx, point, rad=0.1, state=0): + def render(self, ctx, point, state): """ pre: ctx is not None pre: len(point) == 2 @@ -127,7 +128,7 @@ class FilledCyclicStamp(model_allele.Allele): # check for distinct references, needs to copy content, not references post: __return__ is not self """ - new_one = FilledCyclicStamp(self.get_trunk()) + new_one = FilledCyclicStamp(self.get_trunk(), self.max_states) new_one.order = self.order new_one.radius = self.radius return new_one -- cgit v0.9.1