Changeset 769 for trunk/src/gui/effects


Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/effects/qgraphicseffect.cpp

    r651 r769  
    384384    if (m_cachedMode != QGraphicsEffect::PadToEffectiveBoundingRect
    385385        && (reason == EffectRectChanged
    386             || reason == TransformChanged
    387                && m_cachedSystem == Qt::LogicalCoordinates))
    388         return;
     386            ||
     387       
     388   
    389389
    390390    QPixmapCache::remove(m_cacheKey);
     
    700700        // No point in drawing in device coordinates (pixmap will be scaled anyways).
    701701        const QPixmap pixmap = sourcePixmap(Qt::LogicalCoordinates, &offset, NoPad);
    702         d->filter->draw(painter, offset, pixmap);
     702        if (!pixmap.isNull())
     703            d->filter->draw(painter, offset, pixmap);
     704
    703705        return;
    704706    }
     
    706708    // Draw pixmap in deviceCoordinates to avoid pixmap scaling.
    707709    const QPixmap pixmap = sourcePixmap(Qt::DeviceCoordinates, &offset);
     710
     711
     712
    708713    QTransform restoreTransform = painter->worldTransform();
    709714    painter->setWorldTransform(QTransform());
     
    722727    function. Use setBlurHints() to choose the blur hints.
    723728
    724     By default, the blur radius is 5 pixels.
     729    By default, the blur radius is 5 pixels. The blur radius is specified in
     730    device coordinates.
    725731
    726732    \img graphicseffect-blur.png
     
    777783
    778784    By default, the blur radius is 5 pixels.
     785
     786
     787
    779788*/
    780789qreal QGraphicsBlurEffect::blurRadius() const
     
    859868        mode = NoPad;
    860869
    861     // Draw pixmap in device coordinates to avoid pixmap scaling.
    862870    QPoint offset;
    863871    QPixmap pixmap = sourcePixmap(Qt::LogicalCoordinates, &offset, mode);
     872
     873
     874
    864875    d->filter->draw(painter, offset, pixmap);
    865876}
     
    878889    By default, the drop shadow is a semi-transparent dark gray
    879890    (QColor(63, 63, 63, 180)) shadow, blurred with a radius of 1 at an offset
    880     of 8 pixels towards the lower right.
     891    of 8 pixels towards the lower right. The drop shadow offset is specified
     892    in device coordinates.
    881893
    882894    \img graphicseffect-drop-shadow.png
     
    906918
    907919    By default, the offset is 8 pixels towards the lower right.
     920
     921
     922
    908923
    909924    \sa xOffset(), yOffset(), blurRadius(), color()
     
    10481063    QPoint offset;
    10491064    const QPixmap pixmap = sourcePixmap(Qt::DeviceCoordinates, &offset, mode);
     1065
     1066
     1067
    10501068    QTransform restoreTransform = painter->worldTransform();
    10511069    painter->setWorldTransform(QTransform());
Note: See TracChangeset for help on using the changeset viewer.