Changeset 70995 in webkit


Ignore:
Timestamp:
Oct 31, 2010 12:30:31 PM (13 years ago)
Author:
andreas.kling@nokia.com
Message:

2010-10-31 Andreas Kling <kling@webkit.org>

Reviewed by Dirk Schulze.

[Qt] Respect the "antialiased" argument in clipConvexPolygon()
https://bugs.webkit.org/show_bug.cgi?id=48734

Set (or unset) the QPainter::Antialiased render hint for antialiased
clipping based on the "antialiased" argument.

No test since Qt doesn't have pixel tests yet.

  • platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::clipConvexPolygon):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r70994 r70995  
     12010-10-31  Andreas Kling  <kling@webkit.org>
     2
     3        Reviewed by Dirk Schulze.
     4
     5        [Qt] Respect the "antialiased" argument in clipConvexPolygon()
     6        https://bugs.webkit.org/show_bug.cgi?id=48734
     7
     8        Set (or unset) the QPainter::Antialiased render hint for antialiased
     9        clipping based on the "antialiased" argument.
     10
     11        No test since Qt doesn't have pixel tests yet.
     12
     13        * platform/graphics/qt/GraphicsContextQt.cpp:
     14        (WebCore::GraphicsContext::clipConvexPolygon):
     15
    1162010-10-31  Andreas Kling  <kling@webkit.org>
    217
  • trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r70993 r70995  
    505505        path.lineTo(points[i]);
    506506    path.setFillRule(Qt::WindingFill);
    507     m_data->p()->setClipPath(path, Qt::IntersectClip);
     507
     508    QPainter* p = m_data->p();
     509
     510    bool painterWasAntialiased = p->testRenderHint(QPainter::Antialiasing);
     511
     512    if (painterWasAntialiased != antialiased)
     513        p->setRenderHint(QPainter::Antialiasing, antialiased);
     514
     515    p->setClipPath(path, Qt::IntersectClip);
     516
     517    if (painterWasAntialiased != antialiased)
     518        p->setRenderHint(QPainter::Antialiasing, painterWasAntialiased);
    508519}
    509520
Note: See TracChangeset for help on using the changeset viewer.