Пример #1
0
    def __init__(self, anchor, w, h, color=(100, 100, 100)):

        super().__init__(anchor)

        self.w = w
        self.h = h
        self.color = color
        self.shape = Shapes.make_rect(self.anchor, self.w, self.h, color=self.color, as_vertexlist = True)
Пример #2
0
    def draw(self):
        verts, colors = Shapes.make_rect(self.anchor, self.w, self.h, color=self.color)
        self.shape.vertices = verts[1]
        self.shape.draw(pyglet.gl.GL_POLYGON)

        super().draw()