summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-08-11 14:44:44 +0100
committerBen Murdoch <benm@google.com>2010-08-12 19:15:41 +0100
commitdd8bb3de4f353a81954234999f1fea748aee2ea9 (patch)
tree729b52bf09294f0d6c67cd5ea80aee1b727b7bd8 /WebCore/platform/graphics/qt/GraphicsContextQt.cpp
parentf3d41ba51d86bf719c7a65ab5297aea3c17e2d98 (diff)
downloadexternal_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.zip
external_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.tar.gz
external_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.tar.bz2
Merge WebKit at r65072 : Initial merge by git.
Change-Id: Ibcf418498376b2660aacb7f8d46ea7085ef91585
Diffstat (limited to 'WebCore/platform/graphics/qt/GraphicsContextQt.cpp')
-rw-r--r--WebCore/platform/graphics/qt/GraphicsContextQt.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index e560e15..d4a145f 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -536,8 +536,12 @@ void GraphicsContext::clipConvexPolygon(size_t numPoints, const FloatPoint* poin
if (numPoints <= 1)
return;
-
- // FIXME: IMPLEMENT!!
+
+ QPainterPath path(points[0]);
+ for (size_t i = 1; i < numPoints; ++i)
+ path.lineTo(points[i]);
+ path.setFillRule(Qt::WindingFill);
+ m_data->p()->setClipPath(path, Qt::IntersectClip);
}
QPen GraphicsContext::pen()
@@ -1192,7 +1196,7 @@ void GraphicsContext::clipOut(const IntRect& rect)
p->setClipPath(newClip, Qt::IntersectClip);
} else {
QRect clipOutRect(rect);
- QRect window(p->window());
+ QRect window = p->transform().inverted().mapRect(p->window());
clipOutRect &= window;
newClip.addRect(window);
newClip.addRect(clipOutRect);