summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/qt/GradientQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/qt/GradientQt.cpp')
-rw-r--r--WebCore/platform/graphics/qt/GradientQt.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/WebCore/platform/graphics/qt/GradientQt.cpp b/WebCore/platform/graphics/qt/GradientQt.cpp
index a0edf8d..1e71f58 100644
--- a/WebCore/platform/graphics/qt/GradientQt.cpp
+++ b/WebCore/platform/graphics/qt/GradientQt.cpp
@@ -28,9 +28,10 @@
#include "Gradient.h"
#include "CSSParser.h"
-#include "NotImplemented.h"
+#include "GraphicsContext.h"
#include <QGradient>
+#include <QPainter>
namespace WebCore {
@@ -66,12 +67,24 @@ QGradient* Gradient::platformGradient()
++stopIterator;
}
+ switch(m_spreadMethod) {
+ case SpreadMethodPad:
+ m_gradient->setSpread(QGradient::PadSpread);
+ break;
+ case SpreadMethodReflect:
+ m_gradient->setSpread(QGradient::ReflectSpread);
+ break;
+ case SpreadMethodRepeat:
+ m_gradient->setSpread(QGradient::RepeatSpread);
+ break;
+ }
+
return m_gradient;
}
void Gradient::fill(GraphicsContext* context, const FloatRect& rect)
{
- notImplemented();
+ context->platformContext()->fillRect(rect, *platformGradient());
}
} //namespace