Beispiel #1
0
    def getLayers(self):
        #word = Words.defaultWordList.pick()
        self.addSolution(self.word)
        #return [
            #Backgrounds.SolidColor(),
            #random.choice([
                #Backgrounds.CroppedImage(),
                #Backgrounds.TiledImage(),
            #    Backgrounds.Grid(size=10)
            #]),
            #Text.TextLayer(word, borderSize=1),
            #Backgrounds.Grid(size=15),
            #Distortions.SineWarp(amplitudeRange=(2, 3.0)),
            #Distortions.WigglyBlocks(blockSize=5),
            #Backgrounds.RandomDots(dotSize=2, numDots=400),
        #    ]

        return [
            Backgrounds.SolidColor(),
            Backgrounds.Grid(size=10),
            Distortions.SineWarp(amplitudeRange=(3, 5.0)),
            Text.TextLayer(self.word, borderSize=0),
            Backgrounds.RandomDots(dotSize=2, numDots=800),
            Distortions.SineWarp(amplitudeRange=(3, 6.0)),
        ]
 def get_layers(self, word):
     return [
         Backgrounds.TiledImage(),
         Backgrounds.RandomDots(),
         Text.TextLayer(word,
                        borderSize=1,
                        fontFactory=self.get_font_factory()),
         #            Distortions.WigglyBlocks(),
     ]
Beispiel #3
0
 def getLayers(self):
     return [
         Backgrounds.SolidColor(),
         Backgrounds.Grid(size=10),            
         Distortions.SineWarp(amplitudeRange=(3, 5.0)),
         Text.TextLayer(self.word, borderSize=0),            
         Backgrounds.RandomDots(dotSize=2, numDots=800),
         Distortions.SineWarp(amplitudeRange=(3, 6.0)),
     ]
Beispiel #4
0
 def getLayers(self):
     word = Words.defaultWordList.pick()
     self.addSolution(word)
     return [
         Backgrounds.TiledImage(),
         Backgrounds.RandomDots(),
         Text.TextLayer(word, borderSize=1),
         Distortions.WigglyBlocks(),
         ]
Beispiel #5
0
    def getLayers(self):
        self.addSolution(self.solution)

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

        return [  # random.choice([ Backgrounds.TiledImage() ]),
            [
                Backgrounds.SolidColor('white'),
                Backgrounds.RandomDots(
                    colors=['yellow', 'blue', 'green', 'red'], numDots=10)
            ],
            textLayer,
            Distortions.SineWarp(),
        ]
Beispiel #6
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