+2006-11-26 Simon Hausmann <hausmann@kde.org>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=11693
+ Fix the Qt build, adapt to various enum/class renamings.
+
+ * kcanvas/device/qt/KRenderingDeviceQt.cpp:
+ (WebCore::KRenderingDeviceQt::createResource):
+ (WebCore::KRenderingDeviceQt::createPaintServer):
+ * kcanvas/device/qt/KRenderingDeviceQt.h:
+ * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
+ (WebCore::SVGPaintServerLinearGradient::setup):
+ * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
+ (WebCore::SVGPaintServer::renderPath):
+ * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
+ (WebCore::setup):
+ * platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp:
+ (WebCore::SVGPaintServerSolid::setup):
+
2006-11-24 Rob Buis <buis@kde.org>
Reviewed by Mitz.
#include "SVGResourceClipper.h"
#include "SVGResourceMarker.h"
#include "KRenderingDeviceQt.h"
-#include "KRenderingPaintServerSolidQt.h"
-#include "KRenderingPaintServerGradientQt.h"
-#include "KRenderingPaintServerPatternQt.h"
+#include "SVGPaintServerSolid.h"
+#include "SVGPaintServerLinearGradient.h"
+#include "SVGPaintServerRadialGradient.h"
+#include "SVGPaintServerPattern.h"
namespace WebCore {
{
switch (type)
{
- case RS_CLIPPER:
+ case ClipperResourceType:
return new SVGResourceClipper();
- case RS_MARKER:
+ case MarkerResourceType:
return new SVGResourceMarker(); // Use default implementation...
- case RS_IMAGE:
+ case ImageResourceType:
// return new SVGResourceImageQt();
- case RS_FILTER:
+ case FilterResourceType:
// return new KCanvasFilterQt();
- case RS_MASKER:
+ case MaskerResourceType:
// return new KCanvasMaskerQt();
default:
return 0;
}
}
-PassRefPtr<KRenderingPaintServer> KRenderingDeviceQt::createPaintServer(const KCPaintServerType& type) const
+PassRefPtr<SVGPaintServer> KRenderingDeviceQt::createPaintServer(const SVGPaintServerType& type) const
{
switch (type)
{
- case PS_SOLID:
- return new KRenderingPaintServerSolidQt();
- case PS_PATTERN:
- return new KRenderingPaintServerPatternQt();
- case PS_LINEAR_GRADIENT:
- return new KRenderingPaintServerLinearGradientQt();
- case PS_RADIAL_GRADIENT:
- return new KRenderingPaintServerRadialGradientQt();
+ case SolidPaintServer:
+ return new SVGPaintServerSolid();
+ case PatternPaintServer:
+ return new SVGPaintServerPattern();
+ case LinearGradientPaintServer:
+ return new SVGPaintServerLinearGradient();
+ case RadialGradientPaintServer:
+ return new SVGPaintServerRadialGradient();
default:
return 0;
}
#include <QPainter>
#include <QPainterPath>
+#include "Path.h"
#include "KRenderingDevice.h"
namespace WebCore {
// Resource creation
virtual PassRefPtr<SVGResource> createResource(const SVGResourceType&) const;
- virtual PassRefPtr<KRenderingPaintServer> createPaintServer(const KCPaintServerType&) const;
+ virtual PassRefPtr<SVGPaintServer> createPaintServer(const SVGPaintServerType&) const;
virtual SVGFilterEffect* createFilterEffect(const SVGFilterEffectType&) const;
};
// TODO: Gradient transform + opacity fixes!
- if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
+ if ((type & ApplyToFillTargetType) && renderStyle->svgStyle()->hasFill()) {
fillColorArray(gradient, gradientStops(), opacity);
QBrush brush(gradient);
qtContext->setFillRule(renderStyle->svgStyle()->fillRule());
}
- if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
+ if ((type & ApplyToStrokeTargetType) && renderStyle->svgStyle()->hasStroke()) {
fillColorArray(gradient, gradientStops(), opacity);
QPen pen;
RenderStyle* renderStyle = path->style();
KRenderingDeviceContextQt* qtContext = static_cast<KRenderingDeviceContextQt*>(context);
- if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill())
+ if ((type & ApplyToFillTargetType) && renderStyle->svgStyle()->hasFill())
qtContext->fillPath();
- if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke())
+ if ((type & ApplyToStrokeTargetType) && renderStyle->svgStyle()->hasStroke())
qtContext->strokePath();
}
// gradientTrans.map(cx, cy, &cx, &cy);
// qtContext->painter().setMatrix(mat);
- if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
+ if ((type & ApplyToFillTargetType) && renderStyle->svgStyle()->hasFill()) {
fillColorArray(gradient, gradientStops(), opacity);
QBrush brush(gradient);
qtContext->setFillRule(renderStyle->svgStyle()->fillRule());
}
- if ((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
+ if ((type & ApplyToStrokeTargetType) && renderStyle->svgStyle()->hasStroke()) {
fillColorArray(gradient, gradientStops(), opacity);
QPen pen;
QColor c = color();
- if ((type & APPLY_TO_FILL) && renderStyle->svgStyle()->hasFill()) {
+ if ((type & ApplyToFillTargetType) && renderStyle->svgStyle()->hasFill()) {
c.setAlphaF(renderStyle->svgStyle()->fillOpacity());
QBrush brush(c);
/* if(isPaintingText()) ... */
}
- if((type & APPLY_TO_STROKE) && renderStyle->svgStyle()->hasStroke()) {
+ if ((type & ApplyToStrokeTargetType) && renderStyle->svgStyle()->hasStroke()) {
c.setAlphaF(renderStyle->svgStyle()->strokeOpacity());
QPen pen(c);