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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGPathParser.h

Issue 1472853005: Expose the SVG path normalizer in SVGPathParser.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use regular raw ptr. Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGPathParser.cpp » ('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) 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 private: 64 private:
65 bool initialCommandIsMoveTo(); 65 bool initialCommandIsMoveTo();
66 bool parsePath(); 66 bool parsePath();
67 bool parseAndNormalizePath(); 67 bool parseAndNormalizePath();
68 68
69 SVGPathSource* m_source; 69 SVGPathSource* m_source;
70 SVGPathConsumer* m_consumer; 70 SVGPathConsumer* m_consumer;
71 }; 71 };
72 72
73 class SVGPathNormalizer {
74 STACK_ALLOCATED();
75 public:
76 SVGPathNormalizer(SVGPathConsumer* consumer)
77 : m_consumer(consumer)
78 , m_lastCommand(PathSegUnknown)
79 {
80 ASSERT(m_consumer);
81 }
82
83 void emitSegment(const PathSegmentData&);
84
85 private:
86 bool decomposeArcToCubic(const FloatPoint& currentPoint, const PathSegmentDa ta&);
87
88 SVGPathConsumer* m_consumer;
89 FloatPoint m_controlPoint;
90 FloatPoint m_currentPoint;
91 FloatPoint m_subPathPoint;
92 SVGPathSegType m_lastCommand;
93 };
94
73 } // namespace blink 95 } // namespace blink
74 96
75 #endif // SVGPathParser_h 97 #endif // SVGPathParser_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGPathParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698