• Home
  • Raw
  • Download

Lines Matching refs:rect

161   bool Contains(const Rect& rect) const;
165 bool Intersects(const Rect& rect) const;
168 void Intersect(const Rect& rect);
172 void Union(const Rect& rect);
176 void Subtract(const Rect& rect);
183 void AdjustToFit(const Rect& rect);
197 bool SharesEdgeWith(const Rect& rect) const;
207 int ManhattanInternalDistance(const Rect& rect) const;
211 bool ApproximatelyEqual(const Rect& rect, int tolerance) const;
271 inline Rect ScaleToEnclosingRect(const Rect& rect, in ScaleToEnclosingRect() argument
275 return rect; in ScaleToEnclosingRect()
281 std::floor(rect.x() * x_scale))); in ScaleToEnclosingRect()
283 std::floor(rect.y() * y_scale))); in ScaleToEnclosingRect()
285 std::ceil(rect.right() * x_scale))); in ScaleToEnclosingRect()
287 std::ceil(rect.bottom() * y_scale))); in ScaleToEnclosingRect()
288 int x = static_cast<int>(std::floor(rect.x() * x_scale)); in ScaleToEnclosingRect()
289 int y = static_cast<int>(std::floor(rect.y() * y_scale)); in ScaleToEnclosingRect()
290 int r = rect.width() == 0 ? in ScaleToEnclosingRect()
291 x : static_cast<int>(std::ceil(rect.right() * x_scale)); in ScaleToEnclosingRect()
292 int b = rect.height() == 0 ? in ScaleToEnclosingRect()
293 y : static_cast<int>(std::ceil(rect.bottom() * y_scale)); in ScaleToEnclosingRect()
297 inline Rect ScaleToEnclosingRect(const Rect& rect, float scale) { in ScaleToEnclosingRect() argument
298 return ScaleToEnclosingRect(rect, scale, scale); in ScaleToEnclosingRect()
303 inline Rect ScaleToEnclosingRectSafe(const Rect& rect, in ScaleToEnclosingRectSafe() argument
307 return rect; in ScaleToEnclosingRectSafe()
308 int x = base::saturated_cast<int>(std::floor(rect.x() * x_scale)); in ScaleToEnclosingRectSafe()
309 int y = base::saturated_cast<int>(std::floor(rect.y() * y_scale)); in ScaleToEnclosingRectSafe()
310 int w = base::saturated_cast<int>(std::ceil(rect.width() * x_scale)); in ScaleToEnclosingRectSafe()
311 int h = base::saturated_cast<int>(std::ceil(rect.height() * y_scale)); in ScaleToEnclosingRectSafe()
315 inline Rect ScaleToEnclosingRectSafe(const Rect& rect, float scale) { in ScaleToEnclosingRectSafe() argument
316 return ScaleToEnclosingRectSafe(rect, scale, scale); in ScaleToEnclosingRectSafe()
319 inline Rect ScaleToEnclosedRect(const Rect& rect, in ScaleToEnclosedRect() argument
323 return rect; in ScaleToEnclosedRect()
325 std::ceil(rect.x() * x_scale))); in ScaleToEnclosedRect()
327 std::ceil(rect.y() * y_scale))); in ScaleToEnclosedRect()
329 std::floor(rect.right() * x_scale))); in ScaleToEnclosedRect()
331 std::floor(rect.bottom() * y_scale))); in ScaleToEnclosedRect()
332 int x = static_cast<int>(std::ceil(rect.x() * x_scale)); in ScaleToEnclosedRect()
333 int y = static_cast<int>(std::ceil(rect.y() * y_scale)); in ScaleToEnclosedRect()
334 int r = rect.width() == 0 ? in ScaleToEnclosedRect()
335 x : static_cast<int>(std::floor(rect.right() * x_scale)); in ScaleToEnclosedRect()
336 int b = rect.height() == 0 ? in ScaleToEnclosedRect()
337 y : static_cast<int>(std::floor(rect.bottom() * y_scale)); in ScaleToEnclosedRect()
341 inline Rect ScaleToEnclosedRect(const Rect& rect, float scale) { in ScaleToEnclosedRect() argument
342 return ScaleToEnclosedRect(rect, scale, scale); in ScaleToEnclosedRect()
351 inline Rect ScaleToRoundedRect(const Rect& rect, float x_scale, float y_scale) { in ScaleToRoundedRect() argument
353 return rect; in ScaleToRoundedRect()
356 base::IsValueInRangeForNumericType<int>(std::round(rect.x() * x_scale))); in ScaleToRoundedRect()
358 base::IsValueInRangeForNumericType<int>(std::round(rect.y() * y_scale))); in ScaleToRoundedRect()
360 std::round(rect.right() * x_scale))); in ScaleToRoundedRect()
362 std::round(rect.bottom() * y_scale))); in ScaleToRoundedRect()
364 int x = static_cast<int>(std::round(rect.x() * x_scale)); in ScaleToRoundedRect()
365 int y = static_cast<int>(std::round(rect.y() * y_scale)); in ScaleToRoundedRect()
366 int r = rect.width() == 0 in ScaleToRoundedRect()
368 : static_cast<int>(std::round(rect.right() * x_scale)); in ScaleToRoundedRect()
369 int b = rect.height() == 0 in ScaleToRoundedRect()
371 : static_cast<int>(std::round(rect.bottom() * y_scale)); in ScaleToRoundedRect()
376 inline Rect ScaleToRoundedRect(const Rect& rect, float scale) { in ScaleToRoundedRect() argument
377 return ScaleToRoundedRect(rect, scale, scale); in ScaleToRoundedRect()
383 void PrintTo(const Rect& rect, ::std::ostream* os);