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

Side by Side Diff: Source/core/svg/SVGPathBlender.h

Issue 1023993002: Rework the SVGPathSource interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blender fixups. 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/SVGParserUtilities.cpp ('k') | Source/core/svg/SVGPathBlender.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) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. 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 12 matching lines...) Expand all
23 #include "core/svg/SVGPathConsumer.h" 23 #include "core/svg/SVGPathConsumer.h"
24 #include "platform/heap/Handle.h" 24 #include "platform/heap/Handle.h"
25 25
26 namespace blink { 26 namespace blink {
27 27
28 enum FloatBlendMode { 28 enum FloatBlendMode {
29 BlendHorizontal, 29 BlendHorizontal,
30 BlendVertical 30 BlendVertical
31 }; 31 };
32 32
33 struct PathSegmentData;
33 class SVGPathSource; 34 class SVGPathSource;
34 35
35 class SVGPathBlender : public NoBaseWillBeGarbageCollectedFinalized<SVGPathBlend er> { 36 class SVGPathBlender : public NoBaseWillBeGarbageCollectedFinalized<SVGPathBlend er> {
36 WTF_MAKE_NONCOPYABLE(SVGPathBlender); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVE D; 37 WTF_MAKE_NONCOPYABLE(SVGPathBlender); WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVE D;
37 public: 38 public:
38 SVGPathBlender(SVGPathSource* fromSource, SVGPathSource* toSource, SVGPathCo nsumer*); 39 SVGPathBlender(SVGPathSource* fromSource, SVGPathSource* toSource, SVGPathCo nsumer*);
39 40
40 bool addAnimatedPath(unsigned repeatCount); 41 bool addAnimatedPath(unsigned repeatCount);
41 bool blendAnimatedPath(float); 42 bool blendAnimatedPath(float);
42 43
43 DECLARE_TRACE(); 44 DECLARE_TRACE();
44 45
45 private: 46 private:
46 bool blendMoveToSegment(); 47 void blendMoveToSegment(const PathSegmentData& fromSeg, const PathSegmentDat a& toSeg);
47 bool blendLineToSegment(); 48 void blendLineToSegment(const PathSegmentData& fromSeg, const PathSegmentDat a& toSeg);
48 bool blendLineToHorizontalSegment(); 49 void blendLineToHorizontalSegment(const PathSegmentData& fromSeg, const Path SegmentData& toSeg);
49 bool blendLineToVerticalSegment(); 50 void blendLineToVerticalSegment(const PathSegmentData& fromSeg, const PathSe gmentData& toSeg);
50 bool blendCurveToCubicSegment(); 51 void blendCurveToCubicSegment(const PathSegmentData& fromSeg, const PathSegm entData& toSeg);
51 bool blendCurveToCubicSmoothSegment(); 52 void blendCurveToCubicSmoothSegment(const PathSegmentData& fromSeg, const Pa thSegmentData& toSeg);
52 bool blendCurveToQuadraticSegment(); 53 void blendCurveToQuadraticSegment(const PathSegmentData& fromSeg, const Path SegmentData& toSeg);
53 bool blendCurveToQuadraticSmoothSegment(); 54 void blendCurveToQuadraticSmoothSegment(const PathSegmentData& fromSeg, cons t PathSegmentData& toSeg);
54 bool blendArcToSegment(); 55 void blendArcToSegment(const PathSegmentData& fromSeg, const PathSegmentData & toSeg);
55 56
56 float blendAnimatedDimensonalFloat(float, float, FloatBlendMode); 57 float blendAnimatedDimensonalFloat(float, float, FloatBlendMode);
57 FloatPoint blendAnimatedFloatPoint(const FloatPoint& from, const FloatPoint& to); 58 FloatPoint blendAnimatedFloatPoint(const FloatPoint& from, const FloatPoint& to);
58 FloatPoint blendAnimatedFloatPointSameCoordinates(const FloatPoint& from, co nst FloatPoint& to); 59 FloatPoint blendAnimatedFloatPointSameCoordinates(const FloatPoint& from, co nst FloatPoint& to);
59 60
60 RawPtrWillBeMember<SVGPathSource> m_fromSource; 61 RawPtrWillBeMember<SVGPathSource> m_fromSource;
61 RawPtrWillBeMember<SVGPathSource> m_toSource; 62 RawPtrWillBeMember<SVGPathSource> m_toSource;
62 RawPtrWillBeMember<SVGPathConsumer> m_consumer; 63 RawPtrWillBeMember<SVGPathConsumer> m_consumer;
63 64
64 FloatPoint m_fromCurrentPoint; 65 FloatPoint m_fromCurrentPoint;
65 FloatPoint m_toCurrentPoint; 66 FloatPoint m_toCurrentPoint;
66 67
67 PathCoordinateMode m_fromMode; 68 PathCoordinateMode m_fromMode;
68 PathCoordinateMode m_toMode; 69 PathCoordinateMode m_toMode;
69 float m_progress; 70 float m_progress;
70 unsigned m_addTypesCount; 71 unsigned m_addTypesCount;
71 bool m_isInFirstHalfOfAnimation; 72 bool m_isInFirstHalfOfAnimation;
72 }; 73 };
73 74
74 } // namespace blink 75 } // namespace blink
75 76
76 #endif // SVGPathBlender_h 77 #endif // SVGPathBlender_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGParserUtilities.cpp ('k') | Source/core/svg/SVGPathBlender.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698