def draw_label(self): px, py = self.trot(0, 1.0) pic().draw_text(px, py, self.label, anchor='south', rotation=self.angle)
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)
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()
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)
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)
def draw_value(self): x, y = self.trot(0, -0.75) pic().draw_text(x, y, self.value, anchor='center', rotation=self.angle)
def draw_label(self): x, y = self.trot(0, 0.75) pic().draw_text(x, y, self.label, anchor='center', rotation=self.angle)
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')
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)
def __init__(self, name): self.paths = list() self.nodes = list() self.pic = pic(name)
def draw_value(self): px, py = self.trot(0, -1) pic().draw_text(px, py, self.value, anchor='north', rotation=self.angle)
def draw_value(self): pic().draw_text(self.x, self.y, self.value, anchor='center', rotation=self.angle)