diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-10-20 14:01:15 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-10-20 14:01:15 (GMT) |
commit | 393db7ada80e803c73fa65f68f5dd037c16ed836 (patch) | |
tree | 0f047d6127e36d23dd0e0d214b2d887038d483c5 /src/openvg/qpaintengine_vg.cpp | |
parent | d4dd08918082372d3df7be2d3a6671cbd7bc7fd3 (diff) | |
parent | cbca69bb0c7e3c42bf7d2d964057f38263de0553 (diff) | |
download | Qt-393db7ada80e803c73fa65f68f5dd037c16ed836.zip Qt-393db7ada80e803c73fa65f68f5dd037c16ed836.tar.gz Qt-393db7ada80e803c73fa65f68f5dd037c16ed836.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-widget-team into 4.6
Diffstat (limited to 'src/openvg/qpaintengine_vg.cpp')
-rw-r--r-- | src/openvg/qpaintengine_vg.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index e0c99d7..da07c1d 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -2872,6 +2872,24 @@ void qt_vg_drawVGImage(QPainter *painter, const QPointF& pos, VGImage vgImg) drawVGImage(engine->vgPrivate(), pos, vgImg); } +// Used by qpixmapfilter_vg.cpp to draw filtered VGImage's as a stencil. +void qt_vg_drawVGImageStencil + (QPainter *painter, const QPointF& pos, VGImage vgImg, const QBrush& brush) +{ + QVGPaintEngine *engine = + static_cast<QVGPaintEngine *>(painter->paintEngine()); + + QVGPaintEnginePrivate *d = engine->vgPrivate(); + + QTransform transform(d->imageTransform); + transform.translate(pos.x(), pos.y()); + d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform); + + d->ensureBrush(brush); + d->setImageMode(VG_DRAW_IMAGE_STENCIL); + vgDrawImage(vgImg); +} + void QVGPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) { QPixmapData *pd = pm.pixmapData(); @@ -3328,9 +3346,6 @@ QPixmapFilter *QVGPaintEngine::pixmapFilter(int type, const QPixmapFilter *proto d->convolutionFilter.reset(new QVGPixmapConvolutionFilter); return d->convolutionFilter.data(); case QPixmapFilter::ColorizeFilter: - // Strength parameter does not work with current implementation. - if ((static_cast<const QPixmapColorizeFilter *>(prototype))->strength() != 1.0f) - break; if (!d->colorizeFilter) d->colorizeFilter.reset(new QVGPixmapColorizeFilter); return d->colorizeFilter.data(); |