From b147695958b9bccf2e2244edef6fb273865e04eb Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Thu, 13 Jan 2011 13:58:55 +0100 Subject: [PATCH] fix text and tuio syntax --- kivy/core/text/__init__.py | 22 +++++++++++----------- kivy/input/providers/tuio.py | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/kivy/core/text/__init__.py b/kivy/core/text/__init__.py index ddfc4ee19..904cba0f8 100644 --- a/kivy/core/text/__init__.py +++ b/kivy/core/text/__init__.py @@ -253,21 +253,21 @@ class LabelBase(object): assert(data) # create texture is necessary - if self.texture is None: - self.texture = Texture.create(size=self.size) - self.texture.flip_vertical() - w = self.texture.width - h = self.texture.height - elif self.width > w or self.height > h: - self.texture = Texture.create(size=self.size) - self.texture.flip_vertical() + texture = self.texture + if texture is None: + texture = Texture.create(size=self.size) + texture.flip_vertical() + elif self.width > texture.width or self.height > texture.height: + texture = Texture.create(size=self.size) + texture.flip_vertical() else: - self.texture = self.texture.get_region( + texture = texture.get_region( 0, 0, self.width, self.height) - #self.texture = Texture.create_from_data(data) + self.texture = texture + # update texture - self.texture.blit_data(data) + texture.blit_data(data) def refresh(self): '''Force re-rendering of the text''' diff --git a/kivy/input/providers/tuio.py b/kivy/input/providers/tuio.py index 1b5b3d64d..b06ad58bb 100644 --- a/kivy/input/providers/tuio.py +++ b/kivy/input/providers/tuio.py @@ -236,7 +236,7 @@ class Tuio2dObjTouch(TuioTouch): if len(args) < 5: self.sx, self.sy = args[0:2] 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: self.A, self.m, self.r = args[6:9] self.Y = -self.Y