| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 } | 229 } |
| 230 | 230 |
| 231 inline IntSize flooredIntSize(const FloatPoint& p) { | 231 inline IntSize flooredIntSize(const FloatPoint& p) { |
| 232 return IntSize(clampTo<int>(floorf(p.x())), clampTo<int>(floorf(p.y()))); | 232 return IntSize(clampTo<int>(floorf(p.x())), clampTo<int>(floorf(p.y()))); |
| 233 } | 233 } |
| 234 | 234 |
| 235 inline FloatSize toFloatSize(const FloatPoint& a) { | 235 inline FloatSize toFloatSize(const FloatPoint& a) { |
| 236 return FloatSize(a.x(), a.y()); | 236 return FloatSize(a.x(), a.y()); |
| 237 } | 237 } |
| 238 | 238 |
| 239 // Find point where lines through the two pairs of points intersect. Returns fal
se if the lines don't intersect. | 239 // Find point where lines through the two pairs of points intersect. |
| 240 // Returns false if the lines don't intersect. |
| 240 PLATFORM_EXPORT bool findIntersection(const FloatPoint& p1, | 241 PLATFORM_EXPORT bool findIntersection(const FloatPoint& p1, |
| 241 const FloatPoint& p2, | 242 const FloatPoint& p2, |
| 242 const FloatPoint& d1, | 243 const FloatPoint& d1, |
| 243 const FloatPoint& d2, | 244 const FloatPoint& d2, |
| 244 FloatPoint& intersection); | 245 FloatPoint& intersection); |
| 245 | 246 |
| 246 // Redeclared here to avoid ODR issues. | 247 // Redeclared here to avoid ODR issues. |
| 247 // See platform/testing/GeometryPrinters.h. | 248 // See platform/testing/GeometryPrinters.h. |
| 248 void PrintTo(const FloatPoint&, std::ostream*); | 249 void PrintTo(const FloatPoint&, std::ostream*); |
| 249 | 250 |
| 250 } // namespace blink | 251 } // namespace blink |
| 251 | 252 |
| 252 #endif | 253 #endif |
| OLD | NEW |