def draw(self): sd.stroke_weight(1) sd.stroke(self.r, self.g, self.b) self.xdata = np.copy(self.xtemp) self.ydata = np.copy(self.ytemp) self.plot(self.xdata, self.ydata)
def setup(self): """ Built-in method of a Scene object from Pythonista """ self.nodes = [] self.w, self.h = (100, 100) scene_drawing.fill(1, 0, 0) scene_drawing.stroke(1, 1, 1) scene_drawing.stroke_weight(2)
def draw(self): if draw_hit_boxes: scene_drawing.stroke_weight(2) scene_drawing.no_fill() scene_drawing.stroke(255,0,0) scene_drawing.rect(*self.cr.frame) scene_drawing.stroke(0,0,255) scene_drawing.rect(*self.sq.frame)
def draw_test(self): sd.stroke_weight(1) sd.stroke(0, 255, 0) timenow = time.time() x = linspace(-30, 0, self.size[0]) y = 100 * sin((x - timenow)) + 10e3 #renormalize data x, y = self.resize(x, y) self.plot(x, y)
def draw(self): #draw Axes sd.stroke_weight(2) sd.stroke(0, 0, 0) sd.line(0,0, 0, self.size[1]) sd.line(0,0, self.size[0], 0) #draw Grid #draw Labels #draw Line sd.stroke_weight(1) sd.stroke(255, 0, 0) for i in range(len(self.xdata) - 1): xpi, ypi = self.rescaler( self.xdata[i], self.ydata[i] ) xpii, ypii = self.rescaler( self.xdata[i+1], self.ydata[i+1] ) sd.line(xpi, ypi, xpii, ypii) pass
def draw(self): if debug: scene_drawing.stroke(255, 0, 0) scene_drawing.stroke_weight(2) scene_drawing.no_fill() scene_drawing.rect(*self.flapo.get_hitbox())