You are here

function imagecrop_rotation_settings_form in Image javascript crop 7

Show the rotation form for the current imagecrop.

1 string reference to 'imagecrop_rotation_settings_form'
imagecrop_cropping_page in includes/imagecrop.admin.inc
Show the cropping page for the selected image style.

File

includes/imagecrop.admin.inc, line 452
Administration tools for the imagecrop module.

Code

function imagecrop_rotation_settings_form($form, $form_state, $imagecrop) {
  $options = array();
  $i = 0;
  while ($i <= 180) {
    $options[$i] = $i . '°';
    $i += 10;
  }
  $current_rotation = $imagecrop
    ->getRotation();
  $form['rotation'] = array(
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => $current_rotation,
    '#title' => t('Rotate image'),
  );
  return $form;
}