summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-06-15 19:36:43 +0100
committerBen Murdoch <benm@google.com>2010-06-16 14:52:28 +0100
commit545e470e52f0ac6a3a072bf559c796b42c6066b6 (patch)
treec0c14763654d84d37577dde512c3d3b4699a9e86 /WebCore/platform/graphics/qt/GraphicsContextQt.cpp
parent719298a66237d38ea5c05f1547123ad8aacbc237 (diff)
downloadexternal_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.zip
external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.gz
external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.bz2
Merge webkit.org at r61121: Initial merge by git.
Change-Id: Icd6db395c62285be384d137164d95d7466c98760
Diffstat (limited to 'WebCore/platform/graphics/qt/GraphicsContextQt.cpp')
-rw-r--r--WebCore/platform/graphics/qt/GraphicsContextQt.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index bdb810a..2a7db4e 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -334,7 +334,7 @@ void GraphicsContext::drawRect(const IntRect& rect)
if (m_common->state.shadowColor.isValid()) {
IntSize shadowSize;
- int shadowBlur;
+ float shadowBlur;
Color shadowColor;
if (getShadow(shadowSize, shadowBlur, shadowColor)) {
IntRect shadowRect = rect;
@@ -372,7 +372,7 @@ void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2)
adjustLineToPixelBoundaries(p1, p2, width, style);
IntSize shadowSize;
- int shadowBlur;
+ float shadowBlur;
Color shadowColor;
if (textDrawingMode() == cTextFill && getShadow(shadowSize, shadowBlur, shadowColor)) {
p->save();
@@ -474,7 +474,7 @@ void GraphicsContext::strokeArc(const IntRect& rect, int startAngle, int angleSp
p->setRenderHint(QPainter::Antialiasing, true);
IntSize shadowSize;
- int shadowBlur;
+ float shadowBlur;
Color shadowColor;
startAngle *= 16;
angleSpan *= 16;
@@ -509,7 +509,7 @@ void GraphicsContext::drawConvexPolygon(size_t npoints, const FloatPoint* points
p->save();
p->setRenderHint(QPainter::Antialiasing, shouldAntialias);
IntSize shadowSize;
- int shadowBlur;
+ float shadowBlur;
Color shadowColor;
if (getShadow(shadowSize, shadowBlur, shadowColor)) {
p->save();
@@ -540,7 +540,7 @@ QPen GraphicsContext::pen()
static void inline drawFilledShadowPath(GraphicsContext* context, QPainter* p, const QPainterPath& path)
{
IntSize shadowSize;
- int shadowBlur;
+ float shadowBlur;
Color shadowColor;
if (context->getShadow(shadowSize, shadowBlur, shadowColor)) {
p->translate(shadowSize.width(), shadowSize.height());
@@ -587,7 +587,7 @@ void GraphicsContext::strokePath()
if (m_common->state.strokePattern || m_common->state.strokeGradient || strokeColor().alpha()) {
IntSize shadowSize;
- int shadowBlur;
+ float shadowBlur;
Color shadowColor;
if (getShadow(shadowSize, shadowBlur, shadowColor)) {
QTransform t(p->worldTransform());
@@ -619,7 +619,7 @@ void GraphicsContext::strokePath()
static inline void drawBorderlessRectShadow(GraphicsContext* context, QPainter* p, const FloatRect& rect)
{
IntSize shadowSize;
- int shadowBlur;
+ float shadowBlur;
Color shadowColor;
if (context->getShadow(shadowSize, shadowBlur, shadowColor)) {
FloatRect shadowRect(rect);
@@ -820,7 +820,7 @@ FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& frect)
return FloatRect(roundedOrigin, roundedLowerRight - roundedOrigin);
}
-void GraphicsContext::setPlatformShadow(const IntSize& size, int, const Color&, ColorSpace)
+void GraphicsContext::setPlatformShadow(const IntSize& size, float, const Color&, ColorSpace)
{
// Qt doesn't support shadows natively, they are drawn manually in the draw*
// functions
@@ -1011,7 +1011,8 @@ void GraphicsContext::clipOut(const Path& path)
newClip.addPath(clippedOut);
p->setClipPath(newClip, Qt::IntersectClip);
} else {
- newClip.addRect(p->window());
+ QRect windowRect = p->transform().inverted().mapRect(p->window());
+ newClip.addRect(windowRect);
newClip.addPath(clippedOut.intersected(newClip));
p->setClipPath(newClip);
}