2
* Copyright (C) Research In Motion Limited 2010. All rights reserved.
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Library General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Library General Public License for more details.
14
* You should have received a copy of the GNU Library General Public License
15
* along with this library; see the file COPYING.LIB. If not, write to
16
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
* Boston, MA 02110-1301, USA.
20
#ifndef SVGPathBlender_h
21
#define SVGPathBlender_h
24
#include "SVGPathConsumer.h"
25
#include "SVGPathSource.h"
34
class SVGPathBlender {
35
WTF_MAKE_NONCOPYABLE(SVGPathBlender); WTF_MAKE_FAST_ALLOCATED;
39
bool addAnimatedPath(SVGPathSource*, SVGPathSource*, SVGPathConsumer*, unsigned repeatCount);
40
bool blendAnimatedPath(float, SVGPathSource*, SVGPathSource*, SVGPathConsumer*);
44
bool blendMoveToSegment();
45
bool blendLineToSegment();
46
bool blendLineToHorizontalSegment();
47
bool blendLineToVerticalSegment();
48
bool blendCurveToCubicSegment();
49
bool blendCurveToCubicSmoothSegment();
50
bool blendCurveToQuadraticSegment();
51
bool blendCurveToQuadraticSmoothSegment();
52
bool blendArcToSegment();
54
float blendAnimatedDimensonalFloat(float, float, FloatBlendMode);
55
FloatPoint blendAnimatedFloatPoint(const FloatPoint& from, const FloatPoint& to);
57
SVGPathSource* m_fromSource;
58
SVGPathSource* m_toSource;
59
SVGPathConsumer* m_consumer;
61
FloatPoint m_fromCurrentPoint;
62
FloatPoint m_toCurrentPoint;
64
PathCoordinateMode m_fromMode;
65
PathCoordinateMode m_toMode;
67
unsigned m_addTypesCount;
68
bool m_isInFirstHalfOfAnimation;
71
} // namespace WebCore
74
#endif // SVGPathBlender_h