Lines Matching refs:Rect
36 class GFX_EXPORT Rect {
38 constexpr Rect() = default;
39 constexpr Rect(int width, int height) : size_(width, height) {} in Rect() function
40 constexpr Rect(int x, int y, int width, int height) in Rect() function
43 constexpr explicit Rect(const Size& size) : size_(size) {} in Rect() function
44 constexpr Rect(const Point& origin, const Size& size) in Rect() function
50 explicit Rect(const RECT& r);
52 explicit Rect(const CGRect& r);
137 Insets InsetsFrom(const Rect& inner) const;
148 bool operator<(const Rect& other) const;
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);
193 void SplitVertically(Rect* left_half, Rect* right_half) const;
197 bool SharesEdgeWith(const Rect& rect) const;
207 int ManhattanInternalDistance(const Rect& rect) const;
211 bool ApproximatelyEqual(const Rect& rect, int tolerance) const;
241 inline bool operator==(const Rect& lhs, const Rect& rhs) {
245 inline bool operator!=(const Rect& lhs, const Rect& rhs) {
249 GFX_EXPORT Rect operator+(const Rect& lhs, const Vector2d& rhs);
250 GFX_EXPORT Rect operator-(const Rect& lhs, const Vector2d& rhs);
252 inline Rect operator+(const Vector2d& lhs, const Rect& rhs) {
256 GFX_EXPORT Rect IntersectRects(const Rect& a, const Rect& b);
257 GFX_EXPORT Rect UnionRects(const Rect& a, const Rect& b);
258 GFX_EXPORT Rect SubtractRects(const Rect& a, const Rect& b);
266 GFX_EXPORT Rect BoundingRect(const Point& p1, const Point& p2);
271 inline Rect ScaleToEnclosingRect(const Rect& rect, in ScaleToEnclosingRect()
294 return Rect(x, y, r - x, b - y); in ScaleToEnclosingRect()
297 inline Rect ScaleToEnclosingRect(const Rect& rect, float scale) { in ScaleToEnclosingRect()
303 inline Rect ScaleToEnclosingRectSafe(const Rect& rect, in ScaleToEnclosingRectSafe()
312 return Rect(x, y, w, h); in ScaleToEnclosingRectSafe()
315 inline Rect ScaleToEnclosingRectSafe(const Rect& rect, float scale) { in ScaleToEnclosingRectSafe()
319 inline Rect ScaleToEnclosedRect(const Rect& rect, in ScaleToEnclosedRect()
338 return Rect(x, y, r - x, b - y); in ScaleToEnclosedRect()
341 inline Rect ScaleToEnclosedRect(const Rect& rect, float scale) { in ScaleToEnclosedRect()
351 inline Rect ScaleToRoundedRect(const Rect& rect, float x_scale, float y_scale) { in ScaleToRoundedRect()
373 return Rect(x, y, r - x, b - y); in ScaleToRoundedRect()
376 inline Rect ScaleToRoundedRect(const Rect& rect, float scale) { in ScaleToRoundedRect()
383 void PrintTo(const Rect& rect, ::std::ostream* os);