OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 { | 162 { |
163 m_location.setY(m_location.y() - dy); | 163 m_location.setY(m_location.y() - dy); |
164 m_size.setHeight(m_size.height() + dy + dy); | 164 m_size.setHeight(m_size.height() + dy + dy); |
165 } | 165 } |
166 void inflate(float d) { inflateX(d); inflateY(d); } | 166 void inflate(float d) { inflateX(d); inflateY(d); } |
167 void scale(float s) { scale(s, s); } | 167 void scale(float s) { scale(s, s); } |
168 void scale(float sx, float sy); | 168 void scale(float sx, float sy); |
169 | 169 |
170 FloatRect transposedRect() const { return FloatRect(m_location.transposedPoi
nt(), m_size.transposedSize()); } | 170 FloatRect transposedRect() const { return FloatRect(m_location.transposedPoi
nt(), m_size.transposedSize()); } |
171 | 171 |
| 172 float squaredDistanceTo(const FloatPoint&) const; |
| 173 |
172 #if OS(MACOSX) | 174 #if OS(MACOSX) |
173 FloatRect(const CGRect&); | 175 FloatRect(const CGRect&); |
174 operator CGRect() const; | 176 operator CGRect() const; |
175 #if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) | 177 #if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) |
176 FloatRect(const NSRect&); | 178 FloatRect(const NSRect&); |
177 operator NSRect() const; | 179 operator NSRect() const; |
178 #endif | 180 #endif |
179 #endif | 181 #endif |
180 | 182 |
181 operator SkRect() const { return SkRect::MakeXYWH(x(), y(), width(), height(
)); } | 183 operator SkRect() const { return SkRect::MakeXYWH(x(), y(), width(), height(
)); } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 // Map supplied rect from srcRect to an equivalent rect in destRect. | 251 // Map supplied rect from srcRect to an equivalent rect in destRect. |
250 PLATFORM_EXPORT FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, co
nst FloatRect& destRect); | 252 PLATFORM_EXPORT FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, co
nst FloatRect& destRect); |
251 | 253 |
252 // Redeclared here to avoid ODR issues. | 254 // Redeclared here to avoid ODR issues. |
253 // See platform/testing/GeometryPrinters.h. | 255 // See platform/testing/GeometryPrinters.h. |
254 void PrintTo(const FloatRect&, std::ostream*); | 256 void PrintTo(const FloatRect&, std::ostream*); |
255 | 257 |
256 } // namespace blink | 258 } // namespace blink |
257 | 259 |
258 #endif | 260 #endif |
OLD | NEW |