def drawAnno( self, a ): random.seed(a) colormap = SplitStrokeVisualizer.COLORMAP color = random.choice(colormap.keys()) for s in a.getComponentStrokes(): SketchGUI.drawStroke(s, width = 2, color = color)
def drawMyself( self ): for a in self.annotation_list: center = GeomUtils.centroid(a.Strokes[0].Points) #Ugly hack to get the center of the annotation! templ_stroke = Stroke.Stroke(a.template) templ_stroke = templ_stroke.translate(center.X, center.Y) SketchGUI.drawText(center.X, center.Y, InText=a.name) SketchGUI.drawStroke(templ_stroke, color="#F050F0")
def drawMyself(self, color=None): from SketchFramework import SketchGUI as GUI if color: drawColor = color else: drawColor = self.Color if len(self.Points) > 0: GUI.drawStroke(self, color=drawColor, erasable = True)
def drawAnno( self, a ): right_color = "#CF0000" left_color = "#0000C0" for wall in a.rightwalls: #Strokes rtv_logger.debug("Drawing right wall") wall = GeomUtils.strokeSmooth(wall, width = 6, preserveEnds = True) SketchGUI.drawStroke(wall, width = 2, color = right_color) for wall in a.leftwalls: #Strokes rtv_logger.debug("Drawing left wall") SketchGUI.drawStroke(wall, width = 2, color = left_color)
def drawMyself(self, color=None): from SketchFramework import SketchGUI as GUI if color: drawColor = color else: drawColor = self.Color #if len(self.Points) == 1: # GUI.drawCircle( self.Points[0].X, self.Points[0].Y, radius=0,color=drawColor) #elif len(self.Points) > 1: GUI.drawStroke(self, color=drawColor, erasable = True)