Ejemplo n.º 1
0
    def __init__(self, points, color, style='squares'):
        if style not in ('squares', 'diamonds'):
            raise ValueError('"%s" is not a valid style' % style)

        self._points = tuple(points)
        self._color = getColor(color)
        self._style = style
        self._graphicsContext = None
Ejemplo n.º 2
0
 def _createGraphicsContexts(self):
     """
     Creates the graphics contexts used by this class.
     This is not possible until the widget has been realized.
     """
     self._foregroundGC = self.window.new_gc()
     self._backgroundGC = self.window.new_gc()
     self._backgroundGC.foreground = getColor('white')
Ejemplo n.º 3
0
 def __init__(self, function, color, drawOnFrame=True):
     self._function = function
     self._color = getColor(color)
     self._drawOnFrame = drawOnFrame
     self._graphicsContext = None
Ejemplo n.º 4
0
def set_color():
    color = widgets.getColor(PF.get('stl_color','green'))
    if color:
        PF['stl_color'] = colors.GLColor(color)