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 14 matching lines...) Expand all Loading... |
25 */ | 25 */ |
26 | 26 |
27 #ifndef FloatPoint_h | 27 #ifndef FloatPoint_h |
28 #define FloatPoint_h | 28 #define FloatPoint_h |
29 | 29 |
30 #include "platform/geometry/FloatSize.h" | 30 #include "platform/geometry/FloatSize.h" |
31 #include "platform/geometry/IntPoint.h" | 31 #include "platform/geometry/IntPoint.h" |
32 #include "third_party/skia/include/core/SkPoint.h" | 32 #include "third_party/skia/include/core/SkPoint.h" |
33 #include "wtf/MathExtras.h" | 33 #include "wtf/MathExtras.h" |
34 #include <algorithm> | 34 #include <algorithm> |
| 35 #include <iosfwd> |
35 | 36 |
36 #if OS(MACOSX) | 37 #if OS(MACOSX) |
37 typedef struct CGPoint CGPoint; | 38 typedef struct CGPoint CGPoint; |
38 | 39 |
39 #ifdef __OBJC__ | 40 #ifdef __OBJC__ |
40 #import <Foundation/Foundation.h> | 41 #import <Foundation/Foundation.h> |
41 #endif | 42 #endif |
42 #endif | 43 #endif |
43 | 44 |
44 namespace blink { | 45 namespace blink { |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 264 } |
264 | 265 |
265 inline FloatSize toFloatSize(const FloatPoint& a) | 266 inline FloatSize toFloatSize(const FloatPoint& a) |
266 { | 267 { |
267 return FloatSize(a.x(), a.y()); | 268 return FloatSize(a.x(), a.y()); |
268 } | 269 } |
269 | 270 |
270 // Find point where lines through the two pairs of points intersect. Returns fal
se if the lines don't intersect. | 271 // Find point where lines through the two pairs of points intersect. Returns fal
se if the lines don't intersect. |
271 PLATFORM_EXPORT bool findIntersection(const FloatPoint& p1, const FloatPoint& p2
, const FloatPoint& d1, const FloatPoint& d2, FloatPoint& intersection); | 272 PLATFORM_EXPORT bool findIntersection(const FloatPoint& p1, const FloatPoint& p2
, const FloatPoint& d1, const FloatPoint& d2, FloatPoint& intersection); |
272 | 273 |
| 274 // Redeclared here to avoid ODR issues. |
| 275 // See platform/testing/GeometryPrinters.h. |
| 276 void PrintTo(const FloatPoint&, std::ostream*); |
| 277 |
273 } | 278 } |
274 | 279 |
275 #endif | 280 #endif |
OLD | NEW |