Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 14ddd56d862578ec5414194daf5682dc > files > 247

awesome-3.4.15-1.fc18.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../luadoc.css" type="text/css" />
	<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>

<body>
<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->

<div id="main">

<div id="navigation">


<h1>LuaDoc</h1>
<ul>
	
	<li><a href="../index.html">Index</a></li>
	
</ul>


<!-- Module list -->

<h1>Modules</h1>
<ul>

	<li>
		<a href="../modules/awesome.html">awesome</a>
	</li>

	<li>
		<a href="../modules/awful.html">awful</a>
	</li>

	<li>
		<a href="../modules/awful.autofocus.html">awful.autofocus</a>
	</li>

	<li>
		<a href="../modules/awful.button.html">awful.button</a>
	</li>

	<li>
		<a href="../modules/awful.client.html">awful.client</a>
	</li>

	<li>
		<a href="../modules/awful.completion.html">awful.completion</a>
	</li>

	<li>
		<a href="../modules/awful.dbus.html">awful.dbus</a>
	</li>

	<li>
		<a href="../modules/awful.hooks.html">awful.hooks</a>
	</li>

	<li>
		<a href="../modules/awful.key.html">awful.key</a>
	</li>

	<li>
		<a href="../modules/awful.layout.html">awful.layout</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.html">awful.layout.suit</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.fair.html">awful.layout.suit.fair</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.floating.html">awful.layout.suit.floating</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.magnifier.html">awful.layout.suit.magnifier</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.max.html">awful.layout.suit.max</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.spiral.html">awful.layout.suit.spiral</a>
	</li>

	<li>
		<a href="../modules/awful.layout.suit.tile.html">awful.layout.suit.tile</a>
	</li>

	<li>
		<a href="../modules/awful.menu.html">awful.menu</a>
	</li>

	<li>
		<a href="../modules/awful.mouse.html">awful.mouse</a>
	</li>

	<li>
		<a href="../modules/awful.mouse.finder.html">awful.mouse.finder</a>
	</li>

	<li>
		<a href="../modules/awful.placement.html">awful.placement</a>
	</li>

	<li>
		<a href="../modules/awful.prompt.html">awful.prompt</a>
	</li>

	<li>
		<a href="../modules/awful.remote.html">awful.remote</a>
	</li>

	<li>
		<a href="../modules/awful.rules.html">awful.rules</a>
	</li>

	<li>
		<a href="../modules/awful.screen.html">awful.screen</a>
	</li>

	<li>
		<a href="../modules/awful.startup_notification.html">awful.startup_notification</a>
	</li>

	<li>
		<a href="../modules/awful.tag.html">awful.tag</a>
	</li>

	<li>
		<a href="../modules/awful.titlebar.html">awful.titlebar</a>
	</li>

	<li>
		<a href="../modules/awful.tooltip.html">awful.tooltip</a>
	</li>

	<li>
		<a href="../modules/awful.util.html">awful.util</a>
	</li>

	<li>
		<a href="../modules/awful.wibox.html">awful.wibox</a>
	</li>

	<li>
		<a href="../modules/awful.widget.html">awful.widget</a>
	</li>

	<li>
		<a href="../modules/awful.widget.button.html">awful.widget.button</a>
	</li>

	<li>
		<a href="../modules/awful.widget.common.html">awful.widget.common</a>
	</li>

	<li>
		<a href="../modules/awful.widget.graph.html">awful.widget.graph</a>
	</li>

	<li>
		<a href="../modules/awful.widget.launcher.html">awful.widget.launcher</a>
	</li>

	<li>
		<a href="../modules/awful.widget.layout.html">awful.widget.layout</a>
	</li>

	<li>
		<a href="../modules/awful.widget.layout.default.html">awful.widget.layout.default</a>
	</li>

	<li>
		<a href="../modules/awful.widget.layout.horizontal.html">awful.widget.layout.horizontal</a>
	</li>

	<li>
		<a href="../modules/awful.widget.layout.vertical.html">awful.widget.layout.vertical</a>
	</li>

	<li>
		<a href="../modules/awful.widget.layoutbox.html">awful.widget.layoutbox</a>
	</li>

	<li>
		<a href="../modules/awful.widget.progressbar.html">awful.widget.progressbar</a>
	</li>

	<li>
		<a href="../modules/awful.widget.prompt.html">awful.widget.prompt</a>
	</li>

	<li>
		<a href="../modules/awful.widget.taglist.html">awful.widget.taglist</a>
	</li>

	<li>
		<a href="../modules/awful.widget.tasklist.html">awful.widget.tasklist</a>
	</li>

	<li>
		<a href="../modules/awful.widget.textclock.html">awful.widget.textclock</a>
	</li>

	<li>
		<a href="../modules/beautiful.html">beautiful</a>
	</li>

	<li>
		<a href="../modules/button.html">button</a>
	</li>

	<li>
		<a href="../modules/client.html">client</a>
	</li>

	<li>
		<a href="../modules/dbus.html">dbus</a>
	</li>

	<li><strong>image</strong></li>
	
	<li>
		<a href="../modules/key.html">key</a>
	</li>

	<li>
		<a href="../modules/keygrabber.html">keygrabber</a>
	</li>

	<li>
		<a href="../modules/mouse.html">mouse</a>
	</li>

	<li>
		<a href="../modules/mousegrabber.html">mousegrabber</a>
	</li>

	<li>
		<a href="../modules/naughty.html">naughty</a>
	</li>

	<li>
		<a href="../modules/root.html">root</a>
	</li>

	<li>
		<a href="../modules/screen.html">screen</a>
	</li>

	<li>
		<a href="../modules/selection.html">selection</a>
	</li>

	<li>
		<a href="../modules/tag.html">tag</a>
	</li>

	<li>
		<a href="../modules/timer.html">timer</a>
	</li>

	<li>
		<a href="../modules/wibox.html">wibox</a>
	</li>

	<li>
		<a href="../modules/widget.html">widget</a>
	</li>

</ul>



<!-- File list -->






</div><!-- id="navigation" -->

<div id="content">

<h1>Module <code>image</code></h1>

<p>awesome image API</p>

<p><b>Author:</b>
<table class="authors_list">

	<tr><td class="name">Julien Danjou &lt;julien@danjou.info&gt;</td></tr>

</table>
</p>


<p>Copyright&copy; 2008-2009 Julien Danjou</p>




<h2>Functions</h2>
<table class="function_list">

	<tr>
	<td class="name" nowrap><a href="#add_signal">add_signal</a>&nbsp;(name, func)</td>
	<td class="summary">Add a signal.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#crop">crop</a>&nbsp;(x, y, width, height)</td>
	<td class="summary">Crop an image to the given rectangle.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#crop_and_scale">crop_and_scale</a>&nbsp;(x, y, width, height, dest_width, dest_height, A)</td>
	<td class="summary">Crop the image to the given rectangle and scales it.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#draw_circle">draw_circle</a>&nbsp;(x, y, width, height, fill, color)</td>
	<td class="summary">Draw a circle in an image.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#draw_line">draw_line</a>&nbsp;(x1, y2, x2, color)</td>
	<td class="summary">Draw a line in an image.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#draw_pixel">draw_pixel</a>&nbsp;(x, y, The)</td>
	<td class="summary">Draw a pixel in an image.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#draw_rectangle">draw_rectangle</a>&nbsp;(x, y, width, height, fill, color)</td>
	<td class="summary">Draw a rectangle in an image.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#draw_rectangle_gradient">draw_rectangle_gradient</a>&nbsp;(x, y, width, height, colors, angle)</td>
	<td class="summary">Draw a rectangle in an image with gradient color.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#emit_signal">emit_signal</a>&nbsp;(name, ...)</td>
	<td class="summary">Emit a signal.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#insert">insert</a>&nbsp;(image, offset_x, ofsset_y, offset_h_up_right, offset_v_up_right, offset_h_low_left, offset_v_low_left, source_x, source_y, source_width, source_height)</td>
	<td class="summary">Insert one image into another.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#remove_signal">remove_signal</a>&nbsp;(name, func)</td>
	<td class="summary">Remove a signal.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#rotate">rotate</a>&nbsp;(angle)</td>
	<td class="summary">Rotate an image with specified angle radians and return a new image.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#rotate">rotate</a>&nbsp;(angle)</td>
	<td class="summary">Rotate an image with specified angle radians and return a new image.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#save">save</a>&nbsp;(path)</td>
	<td class="summary">Saves the image to the given path.</td>
	</tr>

</table>




<h2>Tables</h2>
<table class="table_list">

	<tr>
	<td class="name" nowrap><a href="#image">image</a></td>
	<td class="summary">Image objects.</td>
	</tr>

</table>



<br/>
<br/>



<h2><a name="functions"></a>Functions</h2>
<dl class="function">



<dt><a name="add_signal"></a><strong>add_signal</strong>&nbsp;(name, func)</dt>
<dd>
Add a signal.


<h3>Parameters</h3>
<ul>
	
	<li>
	  name: A signal name.
	</li>
	
	<li>
	  func: A function to call when the signal is emitted.
	</li>
	
</ul>








</dd>




<dt><a name="crop"></a><strong>crop</strong>&nbsp;(x, y, width, height)</dt>
<dd>
Crop an image to the given rectangle.


<h3>Parameters</h3>
<ul>
	
	<li>
	  x: The top left x coordinate of the rectangle.
	</li>
	
	<li>
	  y: The top left y coordinate of the rectangle.
	</li>
	
	<li>
	  width: The width of the rectangle.
	</li>
	
	<li>
	  height: The height of the rectangle.
	</li>
	
</ul>






<h3>Return value:</h3>
A cropped image.



</dd>




<dt><a name="crop_and_scale"></a><strong>crop_and_scale</strong>&nbsp;(x, y, width, height, dest_width, dest_height, A)</dt>
<dd>
Crop the image to the given rectangle and scales it.


<h3>Parameters</h3>
<ul>
	
	<li>
	  x: The top left x coordinate of the source rectangle.
	</li>
	
	<li>
	  y: The top left y coordinate of the source rectangle.
	</li>
	
	<li>
	  width: The width of the source rectangle.
	</li>
	
	<li>
	  height: The height of the source rectangle.
	</li>
	
	<li>
	  dest_width: The width of the destination rectangle.
	</li>
	
	<li>
	  dest_height: The height of the destination rectangle.
	</li>
	
	<li>
	  A: cropped image.
	</li>
	
</ul>








</dd>




<dt><a name="draw_circle"></a><strong>draw_circle</strong>&nbsp;(x, y, width, height, fill, color)</dt>
<dd>
Draw a circle in an image.


<h3>Parameters</h3>
<ul>
	
	<li>
	  x: The x coordinate of the center of the circle.
	</li>
	
	<li>
	  y: The y coordinate of the center of the circle.
	</li>
	
	<li>
	  width: The horizontal amplitude.
	</li>
	
	<li>
	  height: The vertical amplitude.
	</li>
	
	<li>
	  fill: True if the circle should be filled, false otherwise.
	</li>
	
	<li>
	  color: The color to draw the circle with.
	</li>
	
</ul>








</dd>




<dt><a name="draw_line"></a><strong>draw_line</strong>&nbsp;(x1, y2, x2, color)</dt>
<dd>
Draw a line in an image.


<h3>Parameters</h3>
<ul>
	
	<li>
	  x1: The x1 coordinate of the line to draw.
	</li>
	
	<li>
	  y2: The y2 coordinate of the line to draw.
	</li>
	
	<li>
	  x2: The x2 coordinate of the line to draw.
	</li>
	
	<li>
	  color: The color to draw the line in.
	</li>
	
</ul>








</dd>




<dt><a name="draw_pixel"></a><strong>draw_pixel</strong>&nbsp;(x, y, The)</dt>
<dd>
Draw a pixel in an image.


<h3>Parameters</h3>
<ul>
	
	<li>
	  x: The x coordinate of the pixel to draw.
	</li>
	
	<li>
	  y: The y coordinate of the pixel to draw.
	</li>
	
	<li>
	  The: color to draw the pixel in.
	</li>
	
</ul>








</dd>




<dt><a name="draw_rectangle"></a><strong>draw_rectangle</strong>&nbsp;(x, y, width, height, fill, color)</dt>
<dd>
Draw a rectangle in an image.


<h3>Parameters</h3>
<ul>
	
	<li>
	  x: The x coordinate of the rectangles top left corner.
	</li>
	
	<li>
	  y: The y coordinate of the rectangles top left corner.
	</li>
	
	<li>
	  width: The width of the rectangle.
	</li>
	
	<li>
	  height: The height of the rectangle.
	</li>
	
	<li>
	  fill: True to fill the rectangle, false otherwise.
	</li>
	
	<li>
	  color: The color to draw the rectangle with.
	</li>
	
</ul>








</dd>




<dt><a name="draw_rectangle_gradient"></a><strong>draw_rectangle_gradient</strong>&nbsp;(x, y, width, height, colors, angle)</dt>
<dd>
Draw a rectangle in an image with gradient color.


<h3>Parameters</h3>
<ul>
	
	<li>
	  x: The x coordinate of the rectangles top left corner.
	</li>
	
	<li>
	  y: The y coordinate of the rectangles top left corner.
	</li>
	
	<li>
	  width: The width of the rectangle.
	</li>
	
	<li>
	  height: The height of the rectangle.
	</li>
	
	<li>
	  colors: A table with the color to draw the rectangle. You can specified the color distance from the previous one by setting t[color] = distance.
	</li>
	
	<li>
	  angle: The angle of the gradient.
	</li>
	
</ul>








</dd>




<dt><a name="emit_signal"></a><strong>emit_signal</strong>&nbsp;(name, ...)</dt>
<dd>
Emit a signal.


<h3>Parameters</h3>
<ul>
	
	<li>
	  name: A signal name.
	</li>
	
	<li>
	  ...: Various arguments, optional.
	</li>
	
</ul>








</dd>




<dt><a name="insert"></a><strong>insert</strong>&nbsp;(image, offset_x, ofsset_y, offset_h_up_right, offset_v_up_right, offset_h_low_left, offset_v_low_left, source_x, source_y, source_width, source_height)</dt>
<dd>
Insert one image into another.


<h3>Parameters</h3>
<ul>
	
	<li>
	  image: The image to insert.
	</li>
	
	<li>
	  offset_x: The x offset of the image to insert (optional).
	</li>
	
	<li>
	  ofsset_y: The y offset of the image to insert (optional).
	</li>
	
	<li>
	  offset_h_up_right: The horizontal offset of the upper right image corner (optional).
	</li>
	
	<li>
	  offset_v_up_right: The vertical offset of the upper right image corner (optional).
	</li>
	
	<li>
	  offset_h_low_left: The horizontal offset of the lower left image corner (optional).
	</li>
	
	<li>
	  offset_v_low_left: The vertical offset of the lower left image corner (optional).
	</li>
	
	<li>
	  source_x: The x coordinate of the source rectangle (optional).
	</li>
	
	<li>
	  source_y: The y coordinate of the source rectangle (optional).
	</li>
	
	<li>
	  source_width: The width of the source rectangle (optional).
	</li>
	
	<li>
	  source_height: The height of the source rectangle (optional).
	</li>
	
</ul>








</dd>




<dt><a name="remove_signal"></a><strong>remove_signal</strong>&nbsp;(name, func)</dt>
<dd>
Remove a signal.


<h3>Parameters</h3>
<ul>
	
	<li>
	  name: A signal name.
	</li>
	
	<li>
	  func: A function to remove.
	</li>
	
</ul>








</dd>




<dt><a name="rotate"></a><strong>rotate</strong>&nbsp;(angle)</dt>
<dd>
Rotate an image with specified angle radians and return a new image.


<h3>Parameters</h3>
<ul>
	
	<li>
	  angle: The angle in radians.
	</li>
	
</ul>






<h3>Return value:</h3>
A rotated image.



</dd>




<dt><a name="rotate"></a><strong>rotate</strong>&nbsp;(angle)</dt>
<dd>
Rotate an image with specified angle radians and return a new image.


<h3>Parameters</h3>
<ul>
	
	<li>
	  angle: The angle in radians.
	</li>
	
</ul>






<h3>Return value:</h3>
A rotated image.



</dd>




<dt><a name="save"></a><strong>save</strong>&nbsp;(path)</dt>
<dd>
Saves the image to the given path. The file extension (e.g. .png or .jpg) will affect the output format.


<h3>Parameters</h3>
<ul>
	
	<li>
	  path: An image path.
	</li>
	
</ul>








</dd>


</dl>




<h2><a name="tables"></a>Tables</h2>
<dl class="table">

<dt><a name="image"></a><strong>image</strong></dt>
<dd>Image objects.


<em>Fields</em>
<ul>
	
	<li>
	  width: The image width. Immutable.
	</li>
	
	<li>
	  height: The image height. Immutable.
	</li>
	
	<li>
	  alpha: Boolean indicating if the image alpha channel is present.
	</li>
	
</ul>


</dd>


</dl>



</div> <!-- id="content" -->

</div> <!-- id="main" -->

<div id="about">
	<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->

</div> <!-- id="container" -->	
</body>
</html>