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 22 matching lines...) Expand all Loading... |
33 class FloatSize; | 33 class FloatSize; |
34 class Path; | 34 class Path; |
35 | 35 |
36 class SVGPathBuilder final : public SVGPathConsumer { | 36 class SVGPathBuilder final : public SVGPathConsumer { |
37 public: | 37 public: |
38 SVGPathBuilder(Path& path) | 38 SVGPathBuilder(Path& path) |
39 : m_path(path) | 39 : m_path(path) |
40 , m_lastCommand(PathSegUnknown) | 40 , m_lastCommand(PathSegUnknown) |
41 { } | 41 { } |
42 | 42 |
43 private: | |
44 void emitSegment(const PathSegmentData&) override; | 43 void emitSegment(const PathSegmentData&) override; |
45 | 44 |
| 45 private: |
46 void emitClose(); | 46 void emitClose(); |
47 void emitMoveTo(const FloatPoint&); | 47 void emitMoveTo(const FloatPoint&); |
48 void emitLineTo(const FloatPoint&); | 48 void emitLineTo(const FloatPoint&); |
49 void emitQuadTo(const FloatPoint&, const FloatPoint&); | 49 void emitQuadTo(const FloatPoint&, const FloatPoint&); |
50 void emitSmoothQuadTo(const FloatPoint&); | 50 void emitSmoothQuadTo(const FloatPoint&); |
51 void emitCubicTo(const FloatPoint&, const FloatPoint&, const FloatPoint&); | 51 void emitCubicTo(const FloatPoint&, const FloatPoint&, const FloatPoint&); |
52 void emitSmoothCubicTo(const FloatPoint&, const FloatPoint&); | 52 void emitSmoothCubicTo(const FloatPoint&, const FloatPoint&); |
53 void emitArcTo(const FloatPoint&, const FloatSize&, float, bool largeArc, bo
ol sweep); | 53 void emitArcTo(const FloatPoint&, const FloatSize&, float, bool largeArc, bo
ol sweep); |
54 | 54 |
55 FloatPoint smoothControl(bool isSmooth) const; | 55 FloatPoint smoothControl(bool isSmooth) const; |
56 | 56 |
57 Path& m_path; | 57 Path& m_path; |
58 | 58 |
59 SVGPathSegType m_lastCommand; | 59 SVGPathSegType m_lastCommand; |
60 FloatPoint m_subpathPoint; | 60 FloatPoint m_subpathPoint; |
61 FloatPoint m_currentPoint; | 61 FloatPoint m_currentPoint; |
62 FloatPoint m_lastControlPoint; | 62 FloatPoint m_lastControlPoint; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace blink | 65 } // namespace blink |
66 | 66 |
67 #endif // SVGPathBuilder_h | 67 #endif // SVGPathBuilder_h |
OLD | NEW |