function theme_canvasactions_definecanvas in ImageCache Actions 6
Same name and namespace in other branches
- 5.3 canvasactions.inc \theme_canvasactions_definecanvas()
- 5.2 canvasactions.inc \theme_canvasactions_definecanvas()
- 6.2 canvasactions/canvasactions.inc \theme_canvasactions_definecanvas()
Implementation of theme_hook() for imagecache_ui.module
File
- ./
canvasactions.inc, line 140 - Helper functions for the text2canvas action for imagecache
Code
function theme_canvasactions_definecanvas($element) {
$action = $element['#value'];
if ($action['exact']['width'] || $action['exact']['width']) {
$output = $action['exact']['width'] . 'x' . $action['exact']['height'];
$output .= " (" . $action['exact']['xpos'] . ', ' . $action['exact']['ypos'] . ") ";
}
else {
$output = ' left:' . $action['relative']['leftdiff'];
$output .= ' right:' . $action['relative']['rightdiff'];
$output .= ' top:' . $action['relative']['topdiff'];
$output .= ' bottom:' . $action['relative']['bottomdiff'];
}
$output .= theme_imagecacheactions_rgb($action['RGB']);
$output .= $action['under'] ? t(" <b>under</b> image ") : t(" <b>over</b> image ");
return $output;
}