doc: Document where gears.shape can be used.

This commit is contained in:
Emmanuel Lepage Vallee 2016-08-16 01:54:49 -04:00
parent b6421699da
commit fb4a48b744
1 changed files with 21 additions and 1 deletions

View File

@ -14,7 +14,27 @@
-- In many case, it is necessary to apply the shape using a transformation -- In many case, it is necessary to apply the shape using a transformation
-- such as a rotation. The preferred way to do this is to wrap the function -- such as a rotation. The preferred way to do this is to wrap the function
-- in another function calling `cr:rotate()` (or any other transformation -- in another function calling `cr:rotate()` (or any other transformation
-- matrix) -- matrix).
--
-- To specialize a shape where the API doesn't allows extra arguments to be
-- passed, it is possible to wrap the shape function like:
--
-- local new_shape = function(cr, width, height)
-- gears.shape.rounded_rect(cr, width, height, 2)
-- end
--
-- Many elements can be shaped. This include:
--
-- * `client`s (see `gears.surface.apply_shape_bounding`)
-- * `wibox`es (see `wibox.shape`)
-- * All widgets (see `wibox.container.background`)
-- * The progressbar (see `wibox.widget.progressbar.bar_shape`)
-- * The graph (see `wibox.widget.graph.step_shape`)
-- * The checkboxes (see `wibox.widget.checkbox.check_shape`)
-- * Images (see `wibox.widget.imagebox.clip_shape`)
-- * The taglist tags (see `awful.widget.taglist`)
-- * The tasklist clients (see `awful.widget.tasklist`)
-- * The tooltips (see `awful.tooltip`)
-- --
-- @author Emmanuel Lepage Vallee -- @author Emmanuel Lepage Vallee
-- @copyright 2011-2016 Emmanuel Lepage Vallee -- @copyright 2011-2016 Emmanuel Lepage Vallee