You are here

trait SetCanvasTrait in Image Effects 8.3

Same name and namespace in other branches
  1. 8 src/Plugin/ImageToolkit/Operation/SetCanvasTrait.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\SetCanvasTrait
  2. 8.2 src/Plugin/ImageToolkit/Operation/SetCanvasTrait.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\SetCanvasTrait

Base trait for set canvas operations.

Hierarchy

  • trait \Drupal\image_effects\Plugin\ImageToolkit\Operation\SetCanvasTrait
2 files declare their use of SetCanvasTrait
SetCanvas.php in src/Plugin/ImageToolkit/Operation/gd/SetCanvas.php
SetCanvas.php in src/Plugin/ImageToolkit/Operation/imagemagick/SetCanvas.php

File

src/Plugin/ImageToolkit/Operation/SetCanvasTrait.php, line 8

Namespace

Drupal\image_effects\Plugin\ImageToolkit\Operation
View source
trait SetCanvasTrait {

  /**
   * {@inheritdoc}
   */
  protected function arguments() {
    return [
      'canvas_color' => [
        'description' => 'Color',
        'required' => FALSE,
        'default' => NULL,
      ],
      'width' => [
        'description' => 'The width of the canvas image, in pixels',
      ],
      'height' => [
        'description' => 'The height of the canvas image, in pixels',
      ],
      'x_pos' => [
        'description' => 'The left offset of the original image on the canvas, in pixels',
      ],
      'y_pos' => [
        'description' => 'The top offset of the original image on the canvas, in pixels',
      ],
    ];
  }

  /**
   * {@inheritdoc}
   */
  protected function validateArguments(array $arguments) {
    return $arguments;
  }

}

Members