OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |