Exemplo n.º 1
0
 def get_layers(self, word):
     return [
         Backgrounds.TiledImage(),
         Backgrounds.RandomDots(),
         Text.TextLayer(word,
                        borderSize=1,
                        fontFactory=self.get_font_factory()),
         #            Distortions.WigglyBlocks(),
     ]
Exemplo n.º 2
0
 def getLayers(self):
     word = Words.defaultWordList.pick()
     self.addSolution(word)
     return [
         Backgrounds.TiledImage(),
         Backgrounds.RandomDots(),
         Text.TextLayer(word, borderSize=1),
         Distortions.WigglyBlocks(),
         ]
Exemplo n.º 3
0
 def getLayers(self):
     word = Words.defaultWordList.pick()
     self.addSolution(word)
     return [
         random.choice([
             Backgrounds.CroppedImage(),
             Backgrounds.TiledImage(),
         ]),
         Text.TextLayer(word, borderSize=1)
     ]
Exemplo n.º 4
0
 def get_layers(self, word):
     return [
         random.choice([
             Backgrounds.CroppedImage(),
             Backgrounds.TiledImage(),
         ]),
         Text.TextLayer(word,
                        borderSize=1,
                        fontFactory=self.get_font_factory()),
         Distortions.SineWarp(),
     ]
Exemplo n.º 5
0
    def getLayers(self):
        self.addSolution(self.solution)

        textLayer = Text.TextLayer(self.solution,
                                   borderSize=1,
                                   fontFactory=self.fontFactory)

        return [
            random.choice([Backgrounds.TiledImage()]),
            textLayer,
            Distortions.SineWarp(),
        ]
Exemplo n.º 6
0
 def getLayers(self):
     word = WordList('basic-english').pick()
     self.addSolution(word)
     return [
         random.choice(
             [Backgrounds.CroppedImage(),
              Backgrounds.TiledImage()]),
         Text.TextLayer(word,
                        borderSize=1,
                        fontFactory=Text.FontFactory(18,
                                                     "vera/VeraBd.ttf")),
         Distortions.SineWarp()
     ]
Exemplo n.º 7
0
 def getLayers(self):
     word = self.word
     ff = Text.FontFactory(26, self.font)
     bg = random.choice([
         Backgrounds.SolidColor(),
         Backgrounds.CroppedImage(),
         Backgrounds.TiledImage(),
     ])
     bg = (bg, Backgrounds.Grid(),
           Distortions.SineWarp(amplitudeRange=(6, 10),
                                periodRange=(0.1, 0.4)))
     layers = [
         bg,
     ]
     if not self.easyMode:
         layers.append(Backgrounds.RandomDots())
     layers.extend([  #Distortions.WigglyBlocks(),
         Text.TextLayer(word, borderSize=1, fontFactory=ff),
         Distortions.SineWarp()
         #Distortions.SineWarp()
     ])
     return layers