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

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

Issue 2390773004: reflow comments in core/svg/ (Closed)
Patch Set: comments (heh!) Created 4 years, 2 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) 2002, 2003 The Karbon Developers 2 * Copyright (C) 2002, 2003 The Karbon Developers
3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
4 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org> 4 * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org>
5 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. 5 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 12 matching lines...) Expand all
23 23
24 #include "core/svg/SVGPathBuilder.h" 24 #include "core/svg/SVGPathBuilder.h"
25 25
26 #include "platform/graphics/Path.h" 26 #include "platform/graphics/Path.h"
27 27
28 namespace blink { 28 namespace blink {
29 29
30 FloatPoint SVGPathBuilder::smoothControl(bool isCompatibleSegment) const { 30 FloatPoint SVGPathBuilder::smoothControl(bool isCompatibleSegment) const {
31 // The control point is assumed to be the reflection of the control point on 31 // The control point is assumed to be the reflection of the control point on
32 // the previous command relative to the current point. If there is no previous 32 // the previous command relative to the current point. If there is no previous
33 // command or if the previous command was not a [quad/cubic], assume the contr ol 33 // command or if the previous command was not a [quad/cubic], assume the
34 // point is coincident with the current point. 34 // control point is coincident with the current point.
35 // [https://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands] 35 // [https://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands]
36 // [https://www.w3.org/TR/SVG/paths.html#PathDataQuadraticBezierCommands] 36 // [https://www.w3.org/TR/SVG/paths.html#PathDataQuadraticBezierCommands]
37 FloatPoint controlPoint = m_currentPoint; 37 FloatPoint controlPoint = m_currentPoint;
38 if (isCompatibleSegment) 38 if (isCompatibleSegment)
39 controlPoint += m_currentPoint - m_lastControlPoint; 39 controlPoint += m_currentPoint - m_lastControlPoint;
40 40
41 return controlPoint; 41 return controlPoint;
42 } 42 }
43 43
44 void SVGPathBuilder::emitClose() { 44 void SVGPathBuilder::emitClose() {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 segment.largeArcFlag(), segment.sweepFlag()); 172 segment.largeArcFlag(), segment.sweepFlag());
173 break; 173 break;
174 default: 174 default:
175 ASSERT_NOT_REACHED(); 175 ASSERT_NOT_REACHED();
176 } 176 }
177 177
178 m_lastCommand = segment.command; 178 m_lastCommand = segment.command;
179 } 179 }
180 180
181 } // namespace blink 181 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathBlender.cpp ('k') | third_party/WebKit/Source/core/svg/SVGPathData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698