Example #1
0
 def draw(self):
     scene.background(0,0,1) # 0,0,1 = blue
     self.rect1_layer.update(self.dt)   # alpha animation
     self.rect1_layer.draw()            # alpha animation
     #scene.fill(0,1,0)       # 0,1,0 = green
     #scene.ellipse(*self.rect1) # *self.rect1 = self.rect1[0], ..., self.rect1[3]
     scene.fill(1,0,0)       # 1,0,0 = red
Example #2
0
 def draw(self):
     scene.background(0, 0, 1)  # 0,0,1 = blue
     self.rect1_layer.update(self.dt)  # alpha animation
     self.rect1_layer.draw()  # alpha animation
     #scene.fill(0,1,0)       # 0,1,0 = green
     #scene.ellipse(*self.rect1) # *self.rect1 = self.rect1[0], ..., self.rect1[3]
     scene.fill(1, 0, 0)  # 1,0,0 = red
     scene.ellipse(*self.circle2)
Example #3
0
 def draw(self):
     # Called for every frame (typically 60 per second).
     scene.background(0, 0, 0)
     # Draw a circle for every finger touch
     scene.fill(*self.fgColor)
     for touch in self.touches.values():
         scene.ellipse(touch.location.x - 50, touch.location.y - 50, 100,
                       100)
 def draw(self):
     ''' real time drawing only'''
     scene.background(0, 0, 0)
     if self.touch:
         scene.fill(self.spot_color)
         loc = self.touch.location
         scene.ellipse(loc.x - 50, loc.y - 50, 100, 100)
         scene.text('{}, {}'.format(*loc), 'Futura', 20, 100, 50)
Example #5
0
 def draw(self):
     scene.background(0.09,0.09,0.102)
     scene.image(self.bgImages[self.bgIndex],
                                  200, 300, 300, 300)
     scene.fill(0.3, 0.3, 0.3, 1)
     scene.no_stroke()
     scene.text(theMessage, font_name='Chalkduster',
                            font_size=22, alignment=9)
     scene.ellipse(self.tapLoc.x - 50,
                   self.tapLoc.y - 50, 100, 100)
Example #6
0
    def draw(self):
        scene.push_matrix()
        scene.translate(self.frame.x, self.frame.y)
        scene.no_stroke()
        scene.fill(0.90, 0.90, 0.90)
        for i in self.shapes:
            scene.ellipse(i[0], i[1] - 5, i[2], i[2])

        scene.fill(1.00, 1.00, 1.00)
        for i in self.shapes:
            scene.ellipse(i[0], i[1] + 5, i[2], i[2])
        scene.pop_matrix()
Example #7
0
 def draw(self):
     scene.background(0, 0, 0)
     if self.touch:
         scene.fill('red')
         loc = self.touch.location
         scene.ellipse(loc.x - 50, loc.y - 50, 100, 100)
         scene.text('{}, {}'.format(*loc), 'Futura', 20, 100, 50)
         points.append(loc)  # is it be useful to check if loc == prev_loc?
     elif points:
         scene.fill('blue')
         for loc in points:
             scene.ellipse(loc.x - 50, loc.y - 50, 100, 100)
Example #8
0
 def scene_draw(self):
     if self.touch:
         if (self.magnitude < 0.99 * self.max_length):
             scene.stroke_weight(self.color['normal']['weight'])
             scene.stroke(*self.color['normal']['stroke'])
             scene.fill(*self.color['normal']['fill'])
         else:
             scene.stroke_weight(self.color['highlight']['weight'])
             scene.stroke(*self.color['highlight']['stroke'])
             scene.fill(*self.color['highlight']['fill'])
         scene.ellipse(self.boundary['left'], self.boundary['lower'],
                       2.0 * self.max_length, 2.0 * self.max_length)
         scene.line(self.ref_x, self.ref_y, self.clamp_x, self.clamp_y)
         scene.text(self.label, x=self.ref_x, y=self.ref_y)
Example #9
0
def ellipse(rectangle, borderw=0, borderclr=(0, 0, 0)):
	scene.stroke(*borderclr)
	scene.stroke_weight(borderw)
	scene.ellipse(*rectangle)
Example #10
0
 def draw (self):
     scene.background(0, 0, 0)
     scene.fill(1, 0, 0)
     for touch in self.touches.values():
         x, y = touch.location
         scene.ellipse(x - 50, y - 50, 100, 100)
Example #11
0
 def draw(self):
     scene.background(0, 0, 0)
     scene.fill(1, 0, 0)
     for touch in self.touches.values():
         x, y = touch.location
         scene.ellipse(x - 50, y - 50, 100, 100)
 def draw(self, a=1):
     super(self.__class__, self).draw()
     g = scene.gravity()
     self.frame.x += g.x * 10
     self.frame.y += g.y * 10
     scene.ellipse(self.frame.x, self.frame.y, self.frame.w, self.frame.h)
Example #13
0
 def draw(self):
     scene.background(0, 0, 0)
     if self.touch:
         scene.fill(*self.dot_color)
         x, y = self.touch.location
         scene.ellipse(x - 50, y - 50, 100, 100)
Example #14
0
 def draw(self, a=1):
     super(self.__class__, self).draw()
     g = scene.gravity()
     self.frame.x += g.x * 10
     self.frame.y += g.y * 10
     scene.ellipse(self.frame.x, self.frame.y, self.frame.w, self.frame.h)
Example #15
0
def ellipse(rectangle, borderw=0, borderclr=(0, 0, 0)):
    scene.stroke(*borderclr)
    scene.stroke_weight(borderw)
    scene.ellipse(*rectangle)
 def draw(self):
     scene.background(0, 0, 0)
     if self.touch:
         scene.fill(*self.dot_color)
         x, y = self.touch.location
         scene.ellipse(x - 50, y - 50, 100, 100)