| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 namespace WebCore { | 34 namespace WebCore { |
| 35 | 35 |
| 36 FloatPoint::FloatPoint(const IntPoint& p) : m_x(p.x()), m_y(p.y()) | 36 FloatPoint::FloatPoint(const IntPoint& p) : m_x(p.x()), m_y(p.y()) |
| 37 { | 37 { |
| 38 } | 38 } |
| 39 | 39 |
| 40 FloatPoint FloatPoint::matrixTransform(const TransformationMatrix& transform) co
nst | 40 FloatPoint FloatPoint::matrixTransform(const TransformationMatrix& transform) co
nst |
| 41 { | 41 { |
| 42 double newX, newY; | 42 double newX, newY; |
| 43 transform.map(static_cast<double>(m_x), static_cast<double>(m_y), &newX, &ne
wY); | 43 transform.map(static_cast<double>(m_x), static_cast<double>(m_y), newX, newY
); |
| 44 return narrowPrecision(newX, newY); | 44 return narrowPrecision(newX, newY); |
| 45 } | 45 } |
| 46 | 46 |
| 47 FloatPoint FloatPoint::narrowPrecision(double x, double y) | 47 FloatPoint FloatPoint::narrowPrecision(double x, double y) |
| 48 { | 48 { |
| 49 return FloatPoint(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y)); | 49 return FloatPoint(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 } | 52 } |
| OLD | NEW |