diff options
author | Thomas Jourdan <b.vehikel@googlemail.com> | 2010-01-09 21:24:55 (GMT) |
---|---|---|
committer | Thomas Jourdan <b.vehikel@googlemail.com> | 2010-01-09 21:24:55 (GMT) |
commit | 8d8009ea73b77fc37c165462b21a342fb3614416 (patch) | |
tree | d11735b60966666f7f180874f4ca6a167fc585e1 /ep_stamp_filledcyclic.py | |
parent | 9840852aca167c25c979fa08a23bc0fc623b680e (diff) |
Themes and categories for stamps.
Diffstat (limited to 'ep_stamp_filledcyclic.py')
-rw-r--r-- | ep_stamp_filledcyclic.py | 13 |
1 files changed, 7 insertions, 6 deletions
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 |