Ejemplo n.º 1
0
 def __init__(self,
              nr_states=2,
              pos=(0, 0),
              text=DEFAULT_TEXT,
              textcolor=DEFAULT_TEXTCOLOR,
              textsize=DEFAULT_TEXTSIZE,
              color=DEFAULT_COLOR,
              radius=DEFAULT_RADIUS,
              edgecolor=DEFAULT_EDGECOLOR,
              antialias=DEFAULT_ANTIALIAS,
              colorkey=DEFAULT_COLORKEY,
              circular_layout=DEFAULT_CIRCULAR_LAYOUT,
              circular_offset=DEFAULT_CIRCULAR_OFFSET,
              bunter_kreis=DEFAULT_BUNTER_KREIS):
     VisualElement.__init__(self, nr_states, pos)
     self.text = text
     self.textcolor = textcolor
     self.textsize = textsize
     self.color = color
     self.radius = radius
     #self.edgewidth = edgewidth
     if edgecolor is None: self.edgecolor = color
     else: self.edgecolor = edgecolor
     self.antialias = antialias
     self.colorkey = colorkey
     self.circular_layout = circular_layout
     self.circular_offset = circular_offset
     self.bunter_kreis = bunter_kreis
     if circular_layout:
         self.textimages = [None] * len(text)
         self.textrects = [None] * len(text)
Ejemplo n.º 2
0
 def __init__(self, nr_states=2, pos=(0, 0), file=DEFAULT_FILE, fliplr=DEFAULT_FLIPLR, flipud=DEFAULT_FLIPUD, scale=DEFAULT_SCALE):
     VisualElement.__init__(self, nr_states, pos)
     self.file = os.path.normpath(file)
     self.fliplr = self.DEFAULT_FLIPLR
     self.flipud = self.DEFAULT_FLIPUD
     self.scale = self.DEFAULT_SCALE
     self.image = self.load_image(self.file)
     self.rect = self.image.get_rect()
Ejemplo n.º 3
0
 def __init__(self,
              nr_states=2,
              pos=(0, 0),
              text=DEFAULT_TEXT,
              color=DEFAULT_COLOR,
              size=DEFAULT_SIZE):
     VisualElement.__init__(self, nr_states, pos)
     self.text = text
     self.color = color
     self.size = size
Ejemplo n.º 4
0
 def __init__(self, pos=(0, 0), text=DEFAULT_TEXT, color=DEFAULT_COLOR, textsize=DEFAULT_TEXTSIZE, size=DEFAULT_SIZE, edgecolor=DEFAULT_EDGECOLOR, antialias=DEFAULT_ANTIALIAS, colorkey=DEFAULT_COLORKEY):
     VisualElement.__init__(self, 1, pos)
     self.text = text
     self.color = color
     self.textsize = textsize
     self.size = size    
     self.edgecolor = edgecolor
     self.antialias = antialias
     self.colorkey = colorkey
     self.marge = 4          # marge between text and the box boundaries
Ejemplo n.º 5
0
 def __init__(self, nr_states=2, pos=(0, 0), text=DEFAULT_TEXT, textcolor=DEFAULT_TEXTCOLOR, textsize=DEFAULT_TEXTSIZE, color=DEFAULT_COLOR, size=DEFAULT_SIZE, rotate=DEFAULT_ROTATE, antialias=DEFAULT_ANTIALIAS, textantialias=DEFAULT_TEXTANTIALIAS):
     VisualElement.__init__(self, nr_states, pos)
     self.text = text
     self.textcolor = textcolor
     self.textsize = textsize
     self.color = color
     self.size = size
     self.rotate = rotate
     self.antialias = antialias
     self.textantialias = textantialias
Ejemplo n.º 6
0
 def __init__(self, pos=(0, 0), text=DEFAULT_TEXT, color=DEFAULT_COLOR, textsize=DEFAULT_TEXTSIZE, size=DEFAULT_SIZE, edgecolor=DEFAULT_EDGECOLOR, highlight=DEFAULT_HIGHLIGHT, highlight_color=DEFAULT_HIGHLIGHT_COLOR, highlight_size=DEFAULT_TEXTSIZE, antialias=DEFAULT_ANTIALIAS, colorkey=DEFAULT_COLORKEY):
     VisualElement.__init__(self, 1, pos)
     self.text = text
     self.color = color
     self.textsize = textsize
     self.size = size    
     self.edgecolor = edgecolor
     self.antialias = antialias
     self.colorkey = colorkey
     self.highlight = highlight
     self.highlight_color = highlight_color 
     self.highlight_size = highlight_size 
     self.leftmarge = 4          # marge between text and the left box boundaries
Ejemplo n.º 7
0
 def __init__(self,
              nr_states=2,
              pos=(0, 0),
              file=DEFAULT_FILE,
              fliplr=DEFAULT_FLIPLR,
              flipud=DEFAULT_FLIPUD,
              scale=DEFAULT_SCALE):
     VisualElement.__init__(self, nr_states, pos)
     self.file = os.path.normpath(file)
     self.fliplr = self.DEFAULT_FLIPLR
     self.flipud = self.DEFAULT_FLIPUD
     self.scale = self.DEFAULT_SCALE
     self.image = self.load_image(self.file)
     self.rect = self.image.get_rect()
Ejemplo n.º 8
0
Archivo: Circle.py Proyecto: buzz/pyff
 def __init__(self, nr_states=2, pos=(0, 0), text=DEFAULT_TEXT, textcolor=DEFAULT_TEXTCOLOR, textsize=DEFAULT_TEXTSIZE, color=DEFAULT_COLOR, radius=DEFAULT_RADIUS, antialias=DEFAULT_ANTIALIAS, colorkey=DEFAULT_COLORKEY, circular_layout=DEFAULT_CIRCULAR_LAYOUT, circular_offset=DEFAULT_CIRCULAR_OFFSET, bunter_kreis=DEFAULT_BUNTER_KREIS):
     VisualElement.__init__(self, nr_states, pos)
     self.text = text
     self.textcolor = textcolor
     self.textsize = textsize
     self.color = color
     self.radius = radius
     #self.edgewidth = edgewidth
     #self.edgecolor = edgecolor
     self.antialias = antialias
     self.colorkey = colorkey
     self.circular_layout = circular_layout
     self.circular_offset = circular_offset
     self.bunter_kreis = bunter_kreis 
     if circular_layout:
         self.textimages = [None] * len(text)
         self.textrects = [None] * len(text)
     self.letter_pos = []            # Letter positions relative to surface are also saved
Ejemplo n.º 9
0
 def __init__(self,
              nr_states=2,
              pos=(0, 0),
              text=DEFAULT_TEXT,
              textcolor=DEFAULT_TEXTCOLOR,
              textsize=DEFAULT_TEXTSIZE,
              color=DEFAULT_COLOR,
              size=DEFAULT_SIZE,
              rotate=DEFAULT_ROTATE,
              antialias=DEFAULT_ANTIALIAS,
              textantialias=DEFAULT_TEXTANTIALIAS):
     VisualElement.__init__(self, nr_states, pos)
     self.text = text
     self.textcolor = textcolor
     self.textsize = textsize
     self.color = color
     self.size = size
     self.rotate = rotate
     self.antialias = antialias
     self.textantialias = textantialias
Ejemplo n.º 10
0
 def __init__(self, nr_states=2, pos=(0, 0), text=DEFAULT_TEXT, color=DEFAULT_COLOR, size=DEFAULT_SIZE):
     VisualElement.__init__(self, nr_states, pos)
     self.text = text
     self.color = color
     self.size = size