Lines Matching defs:rect
215 bool AccessibilityWindowManager::CheckIntegerOverflow(const Rosen::Rect& rect)
217 if ((rect.posX_ > 0) && (static_cast<int32_t>(rect.width_) > 0)) {
218 int32_t leftX = INT32_MAX - rect.posX_;
219 if (leftX < static_cast<int32_t>(rect.width_)) {
220 HILOG_ERROR("input parameter invalid posX %{public}d, width_ %{public}u", rect.posX_,
221 rect.width_);
226 if ((rect.posX_ < 0) && (static_cast<int32_t>(rect.width_) < 0)) {
227 int32_t leftX = INT32_MIN - rect.posX_;
228 if (leftX > static_cast<int32_t>(rect.width_)) {
229 HILOG_ERROR("input parameter invalid posX %{public}d, width_ %{public}u", rect.posX_,
230 rect.width_);
235 if ((rect.posY_ > 0) && (static_cast<int32_t>(rect.height_) > 0)) {
236 int32_t leftY = INT32_MAX - rect.posY_;
237 if (leftY < static_cast<int32_t>(rect.height_)) {
238 HILOG_ERROR("input parameter invalid posX %{public}d, height_ %{public}u", rect.posY_,
239 rect.height_);
244 if ((rect.posY_ < 0) && (static_cast<int32_t>(rect.height_) < 0)) {
245 int32_t leftY = INT32_MIN - rect.posY_;
246 if (leftY > static_cast<int32_t>(rect.height_)) {
247 HILOG_ERROR("input parameter invalid posX %{public}d, height_ %{public}u", rect.posY_,
248 rect.height_);
298 for (auto &rect : windowInfo->touchHotAreas_) {
300 rect.posX_, rect.posY_, rect.width_, rect.height_);
302 rectTemp.SetLeftTopScreenPostion(rect.posX_, rect.posY_);
303 if (!CheckIntegerOverflow(rect)) {
304 rectTemp.SetRightBottomScreenPostion(rect.posX_, rect.posY_);
307 rect.posX_ + static_cast<int32_t>(rect.width_),
308 rect.posY_ + static_cast<int32_t>(rect.height_));
493 void AccessibilityWindowManager::SetWindowSize(int32_t windowId, Rect rect)
502 it->second.SetRectInScreen(rect);
526 HILOG_DEBUG("rect values are the same");