| 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 28 matching lines...) Expand all Loading... |
| 39 typedef struct CGPoint NSPoint; | 39 typedef struct CGPoint NSPoint; |
| 40 #else | 40 #else |
| 41 typedef struct _NSPoint NSPoint; | 41 typedef struct _NSPoint NSPoint; |
| 42 #endif | 42 #endif |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 struct SkPoint; | 45 struct SkPoint; |
| 46 | 46 |
| 47 namespace WebCore { | 47 namespace WebCore { |
| 48 | 48 |
| 49 class AffineTransform; | |
| 50 class TransformationMatrix; | |
| 51 class IntPoint; | 49 class IntPoint; |
| 52 class IntSize; | 50 class IntSize; |
| 53 class LayoutPoint; | 51 class LayoutPoint; |
| 54 class LayoutSize; | 52 class LayoutSize; |
| 55 | 53 |
| 56 class PLATFORM_EXPORT FloatPoint { | 54 class PLATFORM_EXPORT FloatPoint { |
| 57 public: | 55 public: |
| 58 FloatPoint() : m_x(0), m_y(0) { } | 56 FloatPoint() : m_x(0), m_y(0) { } |
| 59 FloatPoint(float x, float y) : m_x(x), m_y(y) { } | 57 FloatPoint(float x, float y) : m_x(x), m_y(y) { } |
| 60 FloatPoint(const IntPoint&); | 58 FloatPoint(const IntPoint&); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 FloatPoint(const CGPoint&); | 134 FloatPoint(const CGPoint&); |
| 137 operator CGPoint() const; | 135 operator CGPoint() const; |
| 138 #if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) | 136 #if !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) |
| 139 FloatPoint(const NSPoint&); | 137 FloatPoint(const NSPoint&); |
| 140 operator NSPoint() const; | 138 operator NSPoint() const; |
| 141 #endif | 139 #endif |
| 142 #endif | 140 #endif |
| 143 | 141 |
| 144 operator SkPoint() const; | 142 operator SkPoint() const; |
| 145 | 143 |
| 146 // FIXME: These are only used by SVGPoint and should probably move there. | |
| 147 // http://crbug.com/302829 | |
| 148 FloatPoint matrixTransform(const TransformationMatrix&) const; | |
| 149 FloatPoint matrixTransform(const AffineTransform&) const; | |
| 150 | |
| 151 private: | 144 private: |
| 152 float m_x, m_y; | 145 float m_x, m_y; |
| 153 }; | 146 }; |
| 154 | 147 |
| 155 | 148 |
| 156 inline FloatPoint& operator+=(FloatPoint& a, const FloatSize& b) | 149 inline FloatPoint& operator+=(FloatPoint& a, const FloatSize& b) |
| 157 { | 150 { |
| 158 a.move(b.width(), b.height()); | 151 a.move(b.width(), b.height()); |
| 159 return a; | 152 return a; |
| 160 } | 153 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 231 } |
| 239 | 232 |
| 240 PLATFORM_EXPORT float findSlope(const FloatPoint& p1, const FloatPoint& p2, floa
t& c); | 233 PLATFORM_EXPORT float findSlope(const FloatPoint& p1, const FloatPoint& p2, floa
t& c); |
| 241 | 234 |
| 242 // Find point where lines through the two pairs of points intersect. Returns fal
se if the lines don't intersect. | 235 // Find point where lines through the two pairs of points intersect. Returns fal
se if the lines don't intersect. |
| 243 PLATFORM_EXPORT bool findIntersection(const FloatPoint& p1, const FloatPoint& p2
, const FloatPoint& d1, const FloatPoint& d2, FloatPoint& intersection); | 236 PLATFORM_EXPORT bool findIntersection(const FloatPoint& p1, const FloatPoint& p2
, const FloatPoint& d1, const FloatPoint& d2, FloatPoint& intersection); |
| 244 | 237 |
| 245 } | 238 } |
| 246 | 239 |
| 247 #endif | 240 #endif |
| OLD | NEW |