You are here

function canvasactions_source2canvas_form in ImageCache Actions 5.3

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

Place the source image on top of the current canvas

Implementation of imagecache_hook_form()

Parameters

$action array of settings for this action:

Return value

a form definition

File

./canvasactions.inc, line 361

Code

function canvasactions_source2canvas_form($action) {
  $form = array(
    'xpos' => array(
      '#type' => 'textfield',
      '#title' => t('X offset'),
      '#default_value' => $action['xpos'],
      '#size' => 6,
      '#description' => t('Enter an offset in pixels or use a keyword: <em>left</em>, <em>center</em>, or <em>right</em>.'),
    ),
    'ypos' => array(
      '#type' => 'textfield',
      '#title' => t('Y offset'),
      '#default_value' => $action['ypos'],
      '#size' => 6,
      '#description' => t('Enter an offset in pixels or use a keyword: <em>top</em>, <em>center</em>, or <em>bottom</em>.'),
    ),
    'alpha' => array(
      '#type' => 'textfield',
      '#title' => t('opacity'),
      '#default_value' => $action['alpha'] ? $action['alpha'] : 100,
      '#size' => 6,
      '#description' => t('Opacity: 0-100.'),
    ),
  );
  return $form;
}