| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 return static_cast<SVGMatrix>(copy); | 104 return static_cast<SVGMatrix>(copy); |
| 105 } | 105 } |
| 106 | 106 |
| 107 SVGMatrix inverse(ExceptionCode& ec) const | 107 SVGMatrix inverse(ExceptionCode& ec) const |
| 108 { | 108 { |
| 109 AffineTransform transform = AffineTransform::inverse(); | 109 AffineTransform transform = AffineTransform::inverse(); |
| 110 if (!isInvertible()) { | 110 if (!isInvertible()) { |
| 111 // FIXME: This used to have a more specific error message: | 111 // FIXME: This used to have a more specific error message: |
| 112 // "An attempt was made to invert a matrix that is not invertible." | 112 // "An attempt was made to invert a matrix that is not invertible." |
| 113 // When switching to SVG2 style exceptions we lost this information. | 113 // When switching to SVG2 style exceptions we lost this information. |
| 114 ec = INVALID_STATE_ERR; | 114 ec = InvalidStateError; |
| 115 } | 115 } |
| 116 | 116 |
| 117 return transform; | 117 return transform; |
| 118 } | 118 } |
| 119 | 119 |
| 120 SVGMatrix rotateFromVector(double x, double y, ExceptionCode& ec) | 120 SVGMatrix rotateFromVector(double x, double y, ExceptionCode& ec) |
| 121 { | 121 { |
| 122 if (!x || !y) | 122 if (!x || !y) |
| 123 ec = INVALID_ACCESS_ERR; | 123 ec = InvalidAccessError; |
| 124 | 124 |
| 125 AffineTransform copy = *this; | 125 AffineTransform copy = *this; |
| 126 copy.rotateFromVector(x, y); | 126 copy.rotateFromVector(x, y); |
| 127 return static_cast<SVGMatrix>(copy); | 127 return static_cast<SVGMatrix>(copy); |
| 128 } | 128 } |
| 129 | 129 |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace WebCore | 132 } // namespace WebCore |
| 133 | 133 |
| 134 #endif | 134 #endif |
| OLD | NEW |