Ejemplo n.º 1
0
    def run(self):
        if self.wall.width < 8 or self.wall.height < 8:
            return

        color = random.random()
        foreground = (color, 1, 1)
        # Make the foreground and background complementary colors.
        background = ((color + .5) % 1, 1, 1)

        # Center the letters on the wall
        x_offset = int((self.wall.width - 8) / 2)
        y_offset = int((self.wall.height - 8) / 2)

        # Display upper and lower case letters. The break between 90 and 97 is
        # for non-letter keyboard characters.
        #for ord in range(65, 91) + range(97, 123):
        name = [75, 73, 77, 74, 73, 78, 72, 89, 85, 78]
        for ord in name:
            self.wall.clear()

            # Set every pixel to the background color, since ascii8x8 will only
            # color an 8x8 section.
            for x in range(self.wall.width):
                for y in range(self.wall.height):
                    self.wall.set_pixel(x, y, background)

            # Color the letter.
            ascii8x8.draw_chr(chr(ord), self.wall, foreground, background,
                              x_offset, y_offset)
            self.wall.draw()
            time.sleep(.7)
Ejemplo n.º 2
0
    def run(self):
        if self.wall.width < 8 or self.wall.height < 8:
            return

        color = random.random()
        foreground = (color, 1, 1)
        # Make the foreground and background complementary colors.
        background = ((color + .5) % 1, 1, 1)

        # Center the letters on the wall
        x_offset = int((self.wall.width - 8) / 2)
        y_offset = int((self.wall.height - 8) / 2)

        # Display upper and lower case letters. The break between 90 and 97 is
        # for non-letter keyboard characters.
        for ch in tuple('Jae-Myeong Lee'):
            self.wall.clear()

            # Set every pixel to the background color, since ascii8x8 will only
            # color an 8x8 section.
            for x in range(self.wall.width):
                for y in range(self.wall.height):
                    self.wall.set_pixel(x, y, background)

            # Color the letter.
            ascii8x8.draw_chr(ch, self.wall, foreground, background, x_offset,
                              y_offset)
            self.wall.draw()
            time.sleep(.1)
Ejemplo n.º 3
0
    def run(self):
        if self.wall.width < 8 or self.wall.height < 8:
            return

        color = random.random()
        foreground = (color, 1, 1)
        # Make the foreground and background complementary colors.
        background = ((color + .5) % 1, 1, 1)

        # Center the letters on the wall
        x_offset = int((self.wall.width - 8) / 2)
        y_offset = int((self.wall.height - 8) / 2)

        # Display upper and lower case letters. The break between 90 and 97 is
        # for non-letter keyboard characters.
        for ord in range(65, 91) + range(97, 123):
            self.wall.clear()

            # Set every pixel to the background color, since ascii8x8 will only
            # color an 8x8 section.
            for x in range(self.wall.width):
                for y in range(self.wall.height):
                    self.wall.set_pixel(x, y, background)

            # Color the letter.
            ascii8x8.draw_chr(chr(ord), self.wall, foreground, background,
                              x_offset, y_offset)
            self.wall.draw()
            time.sleep(.1)
Ejemplo n.º 4
0
    def run(self):
        color = random.random()
        foreground = (color, 1, 1)
        background = ((color + .5) % 1, 1, 1)

        # Center the letters on the wall
        x_offset = int((self.wall.width - 8) / 2)
        y_offset = int((self.wall.height - 8) / 2)

        for ord in range(65, 123):
            self.wall.clear()

            # Color everything with the background color
            for i in range(self.wall.width):
                for j in range(self.wall.height):
                    self.wall.pixel(i, j).hsv = background

            # Color the foreground letter
            ascii8x8.draw_chr(chr(ord),
                              self.wall,
                              foreground,
                              background,
                              x_offset=x_offset,
                              y_offset=y_offset)
            self.wall.draw()
            time.sleep(.2)
Ejemplo n.º 5
0
    def run(self):
        color = random.random()
        foreground = (color, 1, 1)
        background = ((color + .5) % 1, 1, 1)

        # Center the letters on the wall
        x_offset = int((self.wall.width - 8) / 2)
        y_offset = int((self.wall.height - 8) / 2)

        for ord in range(65, 123):
            self.wall.clear()

            # Color everything with the background color
            for i in range(self.wall.width):
                for j in range(self.wall.height):
                    self.wall.pixel(i, j).hsv = background

            # Color the foreground letter
            ascii8x8.draw_chr(chr(ord), self.wall, foreground, background,
                              x_offset=x_offset, y_offset=y_offset)
            self.wall.draw()
            time.sleep(.2)
Ejemplo n.º 6
0
def LetterTest(wall):
    """
    Cycle through the letters of the alphabet.

    Minimum wall size: 8 x 8.
    """
    print "LetterTest"
    wall.clear()

    if wall.width < 8 or wall.height < 8:
        return

    color = random.random()
    foreground = (color, 1, 1)
    # Make the foreground and background complementary colors.
    background = ((color + .5) % 1, 1, 1)

    # Center the letters on the wall
    x_offset = int((wall.width - 8) / 2)
    y_offset = int((wall.height - 8) / 2)

    # Display upper and lower case letters. The break between 90 and 97 is
    # for non-letter keyboard characters.
    for ord in range(65, 91) + range(97, 123):
        wall.clear()

        # Set every pixel to the background color, since ascii8x8 will only
        # color an 8x8 section.
        for x in range(wall.width):
            for y in range(wall.height):
                wall.set_pixel(x, y, background)

        # Color the letter.
        ascii8x8.draw_chr(chr(ord), wall, foreground, background,
                          x_offset, y_offset)
        wall.draw()
        time.sleep(.1)
Ejemplo n.º 7
0
class LetterTest(Effect):
    """
    Cycle through the letters of the alphabet.

    Minimum wall size: 8 x 8.
    """
    def run(self):
        if self.wall.width < 8 or self.wall.height < 8:
            return

        color = random.random()
        foreground = (color, 1, 1)
        # Make the foreground and background complementary colors.
        background = ((color + .5) % 1, 1, 1)

        # Center the letters on the wall
        x_offset = int((self.wall.width - 8) / 2)
        y_offset = int((self.wall.height - 8) / 2)

        # Display upper and lower case letters. The break between 90 and 97 is
        # for non-letter keyboard characters.
          lgh=[76,71,72]
        for ord in lgh:
            self.wall.clear()

            # Set every pixel to the background color, since ascii8x8 will only
            # color an 8x8 section.
            for x in range(self.wall.width):
                for y in range(self.wall.height):
                    self.wall.set_pixel(x, y, background)

            # Color the letter.
            ascii8x8.draw_chr(chr(ord), self.wall, foreground, background,
                              x_offset, y_offset)
            self.wall.draw()
            time.sleep(.1)