function canvasactions_imagemask_form in ImageCache Actions 6.2
Same name and namespace in other branches
- 8 canvasactions/canvasactions.inc \canvasactions_imagemask_form()
- 7 canvasactions/canvasactions.inc \canvasactions_imagemask_form()
Use a given image to mask the current canvas
Implementation of imagecache_hook_form()
Parameters
$action array of settings for this action:
Return value
a form definition
File
- canvasactions/
canvasactions.inc, line 39
Code
function canvasactions_imagemask_form($action) {
// TODO: add offset/positioning/scaling support - currently the mask is applied to the supplied image without resizing and positioned at (0,0)
$form['path'] = array(
'#type' => 'textfield',
'#title' => t('file name'),
'#default_value' => $action['path'],
'#description' => t('File may be in the "files/" folder, or relative to the Drupal siteroot. This action will convert your image to a 32 bit PNG. Reference a grayscale image where black is transparent and white is opaque. The referenced mask will be applied to the top left of the image.'),
'#element_validate' => array(
'canvasactions_file2canvas_validate_file',
),
);
return $form;
}