| Index: Source/core/rendering/shapes/ShapeInterval.h
|
| diff --git a/Source/core/rendering/shapes/ShapeInterval.h b/Source/core/rendering/shapes/ShapeInterval.h
|
| index efeb7d862c0e046e20620aa3df10acb9b2634250..3c2fb368a72a1c4efcfdc50210ab0a2d94fa687c 100644
|
| --- a/Source/core/rendering/shapes/ShapeInterval.h
|
| +++ b/Source/core/rendering/shapes/ShapeInterval.h
|
| @@ -207,6 +207,16 @@ public:
|
| bool operator==(const ShapeInterval<T>& other) const { return x1() == other.x1() && x2() == other.x2(); }
|
| bool operator!=(const ShapeInterval<T>& other) const { return !operator==(other); }
|
|
|
| + void unite(const ShapeInterval<T>& interval)
|
| + {
|
| + if (interval.isEmpty())
|
| + return;
|
| + if (isEmpty())
|
| + set(interval.x1(), interval.x2());
|
| + else
|
| + set(std::min<T>(x1(), interval.x1()), std::max<T>(x2(), interval.x2()));
|
| + }
|
| +
|
| private:
|
| T m_x1;
|
| T m_x2;
|
|
|