1 /*
2 * Copyright (C) 2008 Emweb bv, Herent, Belgium.
3 *
4 * See the LICENSE file for terms of use.
5 */
6
7 #include "Wt/WShadow.h"
8
9 namespace Wt {
10
WShadow()11 WShadow::WShadow()
12 : color_(StandardColor::Black),
13 offsetX_(0),
14 offsetY_(0),
15 blur_(0)
16 { }
17
WShadow(double dx,double dy,const WColor & color,double blur)18 WShadow::WShadow(double dx, double dy, const WColor& color, double blur)
19 : color_(color),
20 offsetX_(dx),
21 offsetY_(dy),
22 blur_(blur)
23 { }
24
none()25 bool WShadow::none() const
26 {
27 return offsetX_ == 0 && offsetY_ == 0 && blur_ == 0;
28 }
29
30 bool WShadow::operator==(const WShadow& other) const
31 {
32 return color_ == other.color_
33 && offsetX_ == other.offsetX_
34 && offsetY_ == other.offsetY_
35 && blur_ == other.blur_;
36 }
37
38 bool WShadow::operator!=(const WShadow& other) const
39 {
40 return !(*this == other);
41 }
42
setOffsets(double dx,double dy)43 void WShadow::setOffsets(double dx, double dy)
44 {
45 offsetX_ = dx;
46 offsetY_ = dy;
47 }
48
setColor(const WColor & color)49 void WShadow::setColor(const WColor& color)
50 {
51 color_ = color;
52 }
53
setBlur(double blur)54 void WShadow::setBlur(double blur)
55 {
56 blur_ = blur;
57 }
58
59 }
60