From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/svg/SVGPathUtilities.h | 44 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'Source/WebCore/svg/SVGPathUtilities.h') 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 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, SVGPathByteStream*, PathParsingMode); -bool buildSVGPathByteStreamFromString(const String&, SVGPathByteStream*, PathParsingMode); +// SVGPathSegListValues/String -> SVGPathByteStream +bool buildSVGPathByteStreamFromSVGPathSegListValues(const SVGPathSegListValues&, SVGPathByteStream& result, PathParsingMode); +bool appendSVGPathByteStreamFromSVGPathSeg(RefPtr&&, 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 -- cgit v1.2.1