Show
Ignore:
Timestamp:
02/27/08 22:52:17 (4 years ago)
Author:
nperriault
Message:

refs #40 - More tests + bug fixes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cleversvg/trunk/base/csBaseShape.class.php

    r318 r326  
    11<?php 
    22/** 
    3  * SVG Base Shape abstract class. All shapes heritates from this base class. 
    4  *  
     3 * SVG Base Shape abstract class. All shapes inherit from this base class. 
     4 * 
    55 * @author     Nicolas Perriault <nperriault@gmail.com> 
    66 * @package    cleversvg 
    77 * @subpackage elements 
    88 */ 
    9 abstract class csBaseShape extends csBaseElement 
     9class csBaseShape extends csBaseElement 
    1010{ 
    1111 
    1212  /** 
    1313   * Computes DOMXML Node 
    14    *  
     14   * 
    1515   * @param  boolean  $embedded  Is SVG element embedded ? 
    1616   * @return DOMElement 
     
    1919  { 
    2020    $element_node = parent::compile($embedded); 
    21      
     21 
    2222    // Transformations, if any 
    2323    if (count($this->transforms) > 0) 
     
    2626      foreach ($this->transforms as $transform_name => $transform_params) 
    2727      { 
    28         $transforms[] = sprintf('%s(%s)',  
    29                                 $transform_name,  
     28        $transforms[] = sprintf('%s(%s)', 
     29                                $transform_name, 
    3030                                implode(',', $transform_params)); 
    31          
     31 
    3232      } 
    3333      $element_node->setAttribute('transform', implode(' ', $transforms)); 
    3434    } 
    35      
     35 
    3636    return $element_node; 
    3737  } 
    38    
     38 
    3939  /** 
    4040   * Sets the class name of element 
    41    *  
     41   * 
    4242   * @param  mixed  $class 
    4343   */ 
     
    4949  /** 
    5050   * Sets the fill color of shape 
    51    *  
     51   * 
    5252   * @param  mixed  $color 
    5353   */ 
     
    5656    $this->setAttribute('fill', $color, 'none'); 
    5757  } 
    58    
     58 
    5959  /** 
    6060   * Sets the fill opacity of shape 
    61    *  
     61   * 
    6262   * @param  mixed  $fill_opacity 
    6363   */ 
     
    6666    $this->setAttribute('fill-opacity', $fill_opacity, '0'); 
    6767  } 
    68    
     68 
    6969  /** 
    7070   * Sets the global opacity of shape 
    71    *  
     71   * 
    7272   * @param  mixed  $opacity 
    7373   */ 
     
    7676    $this->setAttribute('opacity', $opacity, '0'); 
    7777  } 
    78    
     78 
    7979  /** 
    8080   * Sets the color of shape stroke 
    81    *  
     81   * 
    8282   * @param  string  $color 
    8383   */ 
     
    8686    $this->setAttribute('stroke', $color, 'none'); 
    8787  } 
    88    
     88 
    8989  /** 
    9090   * Sets the width of shape stroke 
    91    *  
     91   * 
    9292   * @param  mixed  $width 
    9393   */