You are here

function _textimage_text_effect_preview_image in Textimage 7.3

Deliver a preview of the textimage with the current settings.

Parameters

array $data: The current configuration for this image effect.

Return value

array The HTML to the preview image.

2 calls to _textimage_text_effect_preview_image()
textimage_text_effect_form in effects/textimage_text.inc
Settings for 'textimage_text' image effect.
_textimage_text_effect_form_ajax in effects/textimage_text.inc
AJAX callback to refresh the Textimage preview.

File

effects/textimage_text.inc, line 580
Implementation of the 'textimage_text' image effect.

Code

function _textimage_text_effect_preview_image($data) {
  $data['layout']['x_pos'] = 'center';
  $data['layout']['y_pos'] = 'center';
  $data['layout']['x_offset'] = 0;
  $data['layout']['y_offset'] = 0;
  $data['layout']['overflow_action'] = 'extend';
  $data['debug_visuals'] = $data['preview_bar']['debug_visuals'];
  return theme('textimage_direct_image', array(
    'text' => array(
      $data['text_string'],
    ),
    'effects' => array(
      array(
        'name' => 'textimage_text',
        'data' => $data,
      ),
    ),
    'title' => t('Preview'),
    'alt' => t('Display preview not available.'),
    'caching' => FALSE,
  ));
}