예제 #1
0
 def draw_label(self):
     px, py = self.trot(0, 1.0)
     pic().draw_text(px,
                     py,
                     self.label,
                     anchor='south',
                     rotation=self.angle)
예제 #2
0
    def draw_label(self):

        if self.south_label:
            px, py = self.trot(0, -0.6)
            a = 'north'
        else:
            px, py = self.trot(0, 0.6)
            a = 'south'
        pic().draw_text(px, py, self.label, anchor=a, rotation=self.angle)
예제 #3
0
파일: node.py 프로젝트: cbosoft/cpy
    def draw(self):
        paths = self.paths()

        pic().draw_paths_transformed(paths, shift=(self.x, self.y), rotation=(self.angle), scale=self.scale)

        if self.label:
            self.draw_label()

        if self.value:
            self.draw_value()
예제 #4
0
파일: transistor.py 프로젝트: cbosoft/cpy
 def draw_value(self):
     if self.label:
         x, y = self.trot(0.5, -0.4)
     else:
         x, y = self.trot(0.5, 0.0)
     angle = int(self.angle) % 180
     if angle > 0:
         a = 'center'
     else:
         a = 'west'
     pic().draw_text(x, y, self.value, anchor=a)
예제 #5
0
    def draw_label(self):
        if self.show_named:
            for name, i in self.named_ports.items():
                px, py = self.port(i)
                if py > 0:
                    py -= 0.7
                    a = 'east'
                else:
                    py += 0.7
                    a = 'west'
                x, y = self.trot(px, py)
                pic().draw_text(x, y, name, anchor=a, rotation=self.angle + 90)

        pic().draw_text(self.x,
                        self.y,
                        self.label,
                        anchor='center',
                        rotation=self.angle)
예제 #6
0
파일: source.py 프로젝트: cbosoft/cpy
 def draw_value(self):
     x, y = self.trot(0, -0.75)
     pic().draw_text(x, y, self.value, anchor='center', rotation=self.angle)
예제 #7
0
파일: source.py 프로젝트: cbosoft/cpy
 def draw_label(self):
     x, y = self.trot(0, 0.75)
     pic().draw_text(x, y, self.label, anchor='center', rotation=self.angle)
예제 #8
0
파일: group.py 프로젝트: cbosoft/cpy
 def draw_label(self):
     pic().draw_text(self.x+0.5, self.y+0.5, self.label, anchor='south west', colour='gray', default_size='huge')
예제 #9
0
 def draw_label(self):
     angle = int(self.angle) % 180
     px, py = rot(0, 2.0 * abs(self.scale[1]), angle)
     pic().draw_text(*self.trf(px, py), self.label, rotation=angle)
예제 #10
0
 def __init__(self, name):
     self.paths = list()
     self.nodes = list()
     self.pic = pic(name)
예제 #11
0
 def draw_value(self):
     px, py = self.trot(0, -1)
     pic().draw_text(px, py, self.value, anchor='north', rotation=self.angle)
예제 #12
0
 def draw_value(self):
     pic().draw_text(self.x, self.y, self.value, anchor='center', rotation=self.angle)