+2006-09-19 Eric Seidel <eric@eseidel.com>
+
+ Reviewed by hyatt.
+
+ Split KCanvasResources.* into multiple files (and some other minor spacing changes).
+
+ No tests were harmed in the making of this patch.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * kcanvas/KCanvasClipper.cpp: Added.
+ (WebCore::operator<<):
+ * kcanvas/KCanvasClipper.h: Added.
+ * kcanvas/KCanvasFilters.h:
+ * kcanvas/KCanvasImage.h:
+ * kcanvas/KCanvasMarker.cpp: Added.
+ * kcanvas/KCanvasMarker.h: Added.
+ * kcanvas/KCanvasMasker.cpp: Added.
+ (WebCore::KCanvasMasker::KCanvasMasker):
+ (WebCore::KCanvasMasker::setMask):
+ (WebCore::KCanvasMasker::externalRepresentation):
+ (WebCore::getMaskerById):
+ * kcanvas/KCanvasMasker.h: Added.
+ * kcanvas/KCanvasResource.cpp: Added.
+ (WebCore::KCanvasResource::invalidate):
+ (WebCore::KCanvasResource::externalRepresentation):
+ (WebCore::getResourceById):
+ (WebCore::getPaintServerById):
+ * kcanvas/KCanvasResource.h: Added.
+ * kcanvas/KCanvasResources.cpp: Removed.
+ * kcanvas/KCanvasResources.h: Removed.
+ * kcanvas/RenderPath.cpp:
+ * kcanvas/RenderSVGContainer.cpp:
+ * kcanvas/RenderSVGImage.cpp:
+ * kcanvas/RenderSVGText.cpp:
+ * kcanvas/device/KRenderingPaintServer.h:
+ * kcanvas/device/quartz/KCanvasMaskerQuartz.h:
+ * kcanvas/device/quartz/KCanvasResourcesQuartz.h:
+ * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
+ * ksvg2/svg/SVGClipPathElement.h:
+ * ksvg2/svg/SVGFEColorMatrixElement.cpp:
+ * ksvg2/svg/SVGFEComponentTransferElement.cpp:
+ * ksvg2/svg/SVGFECompositeElement.cpp:
+ * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
+ * ksvg2/svg/SVGFELightElement.cpp:
+ * ksvg2/svg/SVGFEOffsetElement.cpp:
+ * ksvg2/svg/SVGFETurbulenceElement.cpp:
+ * ksvg2/svg/SVGFilterElement.cpp:
+ * ksvg2/svg/SVGLinearGradientElement.cpp:
+ * ksvg2/svg/SVGMarkerElement.h:
+ * ksvg2/svg/SVGMaskElement.h:
+
2006-09-19 Brady Eidson <beidson@apple.com>
Reviewed by Sarge Decker
A833C80C0A2CF25600D57664 /* XMLNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A833C80A0A2CF25600D57664 /* XMLNames.cpp */; };
A833C80D0A2CF25600D57664 /* XMLNames.h in Headers */ = {isa = PBXBuildFile; fileRef = A833C80B0A2CF25600D57664 /* XMLNames.h */; };
A833C8520A2CF52800D57664 /* SVGElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 656581E609D1508D000E61D7 /* SVGElementFactory.cpp */; };
+ A8415F9A0AC10C5D00F7D0DF /* KCanvasClipper.h in Headers */ = {isa = PBXBuildFile; fileRef = A8415F910AC10C5D00F7D0DF /* KCanvasClipper.h */; };
+ A8415F9B0AC10C5D00F7D0DF /* KCanvasClipper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8415F920AC10C5D00F7D0DF /* KCanvasClipper.cpp */; };
+ A8415F9C0AC10C5D00F7D0DF /* KCanvasResource.h in Headers */ = {isa = PBXBuildFile; fileRef = A8415F930AC10C5D00F7D0DF /* KCanvasResource.h */; };
+ A8415F9D0AC10C5D00F7D0DF /* KCanvasResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8415F940AC10C5D00F7D0DF /* KCanvasResource.cpp */; };
+ A8415F9E0AC10C5D00F7D0DF /* KCanvasMasker.h in Headers */ = {isa = PBXBuildFile; fileRef = A8415F950AC10C5D00F7D0DF /* KCanvasMasker.h */; };
+ A8415F9F0AC10C5D00F7D0DF /* KCanvasMasker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8415F960AC10C5D00F7D0DF /* KCanvasMasker.cpp */; };
+ A8415FA00AC10C5D00F7D0DF /* KCanvasMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = A8415F970AC10C5D00F7D0DF /* KCanvasMarker.h */; };
+ A8415FA10AC10C5D00F7D0DF /* KCanvasMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8415F980AC10C5D00F7D0DF /* KCanvasMarker.cpp */; };
+ A8415FA20AC10C5D00F7D0DF /* KCanvasFilters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8415F990AC10C5D00F7D0DF /* KCanvasFilters.cpp */; };
A86629CF09DA2B47009633A5 /* JSUIEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A86629C909DA2B47009633A5 /* JSUIEvent.h */; };
A86629D009DA2B48009633A5 /* JSUIEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A86629CA09DA2B47009633A5 /* JSUIEvent.cpp */; };
A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A86629CB09DA2B47009633A5 /* JSMouseEvent.h */; };
A88AD3B60952486E001DD196 /* QuartzSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB77089701F800BA5114 /* QuartzSupport.mm */; };
A88AD3B90952486E001DD196 /* RenderSVGContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB7A089701F800BA5114 /* RenderSVGContainer.cpp */; };
A88AD3BA0952486E001DD196 /* RenderSVGContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB7B089701F800BA5114 /* RenderSVGContainer.h */; };
- A88AD3BD0952486E001DD196 /* KCanvasFilters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB7E089701F800BA5114 /* KCanvasFilters.cpp */; };
A88AD3BE0952486E001DD196 /* KCanvasFilters.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB7F089701F800BA5114 /* KCanvasFilters.h */; };
A88AD3C00952486E001DD196 /* KCanvasImage.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB81089701F800BA5114 /* KCanvasImage.h */; };
A88AD3C10952486E001DD196 /* RenderPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB82089701F800BA5114 /* RenderPath.cpp */; };
A88AD3C20952486E001DD196 /* RenderPath.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB83089701F800BA5114 /* RenderPath.h */; };
A88AD3C70952486E001DD196 /* KCanvasResourceListener.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB89089701F800BA5114 /* KCanvasResourceListener.h */; };
- A88AD3C80952486E001DD196 /* KCanvasResources.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0FB8A089701F800BA5114 /* KCanvasResources.cpp */; };
- A88AD3C90952486E001DD196 /* KCanvasResources.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0FB8B089701F800BA5114 /* KCanvasResources.h */; };
A88AD3CB0952486E001DD196 /* KCanvasTreeDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = A810E39308A4160F00333D98 /* KCanvasTreeDebug.h */; };
A88AD3CC0952486E001DD196 /* KCanvasTreeDebug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A810E39408A4160F00333D98 /* KCanvasTreeDebug.cpp */; };
A88AD401095248F0001DD196 /* SVGRenderStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F6FF089701F100BA5114 /* SVGRenderStyle.cpp */; };
A833C7F60A2CF1D800D57664 /* xmlattrs.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = xmlattrs.in; sourceTree = "<group>"; };
A833C80A0A2CF25600D57664 /* XMLNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XMLNames.cpp; sourceTree = "<group>"; };
A833C80B0A2CF25600D57664 /* XMLNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XMLNames.h; sourceTree = "<group>"; };
+ A8415F910AC10C5D00F7D0DF /* KCanvasClipper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasClipper.h; sourceTree = "<group>"; };
+ A8415F920AC10C5D00F7D0DF /* KCanvasClipper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasClipper.cpp; sourceTree = "<group>"; };
+ A8415F930AC10C5D00F7D0DF /* KCanvasResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasResource.h; sourceTree = "<group>"; };
+ A8415F940AC10C5D00F7D0DF /* KCanvasResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasResource.cpp; sourceTree = "<group>"; };
+ A8415F950AC10C5D00F7D0DF /* KCanvasMasker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasMasker.h; sourceTree = "<group>"; };
+ A8415F960AC10C5D00F7D0DF /* KCanvasMasker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasMasker.cpp; sourceTree = "<group>"; };
+ A8415F970AC10C5D00F7D0DF /* KCanvasMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasMarker.h; sourceTree = "<group>"; };
+ A8415F980AC10C5D00F7D0DF /* KCanvasMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasMarker.cpp; sourceTree = "<group>"; };
+ A8415F990AC10C5D00F7D0DF /* KCanvasFilters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasFilters.cpp; sourceTree = "<group>"; };
A85D7A2F0879EBA9006A9172 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
A85D7A8C0879EC64006A9172 /* AffineTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AffineTransform.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A85D7A8D0879EC64006A9172 /* AffineTransform.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = AffineTransform.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB77089701F800BA5114 /* QuartzSupport.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QuartzSupport.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB7A089701F800BA5114 /* RenderSVGContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGContainer.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB7B089701F800BA5114 /* RenderSVGContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGContainer.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- A8C0FB7E089701F800BA5114 /* KCanvasFilters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasFilters.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB7F089701F800BA5114 /* KCanvasFilters.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasFilters.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB81089701F800BA5114 /* KCanvasImage.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasImage.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB82089701F800BA5114 /* RenderPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderPath.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB83089701F800BA5114 /* RenderPath.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = RenderPath.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB89089701F800BA5114 /* KCanvasResourceListener.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasResourceListener.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- A8C0FB8A089701F800BA5114 /* KCanvasResources.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasResources.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- A8C0FB8B089701F800BA5114 /* KCanvasResources.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KCanvasResources.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C32920093BB732000B9CAC /* WKArithmeticFilter.cikernel */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = text; path = WKArithmeticFilter.cikernel; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C32921093BB732000B9CAC /* WKArithmeticFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WKArithmeticFilter.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C32922093BB732000B9CAC /* WKArithmeticFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WKArithmeticFilter.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
isa = PBXGroup;
children = (
A8C0FB53089701F700BA5114 /* device */,
- A8C0FB7A089701F800BA5114 /* RenderSVGContainer.cpp */,
- A8C0FB7B089701F800BA5114 /* RenderSVGContainer.h */,
- A8C0FB7E089701F800BA5114 /* KCanvasFilters.cpp */,
+ A8415F920AC10C5D00F7D0DF /* KCanvasClipper.cpp */,
+ A8415F910AC10C5D00F7D0DF /* KCanvasClipper.h */,
+ A8415F990AC10C5D00F7D0DF /* KCanvasFilters.cpp */,
A8C0FB7F089701F800BA5114 /* KCanvasFilters.h */,
A8C0FB81089701F800BA5114 /* KCanvasImage.h */,
+ A8415F980AC10C5D00F7D0DF /* KCanvasMarker.cpp */,
+ A8415F970AC10C5D00F7D0DF /* KCanvasMarker.h */,
+ A8415F960AC10C5D00F7D0DF /* KCanvasMasker.cpp */,
+ A8415F950AC10C5D00F7D0DF /* KCanvasMasker.h */,
+ A8415F940AC10C5D00F7D0DF /* KCanvasResource.cpp */,
+ A8415F930AC10C5D00F7D0DF /* KCanvasResource.h */,
A8C0FB89089701F800BA5114 /* KCanvasResourceListener.h */,
- A8C0FB8A089701F800BA5114 /* KCanvasResources.cpp */,
- A8C0FB8B089701F800BA5114 /* KCanvasResources.h */,
A810E39408A4160F00333D98 /* KCanvasTreeDebug.cpp */,
A810E39308A4160F00333D98 /* KCanvasTreeDebug.h */,
A8FEFB090979F472005839FD /* RenderForeignObject.cpp */,
A8FEFB080979F472005839FD /* RenderForeignObject.h */,
A8C0FB82089701F800BA5114 /* RenderPath.cpp */,
A8C0FB83089701F800BA5114 /* RenderPath.h */,
+ A8C0FB7A089701F800BA5114 /* RenderSVGContainer.cpp */,
+ A8C0FB7B089701F800BA5114 /* RenderSVGContainer.h */,
FAE0418A09759694000540BE /* RenderSVGImage.cpp */,
FAE0418909759694000540BE /* RenderSVGImage.h */,
65743B50097076F8001E7CEF /* RenderSVGText.cpp */,
A88AD3C00952486E001DD196 /* KCanvasImage.h in Headers */,
A88AD3C20952486E001DD196 /* RenderPath.h in Headers */,
A88AD3C70952486E001DD196 /* KCanvasResourceListener.h in Headers */,
- A88AD3C90952486E001DD196 /* KCanvasResources.h in Headers */,
A88AD3CB0952486E001DD196 /* KCanvasTreeDebug.h in Headers */,
A88AD402095248F0001DD196 /* SVGRenderStyle.h in Headers */,
A88AD404095248F0001DD196 /* SVGRenderStyleDefs.h in Headers */,
851EE8210ABCA58100A6AA33 /* DOMRangeException.h in Headers */,
858015CE0ABCA75D0080588D /* DOMXPathException.h in Headers */,
85C78A680ABDE1B40044FC16 /* DOMException.h in Headers */,
+ A8415F9A0AC10C5D00F7D0DF /* KCanvasClipper.h in Headers */,
+ A8415F9C0AC10C5D00F7D0DF /* KCanvasResource.h in Headers */,
+ A8415F9E0AC10C5D00F7D0DF /* KCanvasMasker.h in Headers */,
+ A8415FA00AC10C5D00F7D0DF /* KCanvasMarker.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
A88AD3B40952486E001DD196 /* KRenderingPaintServerQuartz.mm in Sources */,
A88AD3B60952486E001DD196 /* QuartzSupport.mm in Sources */,
A88AD3B90952486E001DD196 /* RenderSVGContainer.cpp in Sources */,
- A88AD3BD0952486E001DD196 /* KCanvasFilters.cpp in Sources */,
A88AD3C10952486E001DD196 /* RenderPath.cpp in Sources */,
- A88AD3C80952486E001DD196 /* KCanvasResources.cpp in Sources */,
A88AD3CC0952486E001DD196 /* KCanvasTreeDebug.cpp in Sources */,
A88AD401095248F0001DD196 /* SVGRenderStyle.cpp in Sources */,
A88AD403095248F0001DD196 /* SVGRenderStyleDefs.cpp in Sources */,
853BF4DC0ABB6B55008647BB /* DOMNode.mm in Sources */,
85BCBC140ABBA87D00381160 /* DOMHTMLDocument.mm in Sources */,
851EE80D0ABCA28F00A6AA33 /* DOMAbstractView.mm in Sources */,
+ A8415F9B0AC10C5D00F7D0DF /* KCanvasClipper.cpp in Sources */,
+ A8415F9D0AC10C5D00F7D0DF /* KCanvasResource.cpp in Sources */,
+ A8415F9F0AC10C5D00F7D0DF /* KCanvasMasker.cpp in Sources */,
+ A8415FA10AC10C5D00F7D0DF /* KCanvasMarker.cpp in Sources */,
+ A8415FA20AC10C5D00F7D0DF /* KCanvasFilters.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
--- /dev/null
+/*
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ 2004, 2005 Rob Buis <buis@kde.org>
+
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#ifdef SVG_SUPPORT
+#include "KCanvasClipper.h"
+
+#include "TextStream.h"
+#include "KCanvasTreeDebug.h"
+
+namespace WebCore {
+
+TextStream &operator<<(TextStream &ts, WindRule rule)
+{
+ switch (rule) {
+ case RULE_NONZERO:
+ ts << "NON-ZERO"; break;
+ case RULE_EVENODD:
+ ts << "EVEN-ODD"; break;
+ }
+ return ts;
+}
+
+TextStream &operator<<(TextStream &ts, const KCClipData &d)
+{
+ ts << "[winding=" << d.windRule() << "]";
+ if (d.bboxUnits)
+ ts << " [bounding box mode=" << d.bboxUnits << "]";
+ ts << " [path=" << d.path.debugString() << "]";
+ return ts;
+}
+
+KCanvasClipper::KCanvasClipper() : KCanvasResource()
+{
+}
+
+KCanvasClipper::~KCanvasClipper()
+{
+}
+
+void KCanvasClipper::resetClipData()
+{
+ m_clipData.clear();
+}
+
+void KCanvasClipper::addClipData(const Path& path, WindRule rule, bool bboxUnits)
+{
+ m_clipData.addPath(path, rule, bboxUnits);
+}
+
+KCClipDataList KCanvasClipper::clipData() const
+{
+ return m_clipData;
+}
+
+TextStream& KCanvasClipper::externalRepresentation(TextStream &ts) const
+{
+ ts << "[type=CLIPPER]";
+ ts << " [clip data=" << clipData() << "]";
+ return ts;
+}
+
+KCanvasClipper *getClipperById(Document *document, const AtomicString &id)
+{
+ KCanvasResource *resource = getResourceById(document, id);
+ if (resource && resource->isClipper())
+ return static_cast<KCanvasClipper *>(resource);
+ return 0;
+}
+
+}
+
+// vim:ts=4:noet
+#endif // SVG_SUPPORT
+
--- /dev/null
+/*
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ 2004, 2005 Rob Buis <buis@kde.org>
+
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef KCanvasClipper_h
+#define KCanvasClipper_h
+#ifdef SVG_SUPPORT
+
+#include "KCanvasResource.h"
+
+namespace WebCore {
+
+typedef DeprecatedValueList<const RenderPath *> RenderPathList;
+
+class TextStream;
+
+struct KCClipData
+{
+ WindRule windRule() const { return m_windRule; }
+ WindRule m_windRule;
+ bool bboxUnits : 1;
+ Path path;
+};
+
+class KCClipDataList : public DeprecatedValueList<KCClipData>
+{
+public:
+ KCClipDataList() { }
+
+ inline void addPath(const Path& pathData, WindRule windRule, bool bboxUnits)
+ {
+ KCClipData clipData;
+ clipData.bboxUnits = bboxUnits;
+ clipData.m_windRule = windRule;
+ clipData.path = pathData;
+ append(clipData);
+ }
+};
+
+class KCanvasClipper : public KCanvasResource
+{
+public:
+ KCanvasClipper();
+ virtual ~KCanvasClipper();
+
+ virtual bool isClipper() const { return true; }
+
+ void resetClipData();
+ void addClipData(const Path&, WindRule, bool bboxUnits);
+
+ virtual void applyClip(const FloatRect& boundingBox) const = 0;
+
+ KCClipDataList clipData() const;
+
+ TextStream& externalRepresentation(TextStream &) const;
+protected:
+ KCClipDataList m_clipData;
+};
+
+TextStream& operator<<(TextStream&, WindRule);
+TextStream& operator<<(TextStream&, const KCClipData&);
+
+KCanvasClipper* getClipperById(Document*, const AtomicString&);
+
+}
+
+#endif // SVG_SUPPORT
+#endif
+
+// vim:ts=4:noet
#define KCanvasFilters_H
#ifdef SVG_SUPPORT
-#include "KCanvasResources.h"
+#include "KCanvasResource.h"
#ifdef __OBJC__
@class CIFilter;
#define KCanvasImage_H
#ifdef SVG_SUPPORT
-#include <kcanvas/KCanvasResources.h>
+#include "KCanvasResource.h"
namespace WebCore {
class Image;
#include "config.h"
#ifdef SVG_SUPPORT
-#include "KCanvasResources.h"
+#include "KCanvasMarker.h"
-#include "Document.h"
-#include "GraphicsContext.h"
-#include "IntRect.h"
#include "RenderSVGContainer.h"
-#include "KCanvasImage.h"
-#include "KCanvasTreeDebug.h"
-#include "KRenderingDevice.h"
-#include "RenderPath.h"
-#include "SVGStyledElement.h"
+#include "GraphicsContext.h"
#include "TextStream.h"
namespace WebCore {
-TextStream &operator<<(TextStream& ts, const KCanvasResource& r)
-{
- return r.externalRepresentation(ts);
-}
-
-//WindRule
-TextStream &operator<<(TextStream &ts, WindRule rule)
-{
- switch (rule)
- {
- case RULE_NONZERO:
- ts << "NON-ZERO"; break;
- case RULE_EVENODD:
- ts << "EVEN-ODD"; break;
- }
- return ts;
-}
-
-//KCClipData
-TextStream &operator<<(TextStream &ts, const KCClipData &d)
-{
- ts << "[winding=" << d.windRule() << "]";
- if (d.bboxUnits)
- ts << " [bounding box mode=" << d.bboxUnits << "]";
- ts << " [path=" << d.path.debugString() << "]";
- return ts;
-}
-
-// KCanvasResource
-KCanvasResource::KCanvasResource()
-{
-}
-
-KCanvasResource::~KCanvasResource()
-{
-}
-
-void KCanvasResource::addClient(const RenderPath *item)
-{
- if(m_clients.find(item) != m_clients.end())
- return;
-
- m_clients.append(item);
-}
-
-const RenderPathList &KCanvasResource::clients() const
-{
- return m_clients;
-}
-
-void KCanvasResource::invalidate()
-{
- RenderPathList::ConstIterator it = m_clients.begin();
- RenderPathList::ConstIterator end = m_clients.end();
-
- for(; it != end; ++it)
- const_cast<RenderPath *>(*it)->repaint();
-}
-
-String KCanvasResource::idInRegistry() const
-{
- return m_registryId;
-}
-
-void KCanvasResource::setIdInRegistry(const String& newId)
-{
- m_registryId = newId;
-}
-
-TextStream& KCanvasResource::externalRepresentation(TextStream &ts) const
-{
- return ts;
-}
-
-// KCanvasClipper
-KCanvasClipper::KCanvasClipper() : KCanvasResource()
-{
-}
-
-KCanvasClipper::~KCanvasClipper()
-{
-}
-
-void KCanvasClipper::resetClipData()
-{
- m_clipData.clear();
-}
-
-void KCanvasClipper::addClipData(const Path& path, WindRule rule, bool bboxUnits)
-{
- m_clipData.addPath(path, rule, bboxUnits);
-}
-
-KCClipDataList KCanvasClipper::clipData() const
-{
- return m_clipData;
-}
-
-TextStream& KCanvasClipper::externalRepresentation(TextStream &ts) const
-{
- ts << "[type=CLIPPER]";
- ts << " [clip data=" << clipData() << "]";
- return ts;
-}
-
-// KCanvasMasker
-KCanvasMasker::KCanvasMasker() : KCanvasResource(), m_mask(0)
-{
-}
-
-KCanvasMasker::~KCanvasMasker()
-{
- delete m_mask;
-}
-
-void KCanvasMasker::setMask(KCanvasImage *mask)
-{
- if (m_mask != mask) {
- delete m_mask;
- m_mask = mask;
- }
-}
-
-TextStream& KCanvasMasker::externalRepresentation(TextStream &ts) const
-{
- ts << "[type=MASKER]";
- return ts;
-}
-
// KCanvasMarker
KCanvasMarker::KCanvasMarker(RenderSVGContainer* marker)
: KCanvasResource()
return ts;
}
-KCanvasResource *getResourceById(Document *document, const AtomicString &id)
-{
- if (id.isEmpty())
- return 0;
- Element *element = document->getElementById(id);
- SVGElement *svgElement = svg_dynamic_cast(element);
- if (svgElement && svgElement->isStyled())
- return static_cast<SVGStyledElement *>(svgElement)->canvasResource();
- return 0;
-}
-
KCanvasMarker *getMarkerById(Document *document, const AtomicString &id)
{
KCanvasResource *resource = getResourceById(document, id);
return 0;
}
-KCanvasClipper *getClipperById(Document *document, const AtomicString &id)
-{
- KCanvasResource *resource = getResourceById(document, id);
- if (resource && resource->isClipper())
- return static_cast<KCanvasClipper *>(resource);
- return 0;
-}
-
-KCanvasMasker *getMaskerById(Document *document, const AtomicString &id)
-{
- KCanvasResource *resource = getResourceById(document, id);
- if (resource && resource->isMasker())
- return static_cast<KCanvasMasker *>(resource);
- return 0;
-}
-
-KRenderingPaintServer *getPaintServerById(Document *document, const AtomicString &id)
-{
- KCanvasResource *resource = getResourceById(document, id);
- if (resource && resource->isPaintServer())
- return static_cast<KRenderingPaintServer *>(resource);
- return 0;
-}
-
}
// vim:ts=4:noet
--- /dev/null
+/*
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ 2004, 2005 Rob Buis <buis@kde.org>
+
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef KCanvasMarker_H
+#define KCanvasMarker_H
+#ifdef SVG_SUPPORT
+
+#include "KCanvasResource.h"
+
+namespace WebCore {
+
+class KCanvasMarker : public KCanvasResource
+{
+public:
+ KCanvasMarker(RenderSVGContainer* = 0);
+ virtual ~KCanvasMarker();
+
+ virtual bool isMarker() const { return true; }
+
+ void setMarker(RenderSVGContainer*);
+
+ void setRef(double refX, double refY);
+ double refX() const;
+ double refY() const;
+
+ void setAngle(float angle);
+ void setAutoAngle();
+ float angle() const;
+
+ void setUseStrokeWidth(bool useStrokeWidth = true);
+ bool useStrokeWidth() const;
+
+ void draw(GraphicsContext*, const FloatRect&, double x, double y, double strokeWidth = 1, double angle = 0);
+
+ TextStream& externalRepresentation(TextStream &) const;
+
+private:
+ double m_refX, m_refY;
+ float m_angle;
+ RenderSVGContainer* m_marker;
+ bool m_useStrokeWidth;
+};
+
+KCanvasMarker* getMarkerById(Document*, const AtomicString&);
+
+}
+
+#endif // SVG_SUPPORT
+#endif
+
+// vim:ts=4:noet
--- /dev/null
+/*
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ 2004, 2005 Rob Buis <buis@kde.org>
+
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#ifdef SVG_SUPPORT
+#include "KCanvasMasker.h"
+
+#include "KCanvasImage.h"
+#include "TextStream.h"
+
+namespace WebCore {
+
+KCanvasMasker::KCanvasMasker()
+ : KCanvasResource()
+ , m_mask(0)
+{
+}
+
+KCanvasMasker::~KCanvasMasker()
+{
+ delete m_mask;
+}
+
+void KCanvasMasker::setMask(KCanvasImage* mask)
+{
+ if (m_mask != mask) {
+ delete m_mask;
+ m_mask = mask;
+ }
+}
+
+TextStream& KCanvasMasker::externalRepresentation(TextStream& ts) const
+{
+ ts << "[type=MASKER]";
+ return ts;
+}
+
+KCanvasMasker* getMaskerById(Document* document, const AtomicString& id)
+{
+ KCanvasResource* resource = getResourceById(document, id);
+ if (resource && resource->isMasker())
+ return static_cast<KCanvasMasker*>(resource);
+ return 0;
+}
+
+}
+
+// vim:ts=4:noet
+#endif // SVG_SUPPORT
+
--- /dev/null
+/*
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ 2004, 2005 Rob Buis <buis@kde.org>
+
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef KCanvasMasker_H
+#define KCanvasMasker_H
+#ifdef SVG_SUPPORT
+
+#include "KCanvasResource.h"
+
+namespace WebCore {
+
+class TextStream;
+class KCanvasImage;
+
+class KCanvasMasker : public KCanvasResource
+{
+public:
+ KCanvasMasker();
+ virtual ~KCanvasMasker();
+
+ virtual bool isMasker() const { return true; }
+ void setMask(KCanvasImage*);
+ KCanvasImage* mask() const { return m_mask; }
+
+ virtual void applyMask(const FloatRect& boundingBox) const = 0;
+
+ TextStream& externalRepresentation(TextStream&) const;
+protected:
+ KCanvasImage* m_mask;
+};
+
+KCanvasMasker* getMaskerById(Document*, const AtomicString&);
+
+}
+
+#endif // SVG_SUPPORT
+#endif
+
+// vim:ts=4:noet
--- /dev/null
+/*
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ 2004, 2005 Rob Buis <buis@kde.org>
+
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include "config.h"
+#ifdef SVG_SUPPORT
+#include "KCanvasResource.h"
+
+#include "Document.h"
+#include "KRenderingPaintServer.h"
+#include "SVGStyledElement.h"
+
+namespace WebCore {
+
+TextStream &operator<<(TextStream& ts, const KCanvasResource& r)
+{
+ return r.externalRepresentation(ts);
+}
+
+KCanvasResource::KCanvasResource()
+{
+}
+
+KCanvasResource::~KCanvasResource()
+{
+}
+
+void KCanvasResource::addClient(const RenderPath *item)
+{
+ if(m_clients.find(item) != m_clients.end())
+ return;
+
+ m_clients.append(item);
+}
+
+const RenderPathList &KCanvasResource::clients() const
+{
+ return m_clients;
+}
+
+void KCanvasResource::invalidate()
+{
+ RenderPathList::ConstIterator it = m_clients.begin();
+ RenderPathList::ConstIterator end = m_clients.end();
+
+ for(; it != end; ++it)
+ const_cast<RenderPath*>(*it)->repaint();
+}
+
+String KCanvasResource::idInRegistry() const
+{
+ return m_registryId;
+}
+
+void KCanvasResource::setIdInRegistry(const String& newId)
+{
+ m_registryId = newId;
+}
+
+TextStream& KCanvasResource::externalRepresentation(TextStream& ts) const
+{
+ return ts;
+}
+
+KCanvasResource* getResourceById(Document* document, const AtomicString& id)
+{
+ if (id.isEmpty())
+ return 0;
+ Element *element = document->getElementById(id);
+ SVGElement *svgElement = svg_dynamic_cast(element);
+ if (svgElement && svgElement->isStyled())
+ return static_cast<SVGStyledElement*>(svgElement)->canvasResource();
+ return 0;
+}
+
+KRenderingPaintServer* getPaintServerById(Document* document, const AtomicString& id)
+{
+ KCanvasResource* resource = getResourceById(document, id);
+ if (resource && resource->isPaintServer())
+ return static_cast<KRenderingPaintServer*>(resource);
+ return 0;
+}
+
+}
+
+// vim:ts=4:noet
+#endif // SVG_SUPPORT
+
--- /dev/null
+/*
+ Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
+ 2004, 2005 Rob Buis <buis@kde.org>
+
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#ifndef KCanvasResource_H
+#define KCanvasResource_H
+#ifdef SVG_SUPPORT
+
+#include "DeprecatedValueList.h"
+#include "Path.h"
+#include "RenderPath.h"
+#include "KCanvasResourceListener.h"
+
+namespace WebCore {
+
+typedef DeprecatedValueList<const RenderPath *> RenderPathList;
+
+class TextStream;
+
+typedef enum
+{
+ // Painting mode
+ RS_CLIPPER = 0,
+ RS_MARKER = 1,
+ RS_IMAGE = 2,
+ RS_FILTER = 3,
+ RS_MASKER = 4
+} KCResourceType;
+
+class KRenderingPaintServer;
+
+class KCanvasResource
+{
+public:
+ KCanvasResource();
+ virtual ~KCanvasResource();
+
+ virtual void invalidate();
+ void addClient(const RenderPath*);
+
+ const RenderPathList &clients() const;
+
+ String idInRegistry() const;
+ void setIdInRegistry(const String&);
+
+ virtual bool isPaintServer() const { return false; }
+ virtual bool isFilter() const { return false; }
+ virtual bool isClipper() const { return false; }
+ virtual bool isMarker() const { return false; }
+ virtual bool isMasker() const { return false; }
+
+ virtual TextStream& externalRepresentation(TextStream &) const;
+private:
+ RenderPathList m_clients;
+ String m_registryId;
+};
+
+KCanvasResource* getResourceById(Document*, const AtomicString&);
+KRenderingPaintServer* getPaintServerById(Document*, const AtomicString&);
+
+TextStream &operator<<(TextStream&, const KCanvasResource&);
+
+}
+
+#endif // SVG_SUPPORT
+#endif
+
+// vim:ts=4:noet
+++ /dev/null
-/*
- Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
- 2004, 2005 Rob Buis <buis@kde.org>
-
- This file is part of the KDE project
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- aint with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-#ifndef KCanvasResources_H
-#define KCanvasResources_H
-#ifdef SVG_SUPPORT
-
-#include "DeprecatedValueList.h"
-#include "Path.h"
-#include "RenderPath.h"
-#include "KCanvasResourceListener.h"
-
-namespace WebCore {
-
-typedef DeprecatedValueList<const RenderPath *> RenderPathList;
-
-class TextStream;
-
-// Enumerations
-typedef enum
-{
- // Painting mode
- RS_CLIPPER = 0,
- RS_MARKER = 1,
- RS_IMAGE = 2,
- RS_FILTER = 3,
- RS_MASKER = 4
-} KCResourceType;
-
-class KRenderingPaintServer;
-
-class KCanvasResource
-{
-public:
- KCanvasResource();
- virtual ~KCanvasResource();
-
- virtual void invalidate();
- void addClient(const RenderPath*);
-
- const RenderPathList &clients() const;
-
- String idInRegistry() const;
- void setIdInRegistry(const String&);
-
- virtual bool isPaintServer() const { return false; }
- virtual bool isFilter() const { return false; }
- virtual bool isClipper() const { return false; }
- virtual bool isMarker() const { return false; }
- virtual bool isMasker() const { return false; }
-
- virtual TextStream& externalRepresentation(TextStream &) const;
-private:
- RenderPathList m_clients;
- String m_registryId;
-};
-
-// Clipping paths
-struct KCClipData
-{
- WindRule windRule() const { return m_windRule; }
- WindRule m_windRule;
- bool bboxUnits : 1;
- Path path;
-};
-
-class KCClipDataList : public DeprecatedValueList<KCClipData>
-{
-public:
- KCClipDataList() { }
-
- inline void addPath(const Path& pathData, WindRule windRule, bool bboxUnits)
- {
- KCClipData clipData;
- clipData.bboxUnits = bboxUnits;
- clipData.m_windRule = windRule;
- clipData.path = pathData;
- append(clipData);
- }
-};
-
-class KCanvasClipper : public KCanvasResource
-{
-public:
- KCanvasClipper();
- virtual ~KCanvasClipper();
-
- virtual bool isClipper() const { return true; }
-
- void resetClipData();
- void addClipData(const Path&, WindRule, bool bboxUnits);
-
- virtual void applyClip(const FloatRect& boundingBox) const = 0;
-
- KCClipDataList clipData() const;
-
- TextStream& externalRepresentation(TextStream &) const;
-protected:
- KCClipDataList m_clipData;
-};
-
-class KCanvasImage;
-
-class KCanvasMasker : public KCanvasResource
-{
-public:
- KCanvasMasker();
- virtual ~KCanvasMasker();
-
- virtual bool isMasker() const { return true; }
- void setMask(KCanvasImage*);
- KCanvasImage* mask() const { return m_mask; }
-
- virtual void applyMask(const FloatRect& boundingBox) const = 0;
-
- TextStream& externalRepresentation(TextStream &) const;
-protected:
- KCanvasImage *m_mask;
-};
-
-class KCanvasMarker : public KCanvasResource
-{
-public:
- KCanvasMarker(RenderSVGContainer* = 0);
- virtual ~KCanvasMarker();
-
- virtual bool isMarker() const { return true; }
-
- void setMarker(RenderSVGContainer*);
-
- void setRef(double refX, double refY);
- double refX() const;
- double refY() const;
-
- void setAngle(float angle);
- void setAutoAngle();
- float angle() const;
-
- void setUseStrokeWidth(bool useStrokeWidth = true);
- bool useStrokeWidth() const;
-
- void draw(GraphicsContext*, const FloatRect&, double x, double y, double strokeWidth = 1, double angle = 0);
-
- TextStream& externalRepresentation(TextStream &) const;
-
-private:
- double m_refX, m_refY;
- float m_angle;
- RenderSVGContainer* m_marker;
- bool m_useStrokeWidth;
-};
-
-
-
-KCanvasResource *getResourceById(Document *document, const AtomicString &id);
-KCanvasMarker *getMarkerById(Document *document, const AtomicString &id);
-KCanvasClipper *getClipperById(Document *document, const AtomicString &id);
-KCanvasMasker *getMaskerById(Document *document, const AtomicString &id);
-KRenderingPaintServer *getPaintServerById(Document *document, const AtomicString &id);
-
-TextStream &operator<<(TextStream &ts, const KCanvasResource &r);
-TextStream &operator<<(TextStream &ts, WindRule rule);
-TextStream &operator<<(TextStream &ts, const KCClipData &d);
-
-}
-
-#endif // SVG_SUPPORT
-#endif
-
-// vim:ts=4:noet
#include "HTMLNames.h"
#include "RenderTreeAsText.h"
-#include <kcanvas/RenderSVGContainer.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingFillPainter.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
-#include <kcanvas/device/KRenderingPaintServerPattern.h>
-#include <kcanvas/device/KRenderingPaintServerSolid.h>
-#include <kcanvas/device/KRenderingStrokePainter.h>
-#include <ksvg2/svg/SVGStyledElement.h>
+#include "RenderSVGContainer.h"
+#include "KCanvasClipper.h"
+#include "KRenderingDevice.h"
+#include "KRenderingFillPainter.h"
+#include "KRenderingPaintServerGradient.h"
+#include "KRenderingPaintServerPattern.h"
+#include "KRenderingPaintServerSolid.h"
+#include "KRenderingStrokePainter.h"
+#include "SVGStyledElement.h"
#include <math.h>
namespace WebCore {
#include "GraphicsContext.h"
#include "RenderSVGContainer.h"
+#include "KCanvasClipper.h"
+#include "KCanvasMasker.h"
+#include "KCanvasMarker.h"
#include "KRenderingDevice.h"
#include "KRenderingFillPainter.h"
#include "KRenderingStrokePainter.h"
#include "config.h"
#ifdef SVG_SUPPORT
+#include "RenderSVGContainer.h"
+
+#include "KCanvasClipper.h"
+#include "KCanvasMasker.h"
#include "KCanvasRenderingStyle.h"
#include "KRenderingDevice.h"
-#include "RenderSVGContainer.h"
#include "SVGStyledElement.h"
#include "GraphicsContext.h"
#include "SVGStyledTransformableElement.h"
#include "Attr.h"
#include "GraphicsContext.h"
+#include "KCanvasClipper.h"
+#include "KCanvasMasker.h"
#include "KCanvasRenderingStyle.h"
#include "KRenderingDevice.h"
#include "SVGLength.h"
#include "RenderSVGText.h"
#include "GraphicsContext.h"
+#include "KCanvasClipper.h"
+#include "KCanvasMasker.h"
#include "KCanvasRenderingStyle.h"
#include "KRenderingDevice.h"
#include "SVGLengthList.h"
#define KRenderingPaintServer_H
#ifdef SVG_SUPPORT
-#include <kcanvas/KCanvasResources.h>
+#include "KCanvasResource.h"
namespace WebCore {
TextStream &operator<<(TextStream &, const KRenderingPaintServer &);
+KRenderingPaintServer* getPaintServerById(Document*, const AtomicString&);
+
}
#endif // SVG_SUPPORT
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import "KCanvasImage.h"
+#include "KCanvasMasker.h"
+#include "KCanvasImage.h"
namespace WebCore {
#ifndef KCanvasResourcesQuartz_h
#define KCanvasResourcesQuartz_h
-#import "KCanvasImage.h"
-#import "RenderSVGContainer.h"
-#import "AffineTransform.h"
+#include "KCanvasClipper.h"
+
+#include "KCanvasImage.h"
+#include "RenderSVGContainer.h"
+#include "AffineTransform.h"
typedef struct CGContext *CGContextRef;
typedef struct CGLayer *CGLayerRef;
#import "FoundationExtras.h"
#import "GraphicsContext.h"
+#include "KCanvasMarker.h"
#import "KCanvasFilterQuartz.h"
#import "KCanvasMaskerQuartz.h"
#import "KCanvasResourcesQuartz.h"
#include "SVGStyledTransformableElement.h"
#include "SVGExternalResourcesRequired.h"
-#include "KCanvasResources.h"
+#include "KCanvasClipper.h"
namespace WebCore
{
#include "Attr.h"
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/KCanvasFilters.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
+#include "KCanvasFilters.h"
+#include "KRenderingDevice.h"
+#include "KRenderingPaintServerGradient.h"
#include "ksvg.h"
#include "SVGNames.h"
#include "SVGFEColorMatrixElement.h"
#include "SVGNumberList.h"
-using namespace WebCore;
+namespace WebCore {
SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document *doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
return m_filterEffect;
}
+}
+
// vim:ts=4:noet
#endif // SVG_SUPPORT
#ifdef SVG_SUPPORT
#include "Attr.h"
-#include "KCanvasResources.h"
#include "KCanvasFilters.h"
#include "KRenderingDevice.h"
#ifdef SVG_SUPPORT
#include "Attr.h"
-#include "KCanvasResources.h"
#include "KCanvasFilters.h"
#include "KRenderingDevice.h"
#include "KRenderingPaintServerGradient.h"
#include "SVGRenderStyle.h"
#include "SVGFECompositeElement.h"
-using namespace WebCore;
+namespace WebCore {
SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName, Document *doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
return m_filterEffect;
}
+}
+
// vim:ts=4:noet
#endif // SVG_SUPPORT
#include "Attr.h"
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/KCanvasFilters.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
+#include "KCanvasFilters.h"
+#include "KRenderingDevice.h"
+#include "KRenderingPaintServerGradient.h"
#include "SVGNames.h"
#include "SVGHelper.h"
#include "SVGRenderStyle.h"
#include "SVGFEGaussianBlurElement.h"
-using namespace WebCore;
+namespace WebCore {
SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(const QualifiedName& tagName, Document *doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
return m_filterEffect;
}
+}
+
// vim:ts=4:noet
#endif // SVG_SUPPORT
#ifdef SVG_SUPPORT
#include "Attr.h"
-#include "KCanvasResources.h"
#include "KCanvasFilters.h"
#include "KRenderingDevice.h"
#include "Attr.h"
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/KCanvasFilters.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
+#include "KCanvasFilters.h"
+#include "KRenderingDevice.h"
+#include "KRenderingPaintServerGradient.h"
#include "SVGHelper.h"
#include "SVGRenderStyle.h"
#include "SVGFEOffsetElement.h"
-using namespace WebCore;
+namespace WebCore {
SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Document *doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
return m_filterEffect;
}
+}
+
// vim:ts=4:noet
#endif // SVG_SUPPORT
#include "Attr.h"
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/KCanvasFilters.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
+#include "KCanvasFilters.h"
+#include "KRenderingDevice.h"
+#include "KRenderingPaintServerGradient.h"
#include "ksvg.h"
#include "SVGHelper.h"
#include "SVGRenderStyle.h"
#include "SVGFETurbulenceElement.h"
-using namespace WebCore;
+namespace WebCore {
SVGFETurbulenceElement::SVGFETurbulenceElement(const QualifiedName& tagName, Document *doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
return m_filterEffect;
}
+}
+
// vim:ts=4:noet
#endif // SVG_SUPPORT
#ifdef SVG_SUPPORT
#include "Attr.h"
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/KCanvasFilters.h>
+#include "KRenderingDevice.h"
+#include "KCanvasFilters.h"
#include "SVGUnitTypes.h"
#include "SVGNames.h"
#include "SVGHelper.h"
#include "SVGLength.h"
#include "KCanvasRenderingStyle.h"
-using namespace WebCore;
+namespace WebCore {
SVGFilterElement::SVGFilterElement(const QualifiedName& tagName, Document *doc)
: SVGStyledElement(tagName, doc)
return m_filter;
}
+}
+
// vim:ts=4:noet
#endif // SVG_SUPPORT
#include "SVGLinearGradientElement.h"
#include "SVGTransformList.h"
-#include <kcanvas/KCanvasResources.h>
-#include <kcanvas/device/KRenderingDevice.h>
-#include <kcanvas/device/KRenderingPaintServerGradient.h>
+#include "KRenderingDevice.h"
+#include "KRenderingPaintServerGradient.h"
-using namespace WebCore;
+namespace WebCore {
SVGLinearGradientElement::SVGLinearGradientElement(const QualifiedName& tagName, Document *doc)
: SVGGradientElement(tagName, doc)
grad->setGradientEnd(FloatPoint(_x2, _y2));
}
+}
+
// vim:ts=4:noet
#endif // SVG_SUPPORT
Boston, MA 02111-1307, USA.
*/
-#ifndef KSVG_SVGMarkerElementImpl_H
-#define KSVG_SVGMarkerElementImpl_H
+#ifndef SVGMarkerElement_H
+#define SVGMarkerElement_H
#ifdef SVG_SUPPORT
-#include "KCanvasResources.h"
+#include "KCanvasMarker.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGFitToViewBox.h"
#include "SVGLangSpace.h"
Boston, MA 02111-1307, USA.
*/
-#ifndef KSVG_SVGMaskElementImpl_H
-#define KSVG_SVGMaskElementImpl_H
+#ifndef SVGMaskElement_H
+#define SVGMaskElement_H
#ifdef SVG_SUPPORT
#include "SVGTests.h"
#include "SVGStyledLocatableElement.h"
#include "SVGExternalResourcesRequired.h"
-#include "KCanvasResources.h"
-
-class KCanvasImage;
+#include "KCanvasMasker.h"
namespace WebCore
{