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 24 matching lines...) Expand all Loading... |
35 #endif | 35 #endif |
36 | 36 |
37 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN)) | 37 #if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN)) |
38 #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES | 38 #ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES |
39 typedef struct CGRect NSRect; | 39 typedef struct CGRect NSRect; |
40 #else | 40 #else |
41 typedef struct _NSRect NSRect; | 41 typedef struct _NSRect NSRect; |
42 #endif | 42 #endif |
43 #endif | 43 #endif |
44 | 44 |
45 #if PLATFORM(QT) | |
46 QT_BEGIN_NAMESPACE | |
47 class QRectF; | |
48 QT_END_NAMESPACE | |
49 #endif | |
50 | |
51 #if PLATFORM(BLACKBERRY) | |
52 namespace BlackBerry { | |
53 namespace Platform { | |
54 class FloatRect; | |
55 } | |
56 } | |
57 #endif | |
58 | |
59 #if USE(SKIA) | 45 #if USE(SKIA) |
60 struct SkRect; | 46 struct SkRect; |
61 #endif | 47 #endif |
62 | 48 |
63 namespace WebCore { | 49 namespace WebCore { |
64 | 50 |
65 #if PLATFORM(OPENVG) | 51 #if PLATFORM(OPENVG) |
66 class VGRect; | 52 class VGRect; |
67 #endif | 53 #endif |
68 | 54 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 void scale(float s) { scale(s, s); } | 161 void scale(float s) { scale(s, s); } |
176 void scale(float sx, float sy); | 162 void scale(float sx, float sy); |
177 | 163 |
178 FloatRect transposedRect() const { return FloatRect(m_location.transposedPoi
nt(), m_size.transposedSize()); } | 164 FloatRect transposedRect() const { return FloatRect(m_location.transposedPoi
nt(), m_size.transposedSize()); } |
179 | 165 |
180 // Re-initializes this rectangle to fit the sets of passed points. | 166 // Re-initializes this rectangle to fit the sets of passed points. |
181 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1); | 167 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1); |
182 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoin
t& p2); | 168 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoin
t& p2); |
183 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoin
t& p2, const FloatPoint& p3); | 169 void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoin
t& p2, const FloatPoint& p3); |
184 | 170 |
185 #if PLATFORM(BLACKBERRY) | |
186 FloatRect(const BlackBerry::Platform::FloatRect&); | |
187 operator BlackBerry::Platform::FloatRect() const; | |
188 #endif | |
189 | |
190 #if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM) | 171 #if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM) |
191 FloatRect(const CGRect&); | 172 FloatRect(const CGRect&); |
192 operator CGRect() const; | 173 operator CGRect() const; |
193 #endif | 174 #endif |
194 | 175 |
195 #if (PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))) \ | 176 #if (PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))) \ |
196 && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) | 177 && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) |
197 FloatRect(const NSRect&); | 178 FloatRect(const NSRect&); |
198 operator NSRect() const; | 179 operator NSRect() const; |
199 #endif | 180 #endif |
200 | 181 |
201 #if PLATFORM(QT) | |
202 FloatRect(const QRectF&); | |
203 operator QRectF() const; | |
204 FloatRect normalized() const; | |
205 #endif | |
206 | |
207 #if USE(SKIA) | 182 #if USE(SKIA) |
208 FloatRect(const SkRect&); | 183 FloatRect(const SkRect&); |
209 operator SkRect() const; | 184 operator SkRect() const; |
210 #endif | 185 #endif |
211 | 186 |
212 #if PLATFORM(OPENVG) | 187 #if PLATFORM(OPENVG) |
213 operator VGRect() const; | 188 operator VGRect() const; |
214 #endif | 189 #endif |
215 | 190 |
216 private: | 191 private: |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 IntRect enclosedIntRect(const FloatRect&); | 247 IntRect enclosedIntRect(const FloatRect&); |
273 | 248 |
274 IntRect roundedIntRect(const FloatRect&); | 249 IntRect roundedIntRect(const FloatRect&); |
275 | 250 |
276 // Map rect r from srcRect to an equivalent rect in destRect. | 251 // Map rect r from srcRect to an equivalent rect in destRect. |
277 FloatRect mapRect(const FloatRect& r, const FloatRect& srcRect, const FloatRect&
destRect); | 252 FloatRect mapRect(const FloatRect& r, const FloatRect& srcRect, const FloatRect&
destRect); |
278 | 253 |
279 } | 254 } |
280 | 255 |
281 #endif | 256 #endif |
OLD | NEW |