Пример #1
0
 def __init__(self, col1, col2):
     """
     :param col1: The colour at the top of the image
     :param col2: The colour at the bottom of the image
     
     """
     Filter.__init__(self, col1, col2)
     self.col1 = parse_color(col1)
     self.col2 = parse_color(col2)
Пример #2
0
    def __init__(self, col1, col2):
        """
        :param col1: The colour at the top of the image
        :param col2: The colour at the bottom of the image

        """
        Filter.__init__(self, col1, col2)
        self.col1 = parse_color(col1)
        self.col2 = parse_color(col2)
Пример #3
0
    def __init__(self, col):
        """
        :param col: The colour of the background as an HTML string or tuple

        """
        Filter.__init__(self, col)
        self.col = parse_color(col)
Пример #4
0
 def __init__(self, col):
     """
     :param col: The colour of the background as an HTML string or tuple
     
     """
     Filter.__init__(self, col)
     self.col = parse_color(col)
Пример #5
0
 def __init__(self, radius, border=None):
     """
     :param radius: The radius for the corners
     :param border: The border color as HTML string or tuple
     
     """
     
     Filter.__init__(self, radius, border)
     self.radius = radius
     self.border = parse_color(border)
Пример #6
0
    def __init__(self, radius, border=None):
        """
        :param radius: The radius for the corners
        :param border: The border color as HTML string or tuple
        
        """

        Filter.__init__(self, radius, border)
        self.radius = radius
        self.border = parse_color(border)
Пример #7
0
 def __init__(self,
              width,
              height,
              background_color='#000',
              background_opacity=255):
     """ 
     :param width: Width of resized version
     :param height: Height of resized version
     :param background_color: Color for the canvas background
     :param background_opacity: Opacity for canvas background (255 is opaque)
     
     """
     Filter.__init__(self, width, height, background_color, background_opacity)
     self.new_size = (width, height)
     self.background_color = parse_color(background_color)
     self.background_opacity = background_opacity
Пример #8
0
    def __init__(self,
                 width,
                 height,
                 background_color='#000',
                 background_opacity=255):
        """
        :param width: Width of resized version
        :param height: Height of resized version
        :param background_color: Color for the canvas background
        :param background_opacity: Opacity for canvas background (255 is opaque)

        """
        Filter.__init__(self, width, height, background_color,
                        background_opacity)
        self.new_size = (width, height)
        self.background_color = parse_color(background_color)
        self.background_opacity = background_opacity