def build(self): s = ScatterPlane(scale=.5) l1 = Label(text='Kivy rulz', font_size=98, pos=(400, 100), mipmap=True) l2 = Label(text='Kivy rulz', font_size=98, pos=(400, 328)) s.add_widget(l1) s.add_widget(l2) return s
def build(self): s = ScatterPlane(scale=.5) l1 = Label(text='55', font_size=60, pos=(400, 100)) l2 = Label(text='66', font_size=60, pos=(400, 356)) s.add_widget(l1) s.add_widget(l2) return s
class SVGTestApp(App): def build(self): self.root = ScatterPlane(scale=0.25) county_data = json_load('counties.json') for county in county_data.values(): self.root.add_widget(County(**county)) return self.root
def build (self): """ Function doc """ s = ScatterPlane(scale=.5) l1 = Label(text='Python', font_size=200, pos=(750, 500), mipmap=True) l2 = Label(text='kivy', font_size=200, pos=(750,728)) s.add_widget(l1) s.add_widget(l2) return s
def build(self): s = ScatterPlane(scale=.5) filename = join(kivy.kivy_data_dir, 'logo', 'kivy-icon-256.png') l1 = Image(source=filename, pos=(400, 100), size=(256, 256)) l2 = Image(source=filename, pos=(400, 356), size=(256, 256), mipmap=True) s.add_widget(l1) s.add_widget(l2) return s
def widget_factory(self): widget = ScatterPlane(size=self.size) widget.center = self.pos with widget.canvas: if self.texture: Rectangle(pos=(0, 0), texture=self.texture, size=self.size) else: Color(0, 0, 1, 1) Rectangle(pos=(0, 0), size=self.size) return widget
def widget_factory(self): widget = ScatterPlane(size=self.size) widget.center = self.pos with widget.canvas: if not self.texture: Color(1, 0, 1, 1) Ellipse(pos=(0, 0), size=self.size) else: Ellipse(pos=(0, 0), texture=self.texture, size=self.size) return widget
def build(self): ikon=content[3] s = ScatterPlane(scale=.5) filename=join(imdir, 'background.png') print filename[:-1] filename2=join(imdir,content[1][:-1]) print filename2 im=Image(source=filename2,size=(1920,1090)) img=Image.open(filename2) exif_data=img._getexif(); s.add_widget(im) return s
def add_static_rect(self): body = cy.Body() box = cy.Poly.create_box(body, size=(200., 100.)) box.elasticity = 0. body.position = 400., 100. self.space.add(box) widget = ScatterPlane(size=(200., 100.)) with widget.canvas: Color(0., 1, 0, 1) Rectangle(pos=(0, 0), size=(200, 100)) self.add_widget(widget) widget.center = body.position.x, body.position.y
def __init__(self, *args, **kw): kw.setdefault('size', (Window.width, Window.height)) super(BasePicture, self).__init__(*args, **kw) self.picture = Image(self.IMG_PATH).texture grass_background(self) scatter = ScatterPlane(size=self.picture.size, do_translation=False, do_rotation=False, do_scale=False) with scatter.canvas: Rectangle(size=scatter.size, texture=self.picture) scale = Window.height/float(self.picture.size[1]) scatter.scale = scale self.picture_holder = scatter self.add_widget(scatter) self.picture_holder.center = Window.center
def create_widget(self, **kw): size = self.radius * 2, self.radius * 2 widget = ScatterPlane(pos=(0, 0), size=size) with widget.canvas: Color(*self.color) Ellipse(pos=(0, 0), size=size) return widget
def add_rectangle(self, x, y, width, height, color=(1, 0, 0)): moment = cy.moment_for_box(100., width, height) body = cy.Body(100, moment) body.position = x, y box = cy.Poly.create_box(body, size=(width, height)) box.elasticity = 0. self.space.add(box, body) widget = ScatterPlane(pos=(0., 0.), size=(width, height)) with widget.canvas: Color(*color) rect = Rectangle(pos=(0, 0), size=(width, height)) self.rects.append((body, widget, rect)) self.add_widget(widget)
def build(self): s = ScatterPlane(scale=.5) l2 = Label(text='Benchmarking', font_size=80, pos=(700, 750)) l1 = Label( text= 'Proceso sistemático de investigar, identificar, comparar y aprender de las mejores prácticas de otras organizaciones', font_size=30, pos=(700, 560), mipmap=True) l3 = Label(text='abbbb', font_size=30, pos=(700, 510)) s.add_widget(l2) s.add_widget(l1) s.add_widget(l3) return s
def create_widget(self, **kw): widget = ScatterPlane(pos=(0, 0), size=self.size) with widget.canvas: Color(*self.color) Rectangle(pos=(0, 0), size=self.size) return widget