Logo Search packages:      
Sourcecode: rapid-photo-downloader version File versions  Download package

def rapid::dropshadow::DropShadow::__init__ (   self,
  offset = (5,5,
  background_color = 0xffffff,
  shadow = (0x44, 0x44,
  x44,
  xff,
  border = 8,
  iterations = 3,
  trim_border = False 
)

offset            - Offset of the shadow from the image as an (x,y) tuple. Can be
            positive or negative.
background_color  - Background colour behind the image.
shadow            - Shadow colour (darkness).
border            - Width of the border around the image. This must be wide
            enough to account for the blurring of the shadow.
trim_border       - If true, the border will only be created on the
            sides it needs to be (i.e. only on two sides)
iterations        - Number of times to apply the filter. More iterations 
            produce a more blurred shadow, but increase processing time.
                
To make backgrounds transparent, ensure the alpha value of the shadow color is the 
same as the background color, e.g. if background_color is 0xffffff, shadow's alpha should be 0xff

Definition at line 60 of file dropshadow.py.

                                                                          :
        """
        offset            - Offset of the shadow from the image as an (x,y) tuple. Can be
                            positive or negative.
        background_color  - Background colour behind the image.
        shadow            - Shadow colour (darkness).
        border            - Width of the border around the image. This must be wide
                            enough to account for the blurring of the shadow.
        trim_border       - If true, the border will only be created on the
                            sides it needs to be (i.e. only on two sides)
        iterations        - Number of times to apply the filter. More iterations 
                            produce a more blurred shadow, but increase processing time.
                                
        To make backgrounds transparent, ensure the alpha value of the shadow color is the 
        same as the background color, e.g. if background_color is 0xffffff, shadow's alpha should be 0xff
        """
        self.backgrounds = {}
        self.offset = offset
        self.background_color = background_color
        self.shadow = shadow
        self.border = border
        self.trim_border = trim_border
        self.iterations = iterations
        
        if self.offset[0] < 0 or not self.trim_border:
            self.left_spacing = self.border
        else:
            self.left_spacing = 0
        
        if self.offset[1] < 0 or not self.trim_border:
            self.top_spacing = self.border
        else:
            self.top_spacing = 0
        
        
    def dropShadow(self, image):


Generated by  Doxygen 1.6.0   Back to index