Exemple #1
0
 def draw(self):
     clr1 = self.color
     clr2 = self.pressed and [v * 0.85 for v in self.color] or self.color
     translate(self.width / 2, self.height / 2)
     image(self.src["socket"], -self.width / 2, -self.height / 2, color=clr1)
     rotate(360 - self.value)
     image(self.src["face"], -self.width / 2, -self.height / 2, color=clr2)
Exemple #2
0
 def draw(self):
     im1, im2 = self.src["top"], self.src["face"]
     if self.canvas is not None and \
       (self.anchor == LEFT  and self.x == 0) or \
       (self.anchor == RIGHT and self.x == self.canvas.width-self.width):
         image(im1, 0, self.height-im1.height, width=self.width)
         image(im2, 0, -self.canvas.height+self.height, width=self.width, height=self.canvas.height-im1.height)
     else:
         Panel.draw(self)
Exemple #3
0
 def draw(self):
     im1, im2 = self.src["top"], self.src["face"]
     if self.canvas is not None and \
       (self.anchor == LEFT  and self.x == 0) or \
       (self.anchor == RIGHT and self.x == self.canvas.width-self.width):
         image(im1, 0, self.height-im1.height, width=self.width)
         image(im2, 0, -self.canvas.height+self.height, width=self.width, height=self.canvas.height-im1.height)
     else:
         Panel.draw(self)
Exemple #4
0
 def draw(self):
     t = self._t * self.width
     im1, im2, im3, im4  = self.src["cap1"], self.src["cap2"], self.src["face1"], self.src["face2"]
     image(im1, x=0, y=0)
     image(im2, x=self.width-im2.width, y=0)
     image(im3, x=im1.width, y=0, width=t-im1.width)
     image(im4, x=t, y=0, width=self.width-t-im2.width+1)
Exemple #5
0
 def draw(self):
     t = self._t * self.width
     im1, im2, im3, im4  = self.src["cap1"], self.src["cap2"], self.src["face1"], self.src["face2"]
     image(im1, x=0, y=0)
     image(im2, x=self.width-im2.width, y=0)
     image(im3, x=im1.width, y=0, width=t-im1.width)
     image(im4, x=t, y=0, width=self.width-t-im2.width+1)
Exemple #6
0
 def draw(self):
     t = self._t * self.width
     im1, im2, im3, im4 = self.src["cap1"], self.src["cap2"], self.src["face1"], self.src["face2"]
     clr = self.color
     image(im1, x=0, y=0, color=clr)
     image(im2, x=self.width - im2.width, y=0, color=clr)
     image(im3, x=im1.width, y=0, width=t - im1.width, color=clr)
     image(im4, x=t, y=0, width=self.width - t - im2.width + 1, color=clr)
Exemple #7
0
 def draw(self):
     im1, im2 = self.src["top"], self.src["face"]
     if (
         self.canvas is not None
         and (self.anchor == LEFT and self.x == 0)
         or (self.anchor == RIGHT and self.x == self.canvas.width - self.width)
     ):
         clr = self.color
         image(im1, 0, self.height - im1.height, width=self.width, color=clr)
         image(
             im2,
             0,
             -self.canvas.height + self.height,
             width=self.width,
             height=self.canvas.height - im1.height,
             color=clr,
         )
     else:
         Panel.draw(self)
Exemple #8
0
 def draw(self):
     clr = self.color
     im1, im2, im3 = self.src["cap1"], self.src["cap2"], self.src["face"]
     image(im1, 0, 0, height=self.height, color=clr)
     image(im2, x=self.width - im2.width, height=self.height, color=clr)
     image(im3, x=im1.width, width=self.width - im1.width - im2.width, height=self.height, color=clr)
     Editable.draw(self)
Exemple #9
0
 def draw(self):
     clr = self.parent.pressed | self.pressed and (0.75, 0.75, 0.75) or (1.0, 1.0, 1.0)
     image(self.parent.src["handle"], 0, 0, color=clr)
Exemple #10
0
 def draw(self):
     clr = self.pressed and (0.75, 0.75, 0.75) or (1.0, 1.0, 1.0)
     image(self.src["face"], 0, 0, color=clr)
Exemple #11
0
 def draw(self):
     clr = self.pressed and [v * 0.75 for v in self.color] or self.color
     image(self.src["face"], 0, 0, color=clr)
Exemple #12
0
 def draw(self):
     clr = self.parent.pressed | self.pressed and [v * 0.75 for v in self.color] or self.color
     image(self.parent.src["handle"], 0, 0, color=clr)
Exemple #13
0
 def draw(self):
     translate(self.width/2, self.height/2)
     image(self.src["socket"], -self.width/2, -self.height/2)
     rotate(360-self.value)
     clr = self.pressed and (0.85, 0.85, 0.85) or (1.0, 1.0, 1.0)
     image(self.src["face"], -self.width/2, -self.height/2, color=clr)
Exemple #14
0
 def draw(self):
     clr = self.pressed and [v * 0.75 for v in self.color] or self.color
     im1, im2, im3 = self.src["cap1"], self.src["cap2"], self.src["face"]
     image(im1, 0, 0, height=self.height, color=clr)
     image(im2, x=self.width - im2.width, height=self.height, color=clr)
     image(im3, x=im1.width, width=self.width - im1.width - im2.width, height=self.height, color=clr)
Exemple #15
0
 def draw(self):
     image(self.value and self.src["checked"] or self.src["face"])
Exemple #16
0
 def draw(self):
     im1, im2, im3 = self.src["cap1"], self.src["cap2"], self.src["face"]
     image(im1, 0, 0, height=self.height)
     image(im2, x=self.width-im2.width, height=self.height)
     image(im3, x=im1.width, width=self.width-im1.width-im2.width, height=self.height)
     Editable.draw(self)
Exemple #17
0
 def draw(self):
     image(self.value and self.src["checked"] or self.src["face"])
Exemple #18
0
 def draw(self):
     translate(self.width/2, self.height/2)
     image(self.src["socket"], -self.width/2, -self.height/2)
     rotate(360-self.value)
     clr = self.pressed and (0.85, 0.85, 0.85) or (1.0, 1.0, 1.0)
     image(self.src["face"], -self.width/2, -self.height/2, color=clr)
Exemple #19
0
 def draw(self):
     clr = self.pressed and (0.75, 0.75, 0.75) or (1.0, 1.0, 1.0)
     im1, im2, im3 = self.src["cap1"], self.src["cap2"], self.src["face"]
     image(im1, 0, 0, height=self.height, color=clr)
     image(im2, x=self.width-im2.width, height=self.height, color=clr)
     image(im3, x=im1.width, width=self.width-im1.width-im2.width, height=self.height, color=clr)
Exemple #20
0
 def draw(self):
     clr = self.pressed and (0.75, 0.75, 0.75) or (1.0, 1.0, 1.0)
     image(self.src["face"], 0, 0, color=clr)
Exemple #21
0
 def draw(self):
     clr = self.pressed and (0.75, 0.75, 0.75) or (1.0, 1.0, 1.0)
     im1, im2, im3 = self.src["cap1"], self.src["cap2"], self.src["face"]
     image(im1, 0, 0, height=self.height, color=clr)
     image(im2, x=self.width-im2.width, height=self.height, color=clr)
     image(im3, x=im1.width, width=self.width-im1.width-im2.width, height=self.height, color=clr)
Exemple #22
0
 def draw(self):
     clr = self.color
     image(self.value and self.src["checked"] or self.src["face"], color=clr)
Exemple #23
0
 def draw(self):
     im1, im2, im3 = self.src["cap1"], self.src["cap2"], self.src["top"]
     im4, im5, im6 = self.src["cap3"], self.src["cap4"], self.src["bottom"]
     im7, im8, im9 = self.src["left"], self.src["right"], self.src["face"]
     clr = self.color
     image(im1, 0, self.height - im1.height, color=clr)
     image(im2, self.width - im2.width, self.height - im2.height, color=clr)
     image(im3, im1.width, self.height - im3.height, width=self.width - im1.width - im2.width, color=clr)
     image(im4, 0, 0, color=clr)
     image(im5, self.width - im5.width, 0, color=clr)
     image(im6, im4.width, 0, width=self.width - im4.width - im5.width, color=clr)
     image(im7, 0, im4.height, height=self.height - im1.height - im4.height, color=clr)
     image(im8, self.width - im8.width, im4.height, height=self.height - im2.height - im5.height, color=clr)
     image(
         im9,
         im4.width,
         im6.height,
         width=self.width - im7.width - im8.width,
         height=self.height - im3.height - im6.height,
         color=clr,
     )
Exemple #24
0
 def draw(self):
     clr = self.parent.pressed | self.pressed and (0.75, 0.75, 0.75) or (1.0, 1.0, 1.0)
     image(self.parent.src["handle"], 0, 0, color=clr)
Exemple #25
0
 def draw(self):
     im1, im2, im3 = self.src["cap1"], self.src["cap2"],  self.src["top"]
     im4, im5, im6 = self.src["cap3"], self.src["cap4"],  self.src["bottom"]
     im7, im8, im9 = self.src["left"], self.src["right"], self.src["face"]
     image(im1, 0, self.height-im1.height)
     image(im2, self.width-im2.width, self.height-im2.height)
     image(im3, im1.width, self.height-im3.height, width=self.width-im1.width-im2.width)
     image(im4, 0, 0)
     image(im5, self.width-im5.width, 0)
     image(im6, im4.width, 0, width=self.width-im4.width-im5.width)
     image(im7, 0, im4.height, height=self.height-im1.height-im4.height)
     image(im8, self.width-im8.width, im4.height, height=self.height-im2.height-im5.height)
     image(im9, im4.width, im6.height, width=self.width-im7.width-im8.width, height=self.height-im3.height-im6.height)