# Module `gears.wallpaper`

### Info:

- Author: Uli Schlachter
- Copyright: 2012 Uli Schlachter
- Release: v3.5.1

## Functions

prepare_wallpaper (s) | Prepare the needed state for setting a wallpaper
surface_size (surf) | Get the size of a cairo surface
set (pattern) | Set the current wallpaper.
centered (surf, s, background) | Set a centered wallpaper.
tiled (surf, s, offset) | Set a tiled wallpaper.
maximized (surf, s, ignore_aspect, offset) | Set a maximized wallpaper.
fit (surf, s, background) | Set a fitting wallpaper.

## Functions

prepare_wallpaper (s)
  Prepare the needed state for setting a wallpaper that should be used for setting the wallpaper and a cairo context for drawing to this surface

  ### Parameters:

  - s The screen to set the wallpaper on or nil for all screens

  ### Returns:

  The available geometry (table with entries width and height), a
surface_size (surf)
  Get the size of a cairo surface

  ### Parameters:

  - surf The surface you are interested in

  ### Returns:

  The surface's width and height
set (pattern)
  Set the current wallpaper. a description for gears.color or a cairo pattern.

  ### Parameters:

  - pattern The wallpaper that should be set. This can be a cairo surface,
centered (surf, s, background)
  Set a centered wallpaper. gears.color. The default is black.

  ### Parameters:

  - surf The wallpaper to center. Either a cairo surface or a file name.
  - s The screen whose wallpaper should be set. Can be nil, in which case all screens are set.
  - background The background color that should be used. Gets handled via
tiled (surf, s, offset)
  Set a tiled wallpaper.

  ### Parameters:

  - surf The wallpaper to tile. Either a cairo surface or a file name.
  - s The screen whose wallpaper should be set. Can be nil, in which case all screens are set.
  - offset This can be set to a table with entries x and y.
maximized (surf, s, ignore_aspect, offset)
  Set a maximized wallpaper.

  ### Parameters:

  - surf The wallpaper to set. Either a cairo surface or a file name.
  - s The screen whose wallpaper should be set. Can be nil, in which case all screens are set.
  - ignore_aspect If this is true, the image's aspect ratio is ignored. The default is to honor the aspect ratio.
  - offset This can be set to a table with entries x and y.
fit (surf, s, background)
  Set a fitting wallpaper. gears.color. The default is black.

  ### Parameters:

  - surf The wallpaper to set. Either a cairo surface or a file name.
  - s The screen whose wallpaper should be set. Can be nil, in which case all screens are set.
  - background The background color that should be used. Gets handled via

generated by LDoc 1.3