You are here

function imagecache_rotate_form in ImageCache 6.2

Same name and namespace in other branches
  1. 5.2 imagecache_actions.inc \imagecache_rotate_form()

ImageCache Rotate

File

./imagecache_actions.inc, line 226

Code

function imagecache_rotate_form($data = array()) {
  $form['degrees'] = array(
    '#type' => 'textfield',
    '#default_value' => isset($data['degrees']) ? $data['degrees'] : 0,
    '#title' => t('Rotation angle'),
    '#description' => t('The number of degrees the image should be rotated. Positive numbers are clockwise, negative are counter-clockwise.'),
  );
  $form['random'] = array(
    '#type' => 'checkbox',
    '#default_value' => isset($data['random']) ? $data['random'] : 0,
    '#title' => t('Randomize'),
    '#description' => t('Randomize the rotation angle for each image. The angle specified above is used as a maximum.'),
  );
  $form['bgcolor'] = array(
    '#type' => 'textfield',
    '#default_value' => isset($data['bgcolor']) ? $data['bgcolor'] : '',
    '#title' => t('Background color'),
    '#description' => t('The background color to use for exposed areas of the image. Use web-style hex colors (#FFFFFF for white, #000000 for black). An empty value will cause images that support transparency to have transparent backgrounds, otherwise it will be white.'),
  );
  return $form;
}