class DrawEllipse in Image Effects 8
Same name in this branch
- 8 src/Plugin/ImageToolkit/Operation/gd/DrawEllipse.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\gd\DrawEllipse
- 8 src/Plugin/ImageToolkit/Operation/imagemagick/DrawEllipse.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\DrawEllipse
Same name and namespace in other branches
- 8.3 src/Plugin/ImageToolkit/Operation/imagemagick/DrawEllipse.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\DrawEllipse
- 8.2 src/Plugin/ImageToolkit/Operation/imagemagick/DrawEllipse.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\DrawEllipse
Defines ImageMagick draw ellipse operation.
Plugin annotation
@ImageToolkitOperation(
id = "image_effects_imagemagick_draw_ellipse",
toolkit = "imagemagick",
operation = "draw_ellipse",
label = @Translation("Draw ellipse"),
description = @Translation("Draws on the image an ellipse of the specified color.")
)
Hierarchy
- class \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\DrawEllipse extends \Drupal\imagemagick\Plugin\ImageToolkit\Operation\imagemagick\ImagemagickImageToolkitOperationBase uses DrawEllipseTrait
Expanded class hierarchy of DrawEllipse
File
- src/
Plugin/ ImageToolkit/ Operation/ imagemagick/ DrawEllipse.php, line 19
Namespace
Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagickView source
class DrawEllipse extends ImagemagickImageToolkitOperationBase {
use DrawEllipseTrait;
/**
* {@inheritdoc}
*/
protected function execute(array $arguments) {
$arg = '';
$arg .= '-fill ' . $this
->getToolkit()
->escapeShellArg($arguments['color']);
$this
->getToolkit()
->addArgument($arg . ' -draw ' . $this
->getToolkit()
->escapeShellArg("ellipse {$arguments['cx']},{$arguments['cy']} {$arguments['width']},{$arguments['height']} 0,360"));
return TRUE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DrawEllipse:: |
protected | function | ||
DrawEllipseTrait:: |
protected | function |