OLD | NEW |
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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 m_pathParsingMode = pathParsingMode; | 289 m_pathParsingMode = pathParsingMode; |
290 | 290 |
291 m_controlPoint = FloatPoint(); | 291 m_controlPoint = FloatPoint(); |
292 m_currentPoint = FloatPoint(); | 292 m_currentPoint = FloatPoint(); |
293 m_subPathPoint = FloatPoint(); | 293 m_subPathPoint = FloatPoint(); |
294 m_closePath = true; | 294 m_closePath = true; |
295 | 295 |
296 // Skip any leading spaces. | 296 // Skip any leading spaces. |
297 if (!m_source->moveToNextToken()) | 297 if (!m_source->moveToNextToken()) |
298 return false; | 298 return true; |
299 | 299 |
300 SVGPathSegType command; | 300 SVGPathSegType command; |
301 m_source->parseSVGSegmentType(command); | 301 m_source->parseSVGSegmentType(command); |
302 m_lastCommand = PathSegUnknown; | 302 m_lastCommand = PathSegUnknown; |
303 | 303 |
304 // Path must start with moveto. | 304 // Path must start with moveto. |
305 if (checkForInitialMoveTo && command != PathSegMoveToAbs && command != PathS
egMoveToRel) | 305 if (checkForInitialMoveTo && command != PathSegMoveToAbs && command != PathS
egMoveToRel) |
306 return false; | 306 return false; |
307 | 307 |
308 while (true) { | 308 while (true) { |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 point2 = targetPoint; | 486 point2 = targetPoint; |
487 point2.move(t * sinEndTheta, -t * cosEndTheta); | 487 point2.move(t * sinEndTheta, -t * cosEndTheta); |
488 | 488 |
489 m_consumer->curveToCubic(pointTransform.mapPoint(point1), pointTransform
.mapPoint(point2), | 489 m_consumer->curveToCubic(pointTransform.mapPoint(point1), pointTransform
.mapPoint(point2), |
490 pointTransform.mapPoint(targetPoint), AbsoluteC
oordinates); | 490 pointTransform.mapPoint(targetPoint), AbsoluteC
oordinates); |
491 } | 491 } |
492 return true; | 492 return true; |
493 } | 493 } |
494 | 494 |
495 } | 495 } |
OLD | NEW |