| Index: Source/core/svg/SVGPathSeg.h
|
| diff --git a/Source/core/svg/SVGPathSeg.h b/Source/core/svg/SVGPathSeg.h
|
| index 8b1f65601cc306e4cd215b73b5f754988d2b1911..51c5e91b9014422a7e7c7c1cdc421ad96eb6f4b8 100644
|
| --- a/Source/core/svg/SVGPathSeg.h
|
| +++ b/Source/core/svg/SVGPathSeg.h
|
| @@ -22,6 +22,7 @@
|
| #define SVGPathSeg_h
|
|
|
| #include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "platform/geometry/FloatPoint.h"
|
| #include "platform/heap/Handle.h"
|
| #include "wtf/RefCounted.h"
|
| #include "wtf/text/WTFString.h"
|
| @@ -59,6 +60,37 @@ enum SVGPathSegType {
|
| PathSegCurveToQuadraticSmoothRel = 19
|
| };
|
|
|
| +static inline SVGPathSegType toAbsolutePathSegType(const SVGPathSegType type)
|
| +{
|
| + // Clear the LSB to get the absolute command.
|
| + return type >= PathSegMoveToAbs ? static_cast<SVGPathSegType>(type & ~1u) : type;
|
| +}
|
| +
|
| +static inline bool isAbsolutePathSegType(const SVGPathSegType type)
|
| +{
|
| + // For commands with an ordinal >= PathSegMoveToAbs, and odd number => relative command.
|
| + return type < PathSegMoveToAbs || type % 2 == 0;
|
| +}
|
| +
|
| +struct PathSegmentData {
|
| + PathSegmentData()
|
| + : command(PathSegUnknown)
|
| + , arcSweep(false)
|
| + , arcLarge(false)
|
| + {
|
| + }
|
| +
|
| + const FloatPoint& arcRadii() const { return point1; }
|
| + float arcAngle() const { return point2.x(); }
|
| +
|
| + SVGPathSegType command;
|
| + FloatPoint targetPoint;
|
| + FloatPoint point1;
|
| + FloatPoint point2;
|
| + bool arcSweep;
|
| + bool arcLarge;
|
| +};
|
| +
|
| class SVGPropertyBase;
|
| class SVGPathElement;
|
| class SVGElement;
|
|
|