Changeset 326 for cleversvg/trunk/base/csBaseShape.class.php
- Timestamp:
- 02/27/08 22:52:17 (4 years ago)
- Files:
-
- 1 modified
-
cleversvg/trunk/base/csBaseShape.class.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cleversvg/trunk/base/csBaseShape.class.php
r318 r326 1 1 <?php 2 2 /** 3 * SVG Base Shape abstract class. All shapes heritatesfrom this base class.4 * 3 * SVG Base Shape abstract class. All shapes inherit from this base class. 4 * 5 5 * @author Nicolas Perriault <nperriault@gmail.com> 6 6 * @package cleversvg 7 7 * @subpackage elements 8 8 */ 9 abstractclass csBaseShape extends csBaseElement9 class csBaseShape extends csBaseElement 10 10 { 11 11 12 12 /** 13 13 * Computes DOMXML Node 14 * 14 * 15 15 * @param boolean $embedded Is SVG element embedded ? 16 16 * @return DOMElement … … 19 19 { 20 20 $element_node = parent::compile($embedded); 21 21 22 22 // Transformations, if any 23 23 if (count($this->transforms) > 0) … … 26 26 foreach ($this->transforms as $transform_name => $transform_params) 27 27 { 28 $transforms[] = sprintf('%s(%s)', 29 $transform_name, 28 $transforms[] = sprintf('%s(%s)', 29 $transform_name, 30 30 implode(',', $transform_params)); 31 31 32 32 } 33 33 $element_node->setAttribute('transform', implode(' ', $transforms)); 34 34 } 35 35 36 36 return $element_node; 37 37 } 38 38 39 39 /** 40 40 * Sets the class name of element 41 * 41 * 42 42 * @param mixed $class 43 43 */ … … 49 49 /** 50 50 * Sets the fill color of shape 51 * 51 * 52 52 * @param mixed $color 53 53 */ … … 56 56 $this->setAttribute('fill', $color, 'none'); 57 57 } 58 58 59 59 /** 60 60 * Sets the fill opacity of shape 61 * 61 * 62 62 * @param mixed $fill_opacity 63 63 */ … … 66 66 $this->setAttribute('fill-opacity', $fill_opacity, '0'); 67 67 } 68 68 69 69 /** 70 70 * Sets the global opacity of shape 71 * 71 * 72 72 * @param mixed $opacity 73 73 */ … … 76 76 $this->setAttribute('opacity', $opacity, '0'); 77 77 } 78 78 79 79 /** 80 80 * Sets the color of shape stroke 81 * 81 * 82 82 * @param string $color 83 83 */ … … 86 86 $this->setAttribute('stroke', $color, 'none'); 87 87 } 88 88 89 89 /** 90 90 * Sets the width of shape stroke 91 * 91 * 92 92 * @param mixed $width 93 93 */
