diff options
Diffstat (limited to 'Source/WebCore/svg/SVGPathUtilities.h')
-rw-r--r-- | Source/WebCore/svg/SVGPathUtilities.h | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/Source/WebCore/svg/SVGPathUtilities.h b/Source/WebCore/svg/SVGPathUtilities.h index 7157a98ae..79e7d729e 100644 --- a/Source/WebCore/svg/SVGPathUtilities.h +++ b/Source/WebCore/svg/SVGPathUtilities.h @@ -1,5 +1,6 @@ /* * Copyright (C) Research In Motion Limited 2010, 2012. All rights reserved. + * Copyright (C) 2015 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -17,46 +18,43 @@ * Boston, MA 02110-1301, USA. */ -#ifndef SVGPathUtilities_h -#define SVGPathUtilities_h +#pragma once -#if ENABLE(SVG) #include "SVGPathConsumer.h" -#include "SVGPoint.h" #include <wtf/text/WTFString.h> namespace WebCore { +class FloatPoint; class Path; class SVGPathByteStream; class SVGPathElement; class SVGPathSeg; -class SVGPathSegList; +class SVGPathSegListValues; // String/SVGPathByteStream -> Path bool buildPathFromString(const String&, Path&); -bool buildPathFromByteStream(SVGPathByteStream*, Path&); +bool buildPathFromByteStream(const SVGPathByteStream&, Path&); -// SVGPathSegList/String -> SVGPathByteStream -bool buildSVGPathByteStreamFromSVGPathSegList(const SVGPathSegList&, SVGPathByteStream*, PathParsingMode); -bool appendSVGPathByteStreamFromSVGPathSeg(PassRefPtr<SVGPathSeg>, SVGPathByteStream*, PathParsingMode); -bool buildSVGPathByteStreamFromString(const String&, SVGPathByteStream*, PathParsingMode); +// SVGPathSegListValues/String -> SVGPathByteStream +bool buildSVGPathByteStreamFromSVGPathSegListValues(const SVGPathSegListValues&, SVGPathByteStream& result, PathParsingMode); +bool appendSVGPathByteStreamFromSVGPathSeg(RefPtr<SVGPathSeg>&&, SVGPathByteStream&, PathParsingMode); +bool buildSVGPathByteStreamFromString(const String&, SVGPathByteStream&, PathParsingMode); -// SVGPathByteStream/SVGPathSegList -> String -bool buildStringFromByteStream(SVGPathByteStream*, String&, PathParsingMode); -bool buildStringFromSVGPathSegList(const SVGPathSegList&, String&, PathParsingMode); +// SVGPathByteStream/SVGPathSegListValues -> String +bool buildStringFromByteStream(const SVGPathByteStream&, String&, PathParsingMode); +bool buildStringFromSVGPathSegListValues(const SVGPathSegListValues&, String&, PathParsingMode); -// SVGPathByteStream -> SVGPathSegList -bool buildSVGPathSegListFromByteStream(SVGPathByteStream*, SVGPathElement*, SVGPathSegList&, PathParsingMode); +// SVGPathByteStream -> SVGPathSegListValues +bool buildSVGPathSegListValuesFromByteStream(const SVGPathByteStream&, SVGPathElement&, SVGPathSegListValues&, PathParsingMode); -bool buildAnimatedSVGPathByteStream(SVGPathByteStream*, SVGPathByteStream*, SVGPathByteStream*, float); -bool addToSVGPathByteStream(SVGPathByteStream*, SVGPathByteStream*, unsigned repeatCount = 1); +bool canBlendSVGPathByteStreams(const SVGPathByteStream& from, const SVGPathByteStream& to); -bool getSVGPathSegAtLengthFromSVGPathByteStream(SVGPathByteStream*, float length, unsigned& pathSeg); -bool getTotalLengthOfSVGPathByteStream(SVGPathByteStream*, float& totalLength); -bool getPointAtLengthOfSVGPathByteStream(SVGPathByteStream*, float length, SVGPoint&); +bool buildAnimatedSVGPathByteStream(const SVGPathByteStream& from, const SVGPathByteStream& to, SVGPathByteStream& result, float progress); +bool addToSVGPathByteStream(SVGPathByteStream& streamToAppendTo, const SVGPathByteStream& from, unsigned repeatCount = 1); -} // namespace WebCore +bool getSVGPathSegAtLengthFromSVGPathByteStream(const SVGPathByteStream&, float length, unsigned& pathSeg); +bool getTotalLengthOfSVGPathByteStream(const SVGPathByteStream&, float& totalLength); +bool getPointAtLengthOfSVGPathByteStream(const SVGPathByteStream&, float length, FloatPoint&); -#endif // ENABLE(SVG) -#endif // SVGPathUtilities_h +} // namespace WebCore |