Changeset 769 for trunk/src/gui/effects/qgraphicseffect.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/effects/qgraphicseffect.cpp
r651 r769 384 384 if (m_cachedMode != QGraphicsEffect::PadToEffectiveBoundingRect 385 385 && (reason == EffectRectChanged 386 || reason == TransformChanged387 && m_cachedSystem == Qt::LogicalCoordinates))388 return;386 || (reason == TransformChanged && m_cachedSystem == Qt::LogicalCoordinates))) { 387 return; 388 } 389 389 390 390 QPixmapCache::remove(m_cacheKey); … … 700 700 // No point in drawing in device coordinates (pixmap will be scaled anyways). 701 701 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 703 705 return; 704 706 } … … 706 708 // Draw pixmap in deviceCoordinates to avoid pixmap scaling. 707 709 const QPixmap pixmap = sourcePixmap(Qt::DeviceCoordinates, &offset); 710 if (pixmap.isNull()) 711 return; 712 708 713 QTransform restoreTransform = painter->worldTransform(); 709 714 painter->setWorldTransform(QTransform()); … … 722 727 function. Use setBlurHints() to choose the blur hints. 723 728 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. 725 731 726 732 \img graphicseffect-blur.png … … 777 783 778 784 By default, the blur radius is 5 pixels. 785 786 The radius is given in device coordinates, meaning it is 787 unaffected by scale. 779 788 */ 780 789 qreal QGraphicsBlurEffect::blurRadius() const … … 859 868 mode = NoPad; 860 869 861 // Draw pixmap in device coordinates to avoid pixmap scaling.862 870 QPoint offset; 863 871 QPixmap pixmap = sourcePixmap(Qt::LogicalCoordinates, &offset, mode); 872 if (pixmap.isNull()) 873 return; 874 864 875 d->filter->draw(painter, offset, pixmap); 865 876 } … … 878 889 By default, the drop shadow is a semi-transparent dark gray 879 890 (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. 881 893 882 894 \img graphicseffect-drop-shadow.png … … 906 918 907 919 By default, the offset is 8 pixels towards the lower right. 920 921 The offset is given in device coordinates, which means it is 922 unaffected by scale. 908 923 909 924 \sa xOffset(), yOffset(), blurRadius(), color() … … 1048 1063 QPoint offset; 1049 1064 const QPixmap pixmap = sourcePixmap(Qt::DeviceCoordinates, &offset, mode); 1065 if (pixmap.isNull()) 1066 return; 1067 1050 1068 QTransform restoreTransform = painter->worldTransform(); 1051 1069 painter->setWorldTransform(QTransform());
Note:
See TracChangeset
for help on using the changeset viewer.