mirror of https://github.com/kivy/kivy.git
fix text and tuio syntax
This commit is contained in:
parent
3fd96a6850
commit
b147695958
|
@ -253,21 +253,21 @@ class LabelBase(object):
|
||||||
assert(data)
|
assert(data)
|
||||||
|
|
||||||
# create texture is necessary
|
# create texture is necessary
|
||||||
if self.texture is None:
|
texture = self.texture
|
||||||
self.texture = Texture.create(size=self.size)
|
if texture is None:
|
||||||
self.texture.flip_vertical()
|
texture = Texture.create(size=self.size)
|
||||||
w = self.texture.width
|
texture.flip_vertical()
|
||||||
h = self.texture.height
|
elif self.width > texture.width or self.height > texture.height:
|
||||||
elif self.width > w or self.height > h:
|
texture = Texture.create(size=self.size)
|
||||||
self.texture = Texture.create(size=self.size)
|
texture.flip_vertical()
|
||||||
self.texture.flip_vertical()
|
|
||||||
else:
|
else:
|
||||||
self.texture = self.texture.get_region(
|
texture = texture.get_region(
|
||||||
0, 0, self.width, self.height)
|
0, 0, self.width, self.height)
|
||||||
|
|
||||||
#self.texture = Texture.create_from_data(data)
|
self.texture = texture
|
||||||
|
|
||||||
# update texture
|
# update texture
|
||||||
self.texture.blit_data(data)
|
texture.blit_data(data)
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
'''Force re-rendering of the text'''
|
'''Force re-rendering of the text'''
|
||||||
|
|
|
@ -236,7 +236,7 @@ class Tuio2dObjTouch(TuioTouch):
|
||||||
if len(args) < 5:
|
if len(args) < 5:
|
||||||
self.sx, self.sy = args[0:2]
|
self.sx, self.sy = args[0:2]
|
||||||
self.profile = ('pos', )
|
self.profile = ('pos', )
|
||||||
self.fid, self.sx, self.sy, self.a, self.X, self.Y = args[:6]
|
self.fid, self.sx, self.sy, self.a, self.X, self.Y = args[:6]
|
||||||
elif len(args) == 9:
|
elif len(args) == 9:
|
||||||
self.A, self.m, self.r = args[6:9]
|
self.A, self.m, self.r = args[6:9]
|
||||||
self.Y = -self.Y
|
self.Y = -self.Y
|
||||||
|
|
Loading…
Reference in New Issue