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

Side by Side Diff: Source/core/svg/SVGPathBlender.cpp

Issue 1016023002: Move 'closePath' handling to the consumers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: closePath() Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/svg/SVGPathBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010, 2011. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010, 2011. 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 115
116 bool SVGPathBlender::blendMoveToSegment() 116 bool SVGPathBlender::blendMoveToSegment()
117 { 117 {
118 FloatPoint fromTargetPoint; 118 FloatPoint fromTargetPoint;
119 FloatPoint toTargetPoint; 119 FloatPoint toTargetPoint;
120 if ((m_fromSource->hasMoreData() && !m_fromSource->parseMoveToSegment(fromTa rgetPoint)) 120 if ((m_fromSource->hasMoreData() && !m_fromSource->parseMoveToSegment(fromTa rgetPoint))
121 || !m_toSource->parseMoveToSegment(toTargetPoint)) 121 || !m_toSource->parseMoveToSegment(toTargetPoint))
122 return false; 122 return false;
123 123
124 m_consumer->moveTo(blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint), false, m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode); 124 m_consumer->moveTo(blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint), m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
125 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m _fromCurrentPoint + fromTargetPoint; 125 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m _fromCurrentPoint + fromTargetPoint;
126 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCur rentPoint + toTargetPoint; 126 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCur rentPoint + toTargetPoint;
127 return true; 127 return true;
128 } 128 }
129 129
130 bool SVGPathBlender::blendLineToSegment() 130 bool SVGPathBlender::blendLineToSegment()
131 { 131 {
132 FloatPoint fromTargetPoint; 132 FloatPoint fromTargetPoint;
133 FloatPoint toTargetPoint; 133 FloatPoint toTargetPoint;
134 if ((m_fromSource->hasMoreData() && !m_fromSource->parseLineToSegment(fromTa rgetPoint)) 134 if ((m_fromSource->hasMoreData() && !m_fromSource->parseLineToSegment(fromTa rgetPoint))
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (m_fromSource->hasMoreData() != m_toSource->hasMoreData()) 393 if (m_fromSource->hasMoreData() != m_toSource->hasMoreData())
394 return false; 394 return false;
395 if (!m_fromSource->hasMoreData() || !m_toSource->hasMoreData()) 395 if (!m_fromSource->hasMoreData() || !m_toSource->hasMoreData())
396 return true; 396 return true;
397 } 397 }
398 398
399 return true; 399 return true;
400 } 400 }
401 401
402 } 402 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGPathBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698