Module wallpaper
[hide private]
[frames] | no frames]

Module wallpaper

source code

Deals with wallpaper and related views

Classes [hide private]
  DisplayItem
  WallpaperView
  WallpaperPreview
  BPFSHandler
  ImageCropSelect
  ImagePreview
  ImagePreviewDialog
Functions [hide private]
 
ScaleImageIntoBitmap(img, usewidth, useheight, bgcolor=None, valign='center')
Scales the image and returns a bitmap
source code
 
BPFSImageFile(fshandler, location, name=None, img=None, width=-1, height=-1, valign='center', bgcolor=None)
Handles image files
source code
Variables [hide private]
  thewallpapermanager = None
Function Details [hide private]

ScaleImageIntoBitmap(img, usewidth, useheight, bgcolor=None, valign='center')

source code 

Scales the image and returns a bitmap

Parameters:
  • usewidth - the width of the new image
  • useheight - the height of the new image
  • bgcolor - the background colour as a string ("ff0000" is red etc). If this is none then the background is made transparent

BPFSImageFile(fshandler, location, name=None, img=None, width=-1, height=-1, valign='center', bgcolor=None)

source code 

Handles image files

If we have to do any conversion on the file then we return PNG data. This used to be a class derived from wx.FSFile, but due to various wxPython bugs it instead returns the parameters to make a wx.FSFile since a new one has to be made every time.