diff options
Diffstat (limited to 'WebCore/platform/graphics/qt/GraphicsContextQt.cpp')
-rw-r--r-- | WebCore/platform/graphics/qt/GraphicsContextQt.cpp | 10 |
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); |