示例#1
0
文件: plonny.py 项目: drogaar/plonny
 def addtext(text, x_offset=0, y_offset=0, **kwargs):
     fontsize = 8
     util.add_text(self.xy['x'] + x_offset,
                   self.xy['y'] + y_offset,
                   text,
                   size=fontsize,
                   **kwargs)
示例#2
0
文件: plonny.py 项目: drogaar/plonny
def add_layer_name(self):
    """Adds the layers name to plot."""
    # txt, x1, y1, x2, y2 = util.add_text(self.xy['x'], self.txt_height, self.name, va='top', ha='left')#, rotation=90
    txt, x1, y1, x2, y2 = util.add_text(self.xy['x'],
                                        self.txt_height,
                                        self.name,
                                        va='top',
                                        ha='right',
                                        rotation=45,
                                        size=18)
    return (txt, x1, y1, x2, y2)
示例#3
0
 def write_mode(self, frame):
     txt = Tracker.MODE_NAMES[self._mode]
     util.add_text(frame, txt, (20, 30), 100)
     return frame
示例#4
0
 def label_points(self, viz_frame):
     for name, point in self._working_set.items():
         screen_point = tuple(map(int, point.tolist()[0]))
         util.add_text(viz_frame, name, screen_point)
     return viz_frame