Exemplo n.º 1
0
    def build_boxes(self):

        intervals = Intervals()
        intervals.interval_type = self.interval_type
        intervals.x = self.x
        intervals.start = self.start
        intervals.finish = self.finish
        intervals.resolution = self.resolution
        intervals.week_start = self.week_start

        box = Rectangle()
        box.y = self.y
        box.height = self.height
        box.border_rounding = self.box_rounding
        box.border_color = self.box_border_color
        box.border_width = self.box_border_width

        boxes = str()

        for i in intervals.get_intervals():
            box.x = i[0]
            box.width = i[1]
            if i[4] is False:
                box.fill_color = self.ends
            else:
                box.fill_color = self.box_fill
            boxes += box.svg

        return boxes
Exemplo n.º 2
0

app = App(width=600, height=600)
button = PushButton(app, changeMe, text="Click me")

p = Paper(app)
t = Triangle(p)
t.randomize()
t.draw()

t2 = Triangle(p)
t2.randomize()
t2.draw()

r = Rectangle(p)
r.randomize()
r.width = 400

r.draw()
r.color = 'red'
r.width = 20

app.display()

#p = Paper()
#p.mainloop()

#tri = Triangle()
#tri.randomize()
#tri.draw()