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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 { | 159 { |
160 m_location.setY(m_location.y() - dy); | 160 m_location.setY(m_location.y() - dy); |
161 m_size.setHeight(m_size.height() + dy + dy); | 161 m_size.setHeight(m_size.height() + dy + dy); |
162 } | 162 } |
163 void inflate(float d) { inflateX(d); inflateY(d); } | 163 void inflate(float d) { inflateX(d); inflateY(d); } |
164 void scale(float s) { scale(s, s); } | 164 void scale(float s) { scale(s, s); } |
165 void scale(float sx, float sy); | 165 void scale(float sx, float sy); |
166 | 166 |
167 FloatRect transposedRect() const { return FloatRect(m_location.transposedPoi
nt(), m_size.transposedSize()); } | 167 FloatRect transposedRect() const { return FloatRect(m_location.transposedPoi
nt(), m_size.transposedSize()); } |
168 | 168 |
169 // Re-initializes this rectangle to fit the sets of passed points. | |
170 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1); | |
171 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoin
t& p2); | |
172 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoin
t& p2, const FloatPoint& p3); | |
173 | |
174 #if OS(MACOSX) | 169 #if OS(MACOSX) |
175 FloatRect(const CGRect&); | 170 FloatRect(const CGRect&); |
176 operator CGRect() const; | 171 operator CGRect() const; |
177 #if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) | 172 #if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) |
178 FloatRect(const NSRect&); | 173 FloatRect(const NSRect&); |
179 operator NSRect() const; | 174 operator NSRect() const; |
180 #endif | 175 #endif |
181 #endif | 176 #endif |
182 | 177 |
183 operator SkRect() const { return SkRect::MakeXYWH(x(), y(), width(), height(
)); } | 178 operator SkRect() const { return SkRect::MakeXYWH(x(), y(), width(), height(
)); } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 PLATFORM_EXPORT IntRect enclosedIntRect(const FloatRect&); | 241 PLATFORM_EXPORT IntRect enclosedIntRect(const FloatRect&); |
247 | 242 |
248 PLATFORM_EXPORT IntRect roundedIntRect(const FloatRect&); | 243 PLATFORM_EXPORT IntRect roundedIntRect(const FloatRect&); |
249 | 244 |
250 // Map supplied rect from srcRect to an equivalent rect in destRect. | 245 // Map supplied rect from srcRect to an equivalent rect in destRect. |
251 PLATFORM_EXPORT FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, co
nst FloatRect& destRect); | 246 PLATFORM_EXPORT FloatRect mapRect(const FloatRect&, const FloatRect& srcRect, co
nst FloatRect& destRect); |
252 | 247 |
253 } | 248 } |
254 | 249 |
255 #endif | 250 #endif |
OLD | NEW |