Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGTransform.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 arguments[argumentCount++] = m_matrix.a(); 172 arguments[argumentCount++] = m_matrix.a();
173 arguments[argumentCount++] = m_matrix.d(); 173 arguments[argumentCount++] = m_matrix.d();
174 break; 174 break;
175 } 175 }
176 case kSvgTransformRotate: { 176 case kSvgTransformRotate: {
177 arguments[argumentCount++] = m_angle; 177 arguments[argumentCount++] = m_angle;
178 178
179 double angleInRad = deg2rad(m_angle); 179 double angleInRad = deg2rad(m_angle);
180 double cosAngle = cos(angleInRad); 180 double cosAngle = cos(angleInRad);
181 double sinAngle = sin(angleInRad); 181 double sinAngle = sin(angleInRad);
182 float cx = clampTo<float>( 182 float cx = clampTo<float>(cosAngle != 1 ? (m_matrix.e() * (1 - cosAngle) -
183 cosAngle != 1 183 m_matrix.f() * sinAngle) /
184 ? (m_matrix.e() * (1 - cosAngle) - m_matrix.f() * sinAngle) / 184 (1 - cosAngle) / 2
185 (1 - cosAngle) / 2 185 : 0);
186 : 0);
187 float cy = clampTo<float>( 186 float cy = clampTo<float>(
188 cosAngle != 1 187 cosAngle != 1
189 ? (m_matrix.e() * sinAngle / (1 - cosAngle) + m_matrix.f()) / 2 188 ? (m_matrix.e() * sinAngle / (1 - cosAngle) + m_matrix.f()) / 2
190 : 0); 189 : 0);
191 if (cx || cy) { 190 if (cx || cy) {
192 arguments[argumentCount++] = cx; 191 arguments[argumentCount++] = cx;
193 arguments[argumentCount++] = cy; 192 arguments[argumentCount++] = cy;
194 } 193 }
195 break; 194 break;
196 } 195 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 231 }
233 232
234 float SVGTransform::calculateDistance(SVGPropertyBase*, SVGElement*) { 233 float SVGTransform::calculateDistance(SVGPropertyBase*, SVGElement*) {
235 // SVGTransform is not animated by itself. 234 // SVGTransform is not animated by itself.
236 ASSERT_NOT_REACHED(); 235 ASSERT_NOT_REACHED();
237 236
238 return -1; 237 return -1;
239 } 238 }
240 239
241 } // namespace blink 240 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698