コード例 #1
0
class Rect:
    def __init__(self,
                 num,
                 who,
                 facecolor='#7777CC',
                 sw_corner=(0.0, 0.0),
                 height=0,
                 width=0):
        self.num = num
        self.mL = who
        self.sw_corner = sw_corner
        self.height = height
        self.width = width
        self.rect = Cell(sw_corner,
                         width,
                         height,
                         edgecolor='#000000',
                         facecolor=facecolor)
        self.rect._loc = 'center'
        label = "{0}".format(who)
        self.rect.get_text().set_text(label)
        self.rect.set_gid(who)

    def get_patch(self):
        return self.rect
コード例 #2
0
ファイル: calendar.py プロジェクト: izhurba/CS390U
 def __init__(self, num, who, facecolor='#7777CC', sw_corner=(0.0, 0.0), height=10.0, width=10.0):
     self.num = num   # num is value (area of a rectangle)
     self.name = who
     self.sw_corner = sw_corner
     self.height = height
     self.width = width
     self.rect = Cell(sw_corner, width, height, edgecolor='#000000', facecolor=facecolor)
     self.rect._loc = 'center'
     # self.rect.angle = 45.0
     label = "{0}".format(who)
     self.rect.get_text().set_text(label)
     self.rect.set_gid(who)
コード例 #3
0
ファイル: orngClustering.py プロジェクト: stefie10/slu_hri
 def __init__(self, *args, **kwargs):
     Cell.__init__(self, *args, **kwargs)
     self._text.set_clip_on(True)