You are here

function theme_canvasactions_definecanvas in ImageCache Actions 6.2

Same name and namespace in other branches
  1. 5.3 canvasactions.inc \theme_canvasactions_definecanvas()
  2. 5.2 canvasactions.inc \theme_canvasactions_definecanvas()
  3. 6 canvasactions.inc \theme_canvasactions_definecanvas()

Implementation of theme_hook() for imagecache_ui.module

File

canvasactions/canvasactions.inc, line 274

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;
}