コード例 #1
0
 def depack(self, args):
     self.shape = ShapeRect()
     self.sx, self.sy = args[0], args[1]
     self.shape.width = args[2][0]
     self.shape.height = args[2][1]
     self.size = self.shape.width * self.shape.height
     super().depack(args)
コード例 #2
0
 def depack(self, args):
     self.is_touch = True
     self.shape = ShapeRect()
     self.sx, self.sy = args[0], args[1]
     self.shape.width = args[2]
     self.shape.height = args[2]
     self.profile = ('pos', 'shape')
     super(MacMotionEvent, self).depack(args)
コード例 #3
0
 def depack(self, args):
     self.is_touch = True
     self.profile = ['pos', 'pressure', 'shape']
     self.sx, self.sy, self.pressure, radius = args
     self.shape = ShapeRect()
     self.shape.width = radius
     self.shape.height = radius
     super(AndroidMotionEvent, self).depack(args)
コード例 #4
0
 def depack(self, args):
     self.sx, self.sy, self.a, self.X, self.Y, sw, sh, sd, \
         self.A, self.m, self.r = args
     self.Y = -self.Y
     if self.shape is None:
         self.shape = ShapeRect()
         self.shape.width = sw
         self.shape.height = sh
     self.sy = 1 - self.sy
     super().depack(args)
コード例 #5
0
 def depack(self, args):
     self.is_touch = True
     self.sx, self.sy, self.a, self.X, self.Y, sw, sh, sd, \
         self.A, self.m, self.r = args
     self.Y = -self.Y
     self.profile = ('pos', 'angle', 'mov', 'rot', 'rotacc', 'acc', 'shape')
     if self.shape is None:
         self.shape = ShapeRect()
         self.shape.width = sw
         self.shape.height = sh
     self.sy = 1 - self.sy
     super(Tuio2dBlbMotionEvent, self).depack(args)
コード例 #6
0
ファイル: linuxwacom.py プロジェクト: psydox/kivy
 def depack(self, args):
     self.sx = args['x']
     self.sy = args['y']
     self.profile = ['pos']
     if 'size_w' in args and 'size_h' in args:
         self.shape = ShapeRect()
         self.shape.width = args['size_w']
         self.shape.height = args['size_h']
         self.profile.append('shape')
     if 'pressure' in args:
         self.pressure = args['pressure']
         self.profile.append('pressure')
     super().depack(args)
コード例 #7
0
ファイル: linuxwacom.py プロジェクト: xyqgcs/kivy
 def depack(self, args):
     self.is_touch = True
     self.sx = args['x']
     self.sy = args['y']
     self.profile = ['pos']
     if 'size_w' in args and 'size_h' in args:
         self.shape = ShapeRect()
         self.shape.width = args['size_w']
         self.shape.height = args['size_h']
         self.profile.append('shape')
     if 'pressure' in args:
         self.pressure = args['pressure']
         self.profile.append('pressure')
     super(LinuxWacomMotionEvent, self).depack(args)
コード例 #8
0
 def depack(self, args):
     self.is_touch = True
     if len(args) < 5:
         self.sx, self.sy = map(float, args[0:2])
         self.profile = ('pos', )
     elif len(args) == 5:
         self.sx, self.sy, self.X, self.Y, self.m = map(float, args[0:5])
         self.Y = -self.Y
         self.profile = ('pos', 'mov', 'motacc')
     else:
         self.sx, self.sy, self.X, self.Y = map(float, args[0:4])
         self.m, width, height = map(float, args[4:7])
         self.Y = -self.Y
         self.profile = ('pos', 'mov', 'motacc', 'shape')
         if self.shape is None:
             self.shape = ShapeRect()
         self.shape.width = width
         self.shape.height = height
     self.sy = 1 - self.sy
     super(Tuio2dCurMotionEvent, self).depack(args)
コード例 #9
0
 def depack(self, args):
     if len(args) < 5:
         self.sx, self.sy = list(map(float, args[0:2]))
         self.profile = ('pos', )
     elif len(args) == 5:
         self.sx, self.sy, self.X, self.Y, self.m = list(
             map(float, args[0:5]))
         self.Y = -self.Y
         self.profile = ('pos', 'mov', 'motacc')
     else:
         self.sx, self.sy, self.X, self.Y = list(map(float, args[0:4]))
         self.m, width, height = list(map(float, args[4:7]))
         self.Y = -self.Y
         self.profile = ('pos', 'mov', 'motacc', 'shape')
         if self.shape is None:
             self.shape = ShapeRect()
         self.shape.width = width
         self.shape.height = height
     self.sy = 1 - self.sy
     super().depack(args)
コード例 #10
0
 def depack(self, args):
     if len(args) < 5:
         self.sx, self.sy = args[0:2]
         self.profile = ('pos', )
     elif len(args) == 9:
         self.fid, self.sx, self.sy, self.a, self.X, self.Y = args[:6]
         self.A, self.m, self.r = args[6:9]
         self.Y = -self.Y
         self.profile = ('markerid', 'pos', 'angle', 'mov', 'rot', 'motacc',
                         'rotacc')
     else:
         self.fid, self.sx, self.sy, self.a, self.X, self.Y = args[:6]
         self.A, self.m, self.r, width, height = args[6:11]
         self.Y = -self.Y
         self.profile = ('markerid', 'pos', 'angle', 'mov', 'rot', 'rotacc',
                         'acc', 'shape')
         if self.shape is None:
             self.shape = ShapeRect()
             self.shape.width = width
             self.shape.height = height
     self.sy = 1 - self.sy
     super().depack(args)
コード例 #11
0
 def depack(self, args):
     self.sx, self.sy, self.pressure, radius = args
     self.shape = ShapeRect()
     self.shape.width = radius
     self.shape.height = radius
     super().depack(args)