ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Shadow.php
Go to the documentation of this file.
1 <?php
30 if (!defined('PHPEXCEL_ROOT')) {
34  define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../../');
35 }
36 
38 require_once PHPEXCEL_ROOT . 'PHPExcel/IComparable.php';
39 
41 require_once PHPEXCEL_ROOT . 'PHPExcel/Worksheet.php';
42 
44 require_once PHPEXCEL_ROOT . 'PHPExcel/Style/Color.php';
45 
54 {
55  /* Shadow alignment */
56  const SHADOW_BOTTOM = 'b';
57  const SHADOW_BOTTOM_LEFT = 'bl';
58  const SHADOW_BOTTOM_RIGHT = 'br';
59  const SHADOW_CENTER = 'ctr';
60  const SHADOW_LEFT = 'l';
61  const SHADOW_TOP = 't';
62  const SHADOW_TOP_LEFT = 'tl';
63  const SHADOW_TOP_RIGHT = 'tr';
64 
70  private $_visible;
71 
79  private $_blurRadius;
80 
88  private $_distance;
89 
95  private $_direction;
96 
102  private $_alignment;
103 
109  private $_color;
110 
116  private $_alpha;
117 
121  public function __construct()
122  {
123  // Initialise values
124  $this->_visible = false;
125  $this->_blurRadius = 6;
126  $this->_distance = 2;
127  $this->_direction = 0;
130  $this->_alpha = 50;
131  }
132 
138  public function getVisible() {
139  return $this->_visible;
140  }
141 
148  public function setVisible($pValue = false) {
149  $this->_visible = $pValue;
150  return $this;
151  }
152 
158  public function getBlurRadius() {
159  return $this->_blurRadius;
160  }
161 
168  public function setBlurRadius($pValue = 6) {
169  $this->_blurRadius = $pValue;
170  return $this;
171  }
172 
178  public function getDistance() {
179  return $this->_distance;
180  }
181 
188  public function setDistance($pValue = 2) {
189  $this->_distance = $pValue;
190  return $this;
191  }
192 
198  public function getDirection() {
199  return $this->_direction;
200  }
201 
208  public function setDirection($pValue = 0) {
209  $this->_direction = $pValue;
210  return $this;
211  }
212 
218  public function getAlignment() {
219  return $this->_alignment;
220  }
221 
228  public function setAlignment($pValue = 0) {
229  $this->_alignment = $pValue;
230  return $this;
231  }
232 
238  public function getColor() {
239  return $this->_color;
240  }
241 
249  public function setColor(PHPExcel_Style_Color $pValue = null) {
250  $this->_color = $pValue;
251  return $this;
252  }
253 
259  public function getAlpha() {
260  return $this->_alpha;
261  }
262 
269  public function setAlpha($pValue = 0) {
270  $this->_alpha = $pValue;
271  return $this;
272  }
273 
279  public function getHashCode() {
280  return md5(
281  ($this->_visible ? 't' : 'f')
282  . $this->_blurRadius
283  . $this->_distance
284  . $this->_direction
285  . $this->_alignment
286  . $this->_color->getHashCode()
287  . $this->_alpha
288  . __CLASS__
289  );
290  }
291 
297  private $_hashIndex;
298 
307  public function getHashIndex() {
308  return $this->_hashIndex;
309  }
310 
319  public function setHashIndex($value) {
320  $this->_hashIndex = $value;
321  }
322 
326  public function __clone() {
327  $vars = get_object_vars($this);
328  foreach ($vars as $key => $value) {
329  if (is_object($value)) {
330  $this->$key = clone $value;
331  } else {
332  $this->$key = $value;
333  }
334  }
335  }
336 }