| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 DEFINE_SETTER(A); | 91 DEFINE_SETTER(A); |
| 92 DEFINE_SETTER(B); | 92 DEFINE_SETTER(B); |
| 93 DEFINE_SETTER(C); | 93 DEFINE_SETTER(C); |
| 94 DEFINE_SETTER(D); | 94 DEFINE_SETTER(D); |
| 95 DEFINE_SETTER(E); | 95 DEFINE_SETTER(E); |
| 96 DEFINE_SETTER(F); | 96 DEFINE_SETTER(F); |
| 97 | 97 |
| 98 #undef DEFINE_SETTER | 98 #undef DEFINE_SETTER |
| 99 | 99 |
| 100 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::translate(double tx,
double ty) | 100 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::translate(double tx, double ty) |
| 101 { | 101 { |
| 102 RefPtrWillBeRawPtr<SVGMatrixTearOff> matrix = create(value()); | 102 RawPtr<SVGMatrixTearOff> matrix = create(value()); |
| 103 matrix->mutableValue()->translate(tx, ty); | 103 matrix->mutableValue()->translate(tx, ty); |
| 104 return matrix.release(); | 104 return matrix.release(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::scale(double s) | 107 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::scale(double s) |
| 108 { | 108 { |
| 109 RefPtrWillBeRawPtr<SVGMatrixTearOff> matrix = create(value()); | 109 RawPtr<SVGMatrixTearOff> matrix = create(value()); |
| 110 matrix->mutableValue()->scale(s, s); | 110 matrix->mutableValue()->scale(s, s); |
| 111 return matrix.release(); | 111 return matrix.release(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::scaleNonUniform(doubl
e sx, double sy) | 114 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::scaleNonUniform(double sx, double sy) |
| 115 { | 115 { |
| 116 RefPtrWillBeRawPtr<SVGMatrixTearOff> matrix = create(value()); | 116 RawPtr<SVGMatrixTearOff> matrix = create(value()); |
| 117 matrix->mutableValue()->scale(sx, sy); | 117 matrix->mutableValue()->scale(sx, sy); |
| 118 return matrix.release(); | 118 return matrix.release(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::rotate(double d) | 121 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::rotate(double d) |
| 122 { | 122 { |
| 123 RefPtrWillBeRawPtr<SVGMatrixTearOff> matrix = create(value()); | 123 RawPtr<SVGMatrixTearOff> matrix = create(value()); |
| 124 matrix->mutableValue()->rotate(d); | 124 matrix->mutableValue()->rotate(d); |
| 125 return matrix.release(); | 125 return matrix.release(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::flipX() | 128 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::flipX() |
| 129 { | 129 { |
| 130 RefPtrWillBeRawPtr<SVGMatrixTearOff> matrix = create(value()); | 130 RawPtr<SVGMatrixTearOff> matrix = create(value()); |
| 131 matrix->mutableValue()->flipX(); | 131 matrix->mutableValue()->flipX(); |
| 132 return matrix.release(); | 132 return matrix.release(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::flipY() | 135 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::flipY() |
| 136 { | 136 { |
| 137 RefPtrWillBeRawPtr<SVGMatrixTearOff> matrix = create(value()); | 137 RawPtr<SVGMatrixTearOff> matrix = create(value()); |
| 138 matrix->mutableValue()->flipY(); | 138 matrix->mutableValue()->flipY(); |
| 139 return matrix.release(); | 139 return matrix.release(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::skewX(double angle) | 142 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::skewX(double angle) |
| 143 { | 143 { |
| 144 RefPtrWillBeRawPtr<SVGMatrixTearOff> matrix = create(value()); | 144 RawPtr<SVGMatrixTearOff> matrix = create(value()); |
| 145 matrix->mutableValue()->skewX(angle); | 145 matrix->mutableValue()->skewX(angle); |
| 146 return matrix.release(); | 146 return matrix.release(); |
| 147 } | 147 } |
| 148 | 148 |
| 149 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::skewY(double angle) | 149 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::skewY(double angle) |
| 150 { | 150 { |
| 151 RefPtrWillBeRawPtr<SVGMatrixTearOff> matrix = create(value()); | 151 RawPtr<SVGMatrixTearOff> matrix = create(value()); |
| 152 matrix->mutableValue()->skewY(angle); | 152 matrix->mutableValue()->skewY(angle); |
| 153 return matrix.release(); | 153 return matrix.release(); |
| 154 } | 154 } |
| 155 | 155 |
| 156 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::multiply(PassRefPtrWi
llBeRawPtr<SVGMatrixTearOff> other) | 156 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::multiply(RawPtr<SVGMatrixTearOff> oth
er) |
| 157 { | 157 { |
| 158 RefPtrWillBeRawPtr<SVGMatrixTearOff> matrix = create(value()); | 158 RawPtr<SVGMatrixTearOff> matrix = create(value()); |
| 159 *matrix->mutableValue() *= other->value(); | 159 *matrix->mutableValue() *= other->value(); |
| 160 return matrix.release(); | 160 return matrix.release(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::inverse(ExceptionStat
e& exceptionState) | 163 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::inverse(ExceptionState& exceptionStat
e) |
| 164 { | 164 { |
| 165 AffineTransform transform = value().inverse(); | 165 AffineTransform transform = value().inverse(); |
| 166 if (!value().isInvertible()) | 166 if (!value().isInvertible()) |
| 167 exceptionState.throwDOMException(InvalidStateError, "The matrix is not i
nvertible."); | 167 exceptionState.throwDOMException(InvalidStateError, "The matrix is not i
nvertible."); |
| 168 | 168 |
| 169 return create(transform); | 169 return create(transform); |
| 170 } | 170 } |
| 171 | 171 |
| 172 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> SVGMatrixTearOff::rotateFromVector(doub
le x, double y, ExceptionState& exceptionState) | 172 RawPtr<SVGMatrixTearOff> SVGMatrixTearOff::rotateFromVector(double x, double y,
ExceptionState& exceptionState) |
| 173 { | 173 { |
| 174 if (!x || !y) | 174 if (!x || !y) |
| 175 exceptionState.throwDOMException(InvalidAccessError, "Arguments cannot b
e zero."); | 175 exceptionState.throwDOMException(InvalidAccessError, "Arguments cannot b
e zero."); |
| 176 | 176 |
| 177 AffineTransform copy = value(); | 177 AffineTransform copy = value(); |
| 178 copy.rotateFromVector(x, y); | 178 copy.rotateFromVector(x, y); |
| 179 return create(copy); | 179 return create(copy); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace blink | 182 } // namespace blink |
| OLD | NEW |