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

Side by Side Diff: Source/core/svg/SVGPathStringBuilder.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 | « Source/core/svg/SVGPathStringBuilder.h ('k') | Source/core/svg/SVGPathTraversalStateBuilder.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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 static void emitCommand2Arg(StringBuilder& stringBuilder, char commandChar, cons t FloatPoint& argument1Point, const FloatPoint& argument2Point) 70 static void emitCommand2Arg(StringBuilder& stringBuilder, char commandChar, cons t FloatPoint& argument1Point, const FloatPoint& argument2Point)
71 { 71 {
72 stringBuilder.append(commandChar); 72 stringBuilder.append(commandChar);
73 appendPoint(stringBuilder, argument1Point); 73 appendPoint(stringBuilder, argument1Point);
74 appendPoint(stringBuilder, argument2Point); 74 appendPoint(stringBuilder, argument2Point);
75 stringBuilder.append(' '); 75 stringBuilder.append(' ');
76 } 76 }
77 77
78 void SVGPathStringBuilder::moveTo(const FloatPoint& targetPoint, bool, PathCoord inateMode mode) 78 void SVGPathStringBuilder::moveTo(const FloatPoint& targetPoint, PathCoordinateM ode mode)
79 { 79 {
80 emitCommand1Arg(m_stringBuilder, (mode == AbsoluteCoordinates) ? 'M' : 'm', targetPoint); 80 emitCommand1Arg(m_stringBuilder, (mode == AbsoluteCoordinates) ? 'M' : 'm', targetPoint);
81 } 81 }
82 82
83 void SVGPathStringBuilder::lineTo(const FloatPoint& targetPoint, PathCoordinateM ode mode) 83 void SVGPathStringBuilder::lineTo(const FloatPoint& targetPoint, PathCoordinateM ode mode)
84 { 84 {
85 emitCommand1Arg(m_stringBuilder, (mode == AbsoluteCoordinates) ? 'L' : 'l', targetPoint); 85 emitCommand1Arg(m_stringBuilder, (mode == AbsoluteCoordinates) ? 'L' : 'l', targetPoint);
86 } 86 }
87 87
88 void SVGPathStringBuilder::lineToHorizontal(float x, PathCoordinateMode mode) 88 void SVGPathStringBuilder::lineToHorizontal(float x, PathCoordinateMode mode)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 appendPoint(m_stringBuilder, targetPoint); 130 appendPoint(m_stringBuilder, targetPoint);
131 m_stringBuilder.append(' '); 131 m_stringBuilder.append(' ');
132 } 132 }
133 133
134 void SVGPathStringBuilder::closePath() 134 void SVGPathStringBuilder::closePath()
135 { 135 {
136 m_stringBuilder.appendLiteral("Z "); 136 m_stringBuilder.appendLiteral("Z ");
137 } 137 }
138 138
139 } // namespace blink 139 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPathStringBuilder.h ('k') | Source/core/svg/SVGPathTraversalStateBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698