summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/canvas/DOMPath.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/canvas/DOMPath.h')
-rw-r--r--Source/WebCore/html/canvas/DOMPath.h34
1 files changed, 16 insertions, 18 deletions
diff --git a/Source/WebCore/html/canvas/DOMPath.h b/Source/WebCore/html/canvas/DOMPath.h
index 64aa46c30..6358e4602 100644
--- a/Source/WebCore/html/canvas/DOMPath.h
+++ b/Source/WebCore/html/canvas/DOMPath.h
@@ -28,37 +28,32 @@
#ifndef DOMPath_h
#define DOMPath_h
+#if ENABLE(CANVAS_PATH)
+
#include "CanvasPathMethods.h"
-#include "SVGMatrix.h"
-#include "SVGPathUtilities.h"
+#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
+#if ENABLE(SVG)
+#include "SVGPathUtilities.h"
+#endif
+
namespace WebCore {
-class WEBCORE_EXPORT DOMPath final : public RefCounted<DOMPath>, public CanvasPathMethods {
+class DOMPath : public RefCounted<DOMPath>, public CanvasPathMethods {
WTF_MAKE_FAST_ALLOCATED;
public:
- virtual ~DOMPath();
-
- static Ref<DOMPath> create() { return adoptRef(*new DOMPath); }
- static Ref<DOMPath> create(const Path& path) { return adoptRef(*new DOMPath(path)); }
- static Ref<DOMPath> create(const DOMPath* path) { return create(path->path()); }
+ static PassRefPtr<DOMPath> create() { return adoptRef(new DOMPath); }
+ static PassRefPtr<DOMPath> create(const Path& path) { return adoptRef(new DOMPath(path)); }
+ static PassRefPtr<DOMPath> create(const DOMPath* path) { return create(path->path()); }
- static Ref<DOMPath> create(const String& pathData)
+#if ENABLE(SVG)
+ static PassRefPtr<DOMPath> create(const String& pathData)
{
Path path;
buildPathFromString(pathData, path);
return create(path);
}
-
-#if ENABLE(CANVAS_PATH)
- void addPath(const DOMPath* path) { addPath(path, AffineTransform()); }
- void addPath(const DOMPath* path, const AffineTransform& transform)
- {
- if (!path || !transform.isInvertible())
- return;
- m_path.addPath(path->path(), transform);
- }
#endif
const Path& path() const { return m_path; }
@@ -69,4 +64,7 @@ private:
};
}
+
+#endif
+
#endif