4
* PHPExcel_Worksheet_Drawing_Shadow
6
* Copyright (c) 2006 - 2015 PHPExcel
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2.1 of the License, or (at your option) any later version.
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
* @package PHPExcel_Worksheet_Drawing
24
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
25
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
26
* @version ##VERSION##, ##DATE##
28
class PHPExcel_Worksheet_Drawing_Shadow implements PHPExcel_IComparable
30
/* Shadow alignment */
31
const SHADOW_BOTTOM = 'b';
32
const SHADOW_BOTTOM_LEFT = 'bl';
33
const SHADOW_BOTTOM_RIGHT = 'br';
34
const SHADOW_CENTER = 'ctr';
35
const SHADOW_LEFT = 'l';
36
const SHADOW_TOP = 't';
37
const SHADOW_TOP_LEFT = 'tl';
38
const SHADOW_TOP_RIGHT = 'tr';
66
* Shadow direction (in degrees)
82
* @var PHPExcel_Style_Color
94
* Create a new PHPExcel_Worksheet_Drawing_Shadow
96
public function __construct()
99
$this->visible = false;
100
$this->blurRadius = 6;
102
$this->direction = 0;
103
$this->alignment = PHPExcel_Worksheet_Drawing_Shadow::SHADOW_BOTTOM_RIGHT;
104
$this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK);
113
public function getVisible()
115
return $this->visible;
121
* @param boolean $pValue
122
* @return PHPExcel_Worksheet_Drawing_Shadow
124
public function setVisible($pValue = false)
126
$this->visible = $pValue;
135
public function getBlurRadius()
137
return $this->blurRadius;
144
* @return PHPExcel_Worksheet_Drawing_Shadow
146
public function setBlurRadius($pValue = 6)
148
$this->blurRadius = $pValue;
153
* Get Shadow distance
157
public function getDistance()
159
return $this->distance;
163
* Set Shadow distance
166
* @return PHPExcel_Worksheet_Drawing_Shadow
168
public function setDistance($pValue = 2)
170
$this->distance = $pValue;
175
* Get Shadow direction (in degrees)
179
public function getDirection()
181
return $this->direction;
185
* Set Shadow direction (in degrees)
188
* @return PHPExcel_Worksheet_Drawing_Shadow
190
public function setDirection($pValue = 0)
192
$this->direction = $pValue;
197
* Get Shadow alignment
201
public function getAlignment()
203
return $this->alignment;
207
* Set Shadow alignment
210
* @return PHPExcel_Worksheet_Drawing_Shadow
212
public function setAlignment($pValue = 0)
214
$this->alignment = $pValue;
221
* @return PHPExcel_Style_Color
223
public function getColor()
231
* @param PHPExcel_Style_Color $pValue
232
* @throws PHPExcel_Exception
233
* @return PHPExcel_Worksheet_Drawing_Shadow
235
public function setColor(PHPExcel_Style_Color $pValue = null)
237
$this->color = $pValue;
246
public function getAlpha()
255
* @return PHPExcel_Worksheet_Drawing_Shadow
257
public function setAlpha($pValue = 0)
259
$this->alpha = $pValue;
266
* @return string Hash code
268
public function getHashCode()
271
($this->visible ? 't' : 'f') .
276
$this->color->getHashCode() .
283
* Implement PHP __clone to create a deep clone, not just a shallow copy.
285
public function __clone()
287
$vars = get_object_vars($this);
288
foreach ($vars as $key => $value) {
289
if (is_object($value)) {
290
$this->$key = clone $value;
292
$this->$key = $value;