You are here

function canvasactions_source2canvas_form in ImageCache Actions 7

Same name and namespace in other branches
  1. 8 canvasactions/canvasactions.inc \canvasactions_source2canvas_form()
  2. 5.3 canvasactions.inc \canvasactions_source2canvas_form()
  3. 5.2 canvasactions.inc \canvasactions_source2canvas_form()
  4. 6.2 canvasactions/canvasactions.inc \canvasactions_source2canvas_form()
  5. 6 canvasactions.inc \canvasactions_source2canvas_form()

Image effect form callback for the overlay: source image to canvas effect.

Parameters

array $data: The current configuration for this image effect.

Return value

array The form definition for this effect.

1 string reference to 'canvasactions_source2canvas_form'
imagecache_canvasactions_image_effect_info in canvasactions/imagecache_canvasactions.module
Implements hook_image_effect_info().

File

canvasactions/canvasactions.inc, line 758

Code

function canvasactions_source2canvas_form($data) {
  $defaults = array(
    'xpos' => '',
    'ypos' => '',
    'alpha' => '100',
    'path' => '',
  );
  $data = array_merge($defaults, (array) $data);
  $form = imagecache_actions_pos_form($data);
  $form['alpha'] = array(
    '#type' => 'textfield',
    '#title' => t('opacity'),
    '#default_value' => $data['alpha'],
    '#size' => 6,
    '#description' => t('Opacity: 0-100.'),
  );
  return $form;
}