|
@@ -115,9 +115,9 @@ public:
|
|
|
std::tie(left, top, right, bottom) = box;
|
|
|
left = std::max(0, left);
|
|
|
top = std::max(0, top);
|
|
|
- right = std::min(canvasWidth, right);
|
|
|
- bottom = std::min(canvasHeight, bottom);
|
|
|
- std::tuple<T, T, T, T> all = std::make_tuple(0, 0, canvasWidth, canvasHeight);
|
|
|
+ right = std::min(static_cast<T>(canvasWidth), right);
|
|
|
+ bottom = std::min(static_cast<T>(canvasHeight), bottom);
|
|
|
+ std::tuple<T, T, T, T> all = std::make_tuple(0, 0, static_cast<T>(canvasWidth), static_cast<T>(canvasHeight));
|
|
|
|
|
|
// 一个框有6个可以画框的区域,判断那些区域没超过画面
|
|
|
std::vector<std::tuple<T, T, T, T>> positions =
|