def _draw(self, color):
        """Draw the gradient and the selection cross on the canvas."""
        width = self.winfo_width()
        height = self.winfo_height()
        self.delete("bg")
        self.delete("cross_h")
        self.delete("cross_v")
        del self.bg
        self.bg = tk.PhotoImage(width=width, height=height, master=self)
        self._fill()
        self.create_image(0, 0, image=self.bg, anchor="nw", tags="bg")
        self.tag_lower("bg")
        h, s, v = color
        x = v / 100.
        y = (1 - s / 100.)
        self.create_line(0, y * height, width, y * height, tags="cross_h",
                         fill="#C2C2C2")
        self.create_line(x * width, 0, x * width, height, tags="cross_v",
                         fill="#C2C2C2")
def _draw ( self , color ) : width = self . winfo_width ( ) height = self . winfo_height ( ) self . delete ( "bg" ) self . delete ( "cross_h" ) self . delete ( "cross_v" ) del self . bg self . bg = tk . PhotoImage ( width = width , height = height , master = self ) self . _fill ( ) self . create_image ( 0 , 0 , image = self . bg , anchor = "nw" , tags = "bg" ) self . tag_lower ( "bg" ) h , s , v = color x = v / 100. y = ( 1 - s / 100. ) self . create_line ( 0 , y * height , width , y * height , tags = "cross_h" , fill = "#C2C2C2" ) self . create_line ( x * width , 0 , x * width , height , tags = "cross_v" , fill = "#C2C2C2" )
Draw the gradient and the selection cross on the canvas.