diff --git a/src/framework/util/rect.h b/src/framework/util/rect.h index ed93635d..e56e7c40 100644 --- a/src/framework/util/rect.h +++ b/src/framework/util/rect.h @@ -222,9 +222,9 @@ public: TRect united(const TRect &r) const { TRect tmp; tmp.x1 = std::min(x1, r.x1); - tmp.x2 = std::max(x2, r.x2); - tmp.y1 = std::min(y1, r.y1); - tmp.y2 = std::max(y2, r.y2); + tmp.x2 = std::max(x2, r.x2); + tmp.y1 = std::min(y1, r.y1); + tmp.y2 = std::max(y2, r.y2); return tmp; } diff --git a/src/framework/util/size.h b/src/framework/util/size.h index 5298a7f3..f2ffb822 100644 --- a/src/framework/util/size.h +++ b/src/framework/util/size.h @@ -70,8 +70,8 @@ public: bool operator==(const TSize& other) const { return other.wd==wd && other.ht==ht; } bool operator!=(const TSize& other) const { return other.wd!=wd || other.ht!=ht; } - TSize expandedTo(const TSize& other) const { return TSize(std::max(wd, other.wd), std::max(ht, other.ht)); } - TSize boundedTo(const TSize& other) const { return TSize(std::min(wd, other.wd), std::min(ht, other.ht)); } + TSize expandedTo(const TSize& other) const { return TSize(std::max(wd, other.wd), std::max(ht, other.ht)); } + TSize boundedTo(const TSize& other) const { return TSize(std::min(wd, other.wd), std::min(ht, other.ht)); } void scale(const TSize& s, Fw::AspectRatioMode mode) { if(mode == Fw::IgnoreAspectRatio || wd == 0 || ht == 0) {