Feature #15288 » 2049v3_onlyMakeEllipseFunction.diff
bla.new/t3lib/class.t3lib_stdgraphic.php 2010-06-25 19:37:49.500405388 +0200 | ||
---|---|---|
$tmpColor = ImageColorAllocateAlpha($im, $cols[0],$cols[1],$cols[2], $opacity);
|
||
imagefilledrectangle($im, $cords[0], $cords[1], $cords[0]+$cords[2]-1, $cords[1]+$cords[3]-1, $tmpColor);
|
||
}
|
||
|
||
/**
|
||
* Implements the "Ellipse" GIFBUILDER object
|
||
* Example Typoscript:
|
||
* file = GIFBUILDER
|
||
* file {
|
||
* XY = 200,200
|
||
* format = jpg
|
||
* quality = 100
|
||
* 10 = ELLIPSE
|
||
* 10.dimensions = 100,100,50,50
|
||
* 10.color = red
|
||
*
|
||
* $workArea = X,Y
|
||
* $conf['dimensions'] = offset x, offset y, width of ellipse, height of ellipse
|
||
*
|
||
* @param pointer GDlib image pointer
|
||
* @param array $conf TypoScript array with configuration for the GIFBUILDER object.
|
||
* @param array $workArea The current working area coordinates.
|
||
* @return void
|
||
* @see tslib_gifBuilder::make()
|
||
*/
|
||
public function makeEllipse(&$im, array $conf, array $workArea) {
|
||
$ellipseConfiguration = t3lib_div::intExplode(',', $conf['dimensions'] . ',,,');
|
||
$conf['offset'] = $ellipseConfiguration[0] . ',' . $ellipseConfiguration[1]; // ellipse offset inside workArea (x/y)
|
||
// @see objPosition
|
||
$imageCoordinates = $this->objPosition($conf, $workArea, array($ellipseConfiguration[2], $ellipseConfiguration[3]));
|
||
$color = $this->convertColor($conf['color']);
|
||
$this->reduceColors($im, 256, 255);
|
||
$fillingColor = imagecolorallocate($im, $color[0], $color[1], $color[2]);
|
||
imagefilledellipse($im, $imageCoordinates[0], $imageCoordinates[1], $imageCoordinates[2], $imageCoordinates[3], $fillingColor);
|
||
}
|
||
/**
|
||
* Implements the "EFFECT" GIFBUILDER object
|
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »