steffen: server/kolab-horde-framework/kolab-horde-framework/Image/Image/Decorator border.php, NONE, 1.1 watermark.php, NONE, 1.1
cvs at intevation.de
cvs at intevation.de
Fri Oct 14 16:33:07 CEST 2005
- Previous message: steffen: server/kolab-horde-framework/kolab-horde-framework/Image Image.php, NONE, 1.1 package.xml, NONE, 1.1
- Next message: steffen: server/kolab-horde-framework/kolab-horde-framework/Image/Image Decorator.php, NONE, 1.1 gd.php, NONE, 1.1 im.php, NONE, 1.1 png.php, NONE, 1.1 rgb.php, NONE, 1.1 svg.php, NONE, 1.1 swf.php, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: steffen
Update of /kolabrepository/server/kolab-horde-framework/kolab-horde-framework/Image/Image/Decorator
In directory doto:/tmp/cvs-serv28903/kolab-horde-framework/kolab-horde-framework/Image/Image/Decorator
Added Files:
border.php watermark.php
Log Message:
Separated Horde Framework from kolab-resource-handlers
--- NEW FILE: border.php ---
<?php
/**
* Image border decorator for the Horde_Image package.
*
* $Horde: framework/Image/Image/Decorator/border.php,v 1.1 2004/05/04 21:36:10 chuck Exp $
*
* @author Chuck Hagenbuch <chuck at horde.org>
* @package Horde_Image
*/
class Horde_Image_Decorator_border {
/**
* Valid parameters for border decorators:
*
* padding - Pixels from the image edge that the border will start.
* borderColor - Border color. Defaults to black.
* fillColor - Color to fill the border with. Defaults to white.
* lineWidth - Border thickness, defaults to 1 pixel.
* roundWidth - Width of the corner rounding. Defaults to none.
*
* @var array $_params
*/
var $_params = array('padding' => 0,
'borderColor' => 'black',
'fillColor' => 'white',
'lineWidth' => 1,
'roundWidth' => 0);
/**
* Draw the border.
*
* This draws the configured border to the provided image. Beware,
* that every pixel inside the border clipping will be overwritten
* with the background color.
*
* @access public
*/
function draw(&$image)
{
$o = $this->_params;
$d = $image->getDimensions();
$x = $o['padding'];
$y = $o['padding'];
$width = $d['width'] - (2 * $o['padding']);
$height = $d['height'] - (2 * $o['padding']);
if ($o['roundWidth'] > 0) {
$image->roundedRectangle($x, $y, $width, $height, $o['roundWidth'], $o['borderColor'], $o['fillColor']);
} else {
$image->rectangle($x, $y, $width, $height, $o['borderColor'], $o['fillColor']);
}
}
}
--- NEW FILE: watermark.php ---
<?php
/**
* Watermark decorator for the Horde_Image package.
*
* $Horde: framework/Image/Image/Decorator/watermark.php,v 1.3 2004/05/04 21:35:38 chuck Exp $
*
* @author Chuck Hagenbuch <chuck at horde.org>
* @package Horde_Image
*/
class Horde_Image_Decorator_watermark {
/**
* Draw the watermark.
*
* @access public
*/
function draw(&$image)
{
}
}
- Previous message: steffen: server/kolab-horde-framework/kolab-horde-framework/Image Image.php, NONE, 1.1 package.xml, NONE, 1.1
- Next message: steffen: server/kolab-horde-framework/kolab-horde-framework/Image/Image Decorator.php, NONE, 1.1 gd.php, NONE, 1.1 im.php, NONE, 1.1 png.php, NONE, 1.1 rgb.php, NONE, 1.1 svg.php, NONE, 1.1 swf.php, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the commits
mailing list