ZoomSlider.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:pythonista-scripts 作者: khilnani 项目源码 文件源码
def draw(self):
      ui.set_color((.7,.5,.5))
      if not self.vert:
         path=ui.Path.rounded_rect((self.barvalue-self.barwidth/2.)*self.width,0,self.barwidth*self.width,self.height,self.height*0.1)
      else:
         path=ui.Path.rounded_rect(0,(self.barvalue-self.barwidth/2.)*self.height,self.width, self.barwidth*self.height,self.width*0.1)
      path.fill()
      ui.set_color((0.5,.5,.5))
      path.stroke()
      ui.set_color((0.5,0,0))
      if len(self.touches)==1:
         ui.set_color((0.7,0.7,0))
         path.fill()
      elif len(self.touches)==2:
         ui.set_color((0.7,0.0,0.7))
         path.fill()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号