| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 namespace Platform { | 57 namespace Platform { |
| 58 class FloatRect; | 58 class FloatRect; |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 #endif | 61 #endif |
| 62 | 62 |
| 63 #if USE(SKIA) | 63 #if USE(SKIA) |
| 64 struct SkRect; | 64 struct SkRect; |
| 65 #endif | 65 #endif |
| 66 | 66 |
| 67 #if USE(CAIRO) | |
| 68 typedef struct _cairo_rectangle cairo_rectangle_t; | |
| 69 #endif | |
| 70 | |
| 71 namespace WebCore { | 67 namespace WebCore { |
| 72 | 68 |
| 73 #if PLATFORM(OPENVG) | 69 #if PLATFORM(OPENVG) |
| 74 class VGRect; | 70 class VGRect; |
| 75 #endif | 71 #endif |
| 76 | 72 |
| 77 class LayoutRect; | 73 class LayoutRect; |
| 78 class IntRect; | 74 class IntRect; |
| 79 class IntPoint; | 75 class IntPoint; |
| 80 | 76 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 215 |
| 220 #if USE(SKIA) | 216 #if USE(SKIA) |
| 221 FloatRect(const SkRect&); | 217 FloatRect(const SkRect&); |
| 222 operator SkRect() const; | 218 operator SkRect() const; |
| 223 #endif | 219 #endif |
| 224 | 220 |
| 225 #if PLATFORM(OPENVG) | 221 #if PLATFORM(OPENVG) |
| 226 operator VGRect() const; | 222 operator VGRect() const; |
| 227 #endif | 223 #endif |
| 228 | 224 |
| 229 #if USE(CAIRO) | |
| 230 FloatRect(const cairo_rectangle_t&); | |
| 231 operator cairo_rectangle_t() const; | |
| 232 #endif | |
| 233 | |
| 234 private: | 225 private: |
| 235 FloatPoint m_location; | 226 FloatPoint m_location; |
| 236 FloatSize m_size; | 227 FloatSize m_size; |
| 237 | 228 |
| 238 void setLocationAndSizeFromEdges(float left, float top, float right, float b
ottom) | 229 void setLocationAndSizeFromEdges(float left, float top, float right, float b
ottom) |
| 239 { | 230 { |
| 240 m_location.set(left, top); | 231 m_location.set(left, top); |
| 241 m_size.setWidth(right - left); | 232 m_size.setWidth(right - left); |
| 242 m_size.setHeight(bottom - top); | 233 m_size.setHeight(bottom - top); |
| 243 } | 234 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 IntRect enclosedIntRect(const FloatRect&); | 281 IntRect enclosedIntRect(const FloatRect&); |
| 291 | 282 |
| 292 IntRect roundedIntRect(const FloatRect&); | 283 IntRect roundedIntRect(const FloatRect&); |
| 293 | 284 |
| 294 // Map rect r from srcRect to an equivalent rect in destRect. | 285 // Map rect r from srcRect to an equivalent rect in destRect. |
| 295 FloatRect mapRect(const FloatRect& r, const FloatRect& srcRect, const FloatRect&
destRect); | 286 FloatRect mapRect(const FloatRect& r, const FloatRect& srcRect, const FloatRect&
destRect); |
| 296 | 287 |
| 297 } | 288 } |
| 298 | 289 |
| 299 #endif | 290 #endif |
| OLD | NEW |