def do_paint(self):
        """paint signal handler."""
        w, h = self.get_size()
        color = self.trace.color
        dark_color = color.darken()

        cogl.set_source_color(dark_color)
        cogl.path_round_rectangle(0, 0, w, h, 5, 10)
        cogl.path_fill()

        cogl.set_source_color(color)
        cogl.path_round_rectangle(3, 3, w - 3, h - 3, 3, 10)
        cogl.path_fill()
        clutter.Group.do_paint(self)
    def do_paint(self):
        """paint signal handler."""
        w, h = self.get_size()
        color = self.trace.color
        dark_color = color.darken()

        cogl.set_source_color(dark_color)
        cogl.path_round_rectangle(0, 0, w, h, 5, 10)
        cogl.path_fill()

        cogl.set_source_color(color)
        cogl.path_round_rectangle(3, 3, w - 3, h - 3, 3, 10)
        cogl.path_fill()
        clutter.Group.do_paint(self)
 def pick_self(self, color):
     if self.should_pick_paint() == False:
         return
     cogl.path_round_rectangle(0, 0, self._width, self._height, self._arc, self._step)
     cogl.path_close()
     # Start the clip
     cogl.clip_push_from_path()
     # set color to border color
     cogl.set_source_color(color)
     # draw the rectangle for the border which is the same size and the
     # object
     cogl.path_round_rectangle(0, 0, self._width, self._height, self._arc, self._step)
     cogl.path_close()
     cogl.path_fill() 
     cogl.clip_pop()
    def do_pick(self, color):
        if self.should_pick_paint() == False:
            return

        #return
        cogl.path_round_rectangle(0, 0, self._width, self._height, self._arc,
                                  self._step)
        cogl.path_close()
        # Start the clip
        cogl.clip_push_from_path()
        # set color to border color
        cogl.set_source_color(color)
        # draw the rectangle for the border which is the same size and the
        # object
        cogl.path_round_rectangle(0, 0, self._width, self._height, self._arc,
                                  self._step)
        cogl.path_close()
        cogl.path_fill()
        cogl.clip_pop()
    def do_paint(self):

        # Draw a rectangle for the clipping
        cogl.path_round_rectangle(0, 0, self._width, self._height, self._arc,
                                  self._step)
        cogl.path_close()
        # Start the clip
        cogl.clip_push_from_path()

        # set color to border color
        cogl.set_source_color(self._border_color)
        # draw the rectangle for the border which is the same size and the
        # object
        cogl.path_round_rectangle(0, 0, self._width, self._height, self._arc,
                                  self._step)
        cogl.path_close()
        # color the path usign the border color
        ##cogl.path_fill()
        #cogl.path_stroke()

        if True:  #False:
            # set the color of the filled area
            cogl.set_source_color(self._color)
            # draw the content with is the same size minus the wirth of the border
            # finish the clip
            cogl.path_round_rectangle(self._border_width, self._border_width,
                                      self._width - self._border_width,
                                      self._height - self._border_width,
                                      self._arc, self._step)
            cogl.path_fill()
        cogl.path_close()

        cogl.clip_pop()