LEFT | RIGHT |
1 /* | 1 /* |
2 * Copyright (C) 2003-2016 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003-2016 Apple Inc. All rights reserved. |
3 * Copyright (C) 2005 Nokia. All rights reserved. | 3 * Copyright (C) 2005 Nokia. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 FloatPoint minXMinYCorner() const { return m_location; } // typically topLef
t | 137 FloatPoint minXMinYCorner() const { return m_location; } // typically topLef
t |
138 FloatPoint maxXMinYCorner() const { return FloatPoint(m_location.x() + m_siz
e.width(), m_location.y()); } // typically topRight | 138 FloatPoint maxXMinYCorner() const { return FloatPoint(m_location.x() + m_siz
e.width(), m_location.y()); } // typically topRight |
139 FloatPoint minXMaxYCorner() const { return FloatPoint(m_location.x(), m_loca
tion.y() + m_size.height()); } // typically bottomLeft | 139 FloatPoint minXMaxYCorner() const { return FloatPoint(m_location.x(), m_loca
tion.y() + m_size.height()); } // typically bottomLeft |
140 FloatPoint maxXMaxYCorner() const { return FloatPoint(m_location.x() + m_siz
e.width(), m_location.y() + m_size.height()); } // typically bottomRight | 140 FloatPoint maxXMaxYCorner() const { return FloatPoint(m_location.x() + m_siz
e.width(), m_location.y() + m_size.height()); } // typically bottomRight |
141 | 141 |
142 WEBCORE_EXPORT bool intersects(const FloatRect&) const; | 142 WEBCORE_EXPORT bool intersects(const FloatRect&) const; |
143 WEBCORE_EXPORT bool contains(const FloatRect&) const; | 143 WEBCORE_EXPORT bool contains(const FloatRect&) const; |
144 WEBCORE_EXPORT bool contains(const FloatPoint&, ContainsMode = InsideOrOnStr
oke) const; | 144 WEBCORE_EXPORT bool contains(const FloatPoint&, ContainsMode = InsideOrOnStr
oke) const; |
145 | 145 |
146 WEBCORE_EXPORT void intersect(const FloatRect&); | 146 WEBCORE_EXPORT void intersect(const FloatRect&); |
| 147 bool inclusiveIntersect(const FloatRect&); |
147 WEBCORE_EXPORT void unite(const FloatRect&); | 148 WEBCORE_EXPORT void unite(const FloatRect&); |
148 void uniteEvenIfEmpty(const FloatRect&); | 149 void uniteEvenIfEmpty(const FloatRect&); |
149 void uniteIfNonZero(const FloatRect&); | 150 void uniteIfNonZero(const FloatRect&); |
150 WEBCORE_EXPORT void extend(const FloatPoint&); | 151 WEBCORE_EXPORT void extend(const FloatPoint&); |
151 | 152 |
152 // Note, this doesn't match what IntRect::contains(IntPoint&) does; the int
version | 153 // Note, this doesn't match what IntRect::contains(IntPoint&) does; the int
version |
153 // is really checking for containment of 1x1 rect, but that doesn't make sen
se with floats. | 154 // is really checking for containment of 1x1 rect, but that doesn't make sen
se with floats. |
154 bool contains(float px, float py) const | 155 bool contains(float px, float py) const |
155 { return px >= x() && px <= maxX() && py >= y() && py <= maxY(); } | 156 { return px >= x() && px <= maxX() && py >= y() && py <= maxY(); } |
156 | 157 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 } | 266 } |
266 | 267 |
267 WEBCORE_EXPORT FloatRect encloseRectToDevicePixels(const FloatRect&, float devic
eScaleFactor); | 268 WEBCORE_EXPORT FloatRect encloseRectToDevicePixels(const FloatRect&, float devic
eScaleFactor); |
268 WEBCORE_EXPORT IntRect enclosingIntRect(const FloatRect&); | 269 WEBCORE_EXPORT IntRect enclosingIntRect(const FloatRect&); |
269 WEBCORE_EXPORT IntRect roundedIntRect(const FloatRect&); | 270 WEBCORE_EXPORT IntRect roundedIntRect(const FloatRect&); |
270 | 271 |
271 WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const FloatRect&); | 272 WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const FloatRect&); |
272 | 273 |
273 } | 274 } |
274 | 275 |
LEFT | RIGHT |