ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
Shadow.php
Go to the documentation of this file.
1 <?php
37 {
38  /* Shadow alignment */
39  const SHADOW_BOTTOM = 'b';
40  const SHADOW_BOTTOM_LEFT = 'bl';
41  const SHADOW_BOTTOM_RIGHT = 'br';
42  const SHADOW_CENTER = 'ctr';
43  const SHADOW_LEFT = 'l';
44  const SHADOW_TOP = 't';
45  const SHADOW_TOP_LEFT = 'tl';
46  const SHADOW_TOP_RIGHT = 'tr';
47 
53  private $_visible;
54 
62  private $_blurRadius;
63 
71  private $_distance;
72 
78  private $_direction;
79 
85  private $_alignment;
86 
92  private $_color;
93 
99  private $_alpha;
100 
104  public function __construct()
105  {
106  // Initialise values
107  $this->_visible = false;
108  $this->_blurRadius = 6;
109  $this->_distance = 2;
110  $this->_direction = 0;
113  $this->_alpha = 50;
114  }
115 
121  public function getVisible() {
122  return $this->_visible;
123  }
124 
131  public function setVisible($pValue = false) {
132  $this->_visible = $pValue;
133  return $this;
134  }
135 
141  public function getBlurRadius() {
142  return $this->_blurRadius;
143  }
144 
151  public function setBlurRadius($pValue = 6) {
152  $this->_blurRadius = $pValue;
153  return $this;
154  }
155 
161  public function getDistance() {
162  return $this->_distance;
163  }
164 
171  public function setDistance($pValue = 2) {
172  $this->_distance = $pValue;
173  return $this;
174  }
175 
181  public function getDirection() {
182  return $this->_direction;
183  }
184 
191  public function setDirection($pValue = 0) {
192  $this->_direction = $pValue;
193  return $this;
194  }
195 
201  public function getAlignment() {
202  return $this->_alignment;
203  }
204 
211  public function setAlignment($pValue = 0) {
212  $this->_alignment = $pValue;
213  return $this;
214  }
215 
221  public function getColor() {
222  return $this->_color;
223  }
224 
232  public function setColor(PHPExcel_Style_Color $pValue = null) {
233  $this->_color = $pValue;
234  return $this;
235  }
236 
242  public function getAlpha() {
243  return $this->_alpha;
244  }
245 
252  public function setAlpha($pValue = 0) {
253  $this->_alpha = $pValue;
254  return $this;
255  }
256 
262  public function getHashCode() {
263  return md5(
264  ($this->_visible ? 't' : 'f')
265  . $this->_blurRadius
266  . $this->_distance
267  . $this->_direction
268  . $this->_alignment
269  . $this->_color->getHashCode()
270  . $this->_alpha
271  . __CLASS__
272  );
273  }
274 
278  public function __clone() {
279  $vars = get_object_vars($this);
280  foreach ($vars as $key => $value) {
281  if (is_object($value)) {
282  $this->$key = clone $value;
283  } else {
284  $this->$key = $value;
285  }
286  }
287  }
288 }