/[drupal]/contributions/modules/imagecache_actions/textrender.inc
ViewVC logotype

Diff of /contributions/modules/imagecache_actions/textrender.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.4, Tue Sep 15 23:42:00 2009 UTC revision 1.1.2.5, Fri Oct 30 13:55:59 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: textrender.inc,v 1.1.2.3 2009/08/31 04:12:20 dman Exp $  // $Id: textrender.inc,v 1.1.2.4 2009/09/15 23:42:00 dman Exp $
3  /**  /**
4   * @file Helper functions for imagecache_textactions   * @file Helper functions for imagecache_textactions
5   *   *
# Line 17  Line 17 
17   * be ported over to there if that makes sense.   * be ported over to there if that makes sense.
18   */   */
19    
 require_once(dirname(__FILE__) . '/textactions.inc');  
   
20  /**  /**
21   * Place text on top of the current canvas   * Place text on top of the current canvas
22   *   *
# Line 66  function textactions_rendertext_form($ac Line 64  function textactions_rendertext_form($ac
64        '#collapsible' => TRUE,        '#collapsible' => TRUE,
65        '#collapsed' => TRUE,        '#collapsed' => TRUE,
66        '#title' => t('PHP code help'),        '#title' => t('PHP code help'),
67        '#value' => file_get_contents(drupal_get_path('module', 'imagecache_textactions') .'/help/textrender_syntax.html'),        '#value' => file_get_contents(drupal_get_path('module', 'imagecache_text') .'/help/textrender_syntax.html'),
68      ),      ),
69    );    );
70    if (! user_access('administer site configuration')) {    if (! user_access('administer site configuration')) {
# Line 88  function textactions_rendertext_form($ac Line 86  function textactions_rendertext_form($ac
86  function theme_textactions_rendertext($element) {  function theme_textactions_rendertext($element) {
87    $data = $element['#value'];    $data = $element['#value'];
88    $style_atts = imageapi_text_parse_style($data['textstyle']['style']);    $style_atts = imageapi_text_parse_style($data['textstyle']['style']);
89    return t("<em><strong>@data</strong></em><br/>%style", array('@data' => $data['text'], '%style' => $data['textstyle']['style'])) ;    return t("<em>\"<strong>@data</strong>\"</em><br/>%style<br/>%font", array(
90        '@data'  => $data['text'],
91        '%style' => $data['textstyle']['style'],
92        '%font'  => basename($data['textstyle']['fontfile'])
93      )) ;
94  }  }
95    
96  /**  /**
# Line 134  function textactions_rendertext_image(&$ Line 136  function textactions_rendertext_image(&$
136    // $textimage should now have its size info available.    // $textimage should now have its size info available.
137    // Calc the position on the canvas    // Calc the position on the canvas
138    $xy = imagecache_actions_calculate_relative_position($image, $textimage, $style);    $xy = imagecache_actions_calculate_relative_position($image, $textimage, $style);
139    #dpm(get_defined_vars());
140    return imageapi_image_overlay($image, $textimage, $xy['x'], $xy['y']);    return imageapi_image_overlay($image, $textimage, $xy['x'], $xy['y']);
141  }  }
142    

Legend:
Removed from v.1.1.2.4  
changed lines
  Added in v.1.1.2.5

  ViewVC Help
Powered by ViewVC 1.1.2