Beispiel #1
0
 def __init__(self, diag, px, py, gene):
     Shape.__init__(self, diag, px, py)
     self.outline = rounded_rect(px, py, self.width, self.height)
     self.gene = gene
     if gene.sequence >= diag.world.reg_channels:
         self.color = pcolor.cmyk.Green
     else:
         self.color = pcolor.cmyk.Gray
Beispiel #2
0
 def __init__(self, diag, px, py, gene):
     Shape.__init__(self, diag, px, py)
     self.text = latexify(
         text_for_gene(gene) + '=>' + diag.world.name_for_channel(gene.pub))
     w, h = measure_text(self.text)
     self.outline = rounded_rect(px, py, w + .2, self.height)
     if gene.sequence >= diag.world.reg_channels:
         self.color = pcolor.cmyk.Green
     else:
         self.color = pcolor.cmyk.Black