Пример #1
0
 class Wardrobe(wr.Wardrobe):
     modes = {
         wr.MAIN: wr.Mode(fill_colors=('#ba11ad', )),
         'pig': wr.Mode(fill_colors=('#facade', ))
     }
     modes['label'] = modes['pig'].copy(font=wr.Font('Googe Light'))
     font_size = 2
Пример #2
0
        class Wardrobe0(wr.Wardrobe):
            modes = {
                'a': wr.Mode(font=wr.Font('Vot'), bold=True),
                'b': wr.Mode(font=wr.Font('Geb'))
            }
            font_size = 9

            def reset(self):
                self.mode = self.modes['a']
Пример #3
0
class Grayscale(wardrobe.Wardrobe):
    modes = {
        wardrobe.MAIN:
        wardrobe.Mode(fill_colors=(color.BLACK, )),
        wardrobe.ACCENT:
        wardrobe.Mode(fill_colors=(color.GRAY_50, ),
                      stroke_colors=(color.BLACK, )),
        wardrobe.CONTRAST:
        wardrobe.Mode(fill_colors=(color.WHITE, ),
                      stroke_colors=(color.BLACK, ))
    }
Пример #4
0
 class Wardrobe(wr.Wardrobe):
     modes = {
         wr.MAIN:
         wr.Mode(font=wr.Font('Wax'),
                 stroke_colors=('#ffffff', ),
                 thickness=0.03)
     }
     font_size = 3
Пример #5
0
 def test_single(self):
     m0 = wr.Mode(bolder=True)
     self.assertEqual(m0.weight, 'bolder')
     self.assertEqual(m0.style, None)
     m1 = m0.copy(weight='bold', italic=True)
     self.assertEqual(m0.weight, 'bolder')
     self.assertEqual(m0.style, None)
     self.assertEqual(m1.weight, 'bold')
     self.assertEqual(m1.style, 'italic')
     m2 = m0.copy(weight=None, oblique=True)
     self.assertEqual(m0.weight, 'bolder')
     self.assertEqual(m0.style, None)
     self.assertEqual(m1.weight, 'bold')
     self.assertEqual(m1.style, 'italic')
     self.assertEqual(m2.weight, None)
     self.assertEqual(m2.style, 'oblique')
Пример #6
0
 class Wardrobe(wr.Wardrobe):
     modes = {
         wr.MAIN:
         wr.Mode(fill_colors=('#facade', ), stroke_colors=('#f1eece', ))
     }
Пример #7
0
 class Wardrobe(wr.Wardrobe):
     modes = {wr.MAIN: wr.Mode(fill_colors=('#ba11ad', '#f1eece'))}
Пример #8
0
 class Wardrobe(wr.Wardrobe):
     modes = {wr.MAIN: wr.Mode(fill_colors=('#000000', ))}
Пример #9
0
 class Wardrobe(wr.Wardrobe):
     modes = {wr.MAIN: wr.Mode(font=wr.Font('Wax'), thickness=0.02)}
     font_size = 3
Пример #10
0
 class Wardrobe(wr.Wardrobe):
     modes = {wr.MAIN: wr.Mode(font=wr.Font('Wax'))}
     font_size = 4
Пример #11
0
class BasicTextWardrobe(Grayscale):
    modes = {wardrobe.MAIN: wardrobe.Mode(font=font.ARIAL, anchor='middle')}
    font_size = 4
Пример #12
0
 def test_mode_single_argument_direct(self):
     m = wr.Mode(style='oblique')
     self.assertEqual(m.style, 'oblique')
Пример #13
0
 def test_mode_single_argument_indirect(self):
     m = wr.Mode(italic=True)
     self.assertEqual(m.style, 'italic')
Пример #14
0
 class Wardrobe(wr.Wardrobe):
     modes = {wr.MAIN: wr.Mode(stroke_colors=('#f1eece', ))}
Пример #15
0
 def test_mode_redundant_arguments_favour_the_direct(self):
     m = wr.Mode(style='oblique', italic=True)
     self.assertEqual(m.style, 'oblique')
Пример #16
0
 class Wardrobe(wardrobe.Wardrobe):
     '''A wardrobe for drawing a plain background and a black frame.'''
     modes = {wardrobe.MAIN: wardrobe.Mode(fill_colors=(color.NONE,),
                                           thickness=2),
              wardrobe.BACKGROUND: wardrobe.Mode(fill_colors=(color.WHITE,))
              }
Пример #17
0
 class Wardrobe(wardrobe.Wardrobe):
     font_size = 5
     modes = {wardrobe.MAIN: wardrobe.Mode(font=wardrobe.Font('F'))}