add operator==()
This commit is contained in:
parent
6a1a25efbf
commit
ce2eaa02ee
2 changed files with 14 additions and 1 deletions
|
@ -81,7 +81,7 @@ public:
|
|||
gradient(gradient const& other);
|
||||
gradient(gradient && other);
|
||||
gradient& operator=(gradient rhs);
|
||||
|
||||
bool operator==(gradient const& other) const;
|
||||
void set_gradient_type(gradient_e grad);
|
||||
gradient_e get_gradient_type() const;
|
||||
|
||||
|
|
|
@ -83,6 +83,19 @@ gradient & gradient::operator=(gradient rhs)
|
|||
return *this;
|
||||
}
|
||||
|
||||
bool gradient::operator==(gradient const& other) const
|
||||
{
|
||||
return transform_ == other.transform_ &&
|
||||
x1_ == other.x1_ &&
|
||||
y1_ == other.y1_ &&
|
||||
x2_ == other.x2_ &&
|
||||
y2_ == other.y2_ &&
|
||||
r_ == other.r_ &&
|
||||
std::equal(stops_.begin(),stops_.end(), other.stops_.begin()),
|
||||
units_ == other.units_ &&
|
||||
gradient_type_ == other.gradient_type_;
|
||||
}
|
||||
|
||||
void gradient::set_gradient_type(gradient_e grad)
|
||||
{
|
||||
gradient_type_=grad;
|
||||
|
|
Loading…
Reference in a new issue