OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 #if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) | 172 #if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) |
173 operator NSRect() const; | 173 operator NSRect() const; |
174 #endif | 174 #endif |
175 #endif | 175 #endif |
176 | 176 |
177 operator SkRect() const; | 177 operator SkRect() const; |
178 operator SkIRect() const; | 178 operator SkIRect() const; |
179 | 179 |
180 operator gfx::Rect() const; | 180 operator gfx::Rect() const; |
181 | 181 |
182 #ifndef NDEBUG | |
183 // Prints the rect to the screen. | |
184 void show() const; | |
185 String toString() const; | 182 String toString() const; |
186 #endif | |
187 | 183 |
188 private: | 184 private: |
189 IntPoint m_location; | 185 IntPoint m_location; |
190 IntSize m_size; | 186 IntSize m_size; |
191 }; | 187 }; |
192 | 188 |
193 inline IntRect intersection(const IntRect& a, const IntRect& b) | 189 inline IntRect intersection(const IntRect& a, const IntRect& b) |
194 { | 190 { |
195 IntRect c = a; | 191 IntRect c = a; |
196 c.intersect(b); | 192 c.intersect(b); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 230 |
235 // Redeclared here to avoid ODR issues. | 231 // Redeclared here to avoid ODR issues. |
236 // See platform/testing/GeometryPrinters.h. | 232 // See platform/testing/GeometryPrinters.h. |
237 void PrintTo(const IntRect&, std::ostream*); | 233 void PrintTo(const IntRect&, std::ostream*); |
238 | 234 |
239 } // namespace blink | 235 } // namespace blink |
240 | 236 |
241 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::IntRect); | 237 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::IntRect); |
242 | 238 |
243 #endif // IntRect_h | 239 #endif // IntRect_h |
OLD | NEW |