/[drupal]/contributions/modules/transformer/transforms/fill.transform
ViewVC logotype

Contents of /contributions/modules/transformer/transforms/fill.transform

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


Revision 1.3 - (show annotations) (download)
Sat Mar 10 04:59:19 2007 UTC (2 years, 8 months ago) by dopry
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
a bit of drupal 5 lovin. I forgot I originally wrote this thing during 4.7.
1 <?php
2 /**
3 * Fill Transform
4 */
5
6 function transformer_transform_fill_info() {
7 return array(
8 'title' => t('Fill'),
9 'mimes' => array('image/jpeg','image/gif','image/png'),
10 'extensions' => array('gif','jpg','jpeg','png'),
11 'priority' => 0,
12 );
13 }
14
15 function transformer_transform_fill_form($data) {
16 $form = array();
17 $form['fill_color'] = array(
18 '#type' => 'textfield',
19 '#title' => t('Fill color'),
20 '#size' => 15,'#maxlength' => 30,
21 '#default_value' => $data['fill_color'],
22 );
23 $form['#validate'] = array('transformer_transform_fill_form_validate' => array());
24 return $form;
25 }
26
27 function transformer_transform_fill_form_validate() {
28 }
29
30 function transformer_transform_fill_perform($source, $destination, $data) { //*
31 _transformer_transform_hex2rgb($data['fill_color'],$r,$g,$b);
32 return image_toolkit_invoke('fill', array($source, $destination, $r, $g, $b));
33 }
34 ?>

  ViewVC Help
Powered by ViewVC 1.1.2