Qt 4.8
Functions
qpixmapfilter_vg.cpp File Reference
#include "qpixmapfilter_vg_p.h"
#include "qvgimagepool_p.h"
#include <QtCore/qvarlengtharray.h>
#include <QtGui/qpainter.h>

Go to the source code of this file.

Functions

void qt_vg_drawVGImage (QPainter *painter, const QPointF &pos, VGImage vgImg)
 
void qt_vg_drawVGImageStencil (QPainter *painter, const QPointF &pos, VGImage vgImg, const QBrush &brush)
 

Function Documentation

◆ qt_vg_drawVGImage()

void qt_vg_drawVGImage ( QPainter painter,
const QPointF pos,
VGImage  vgImg 
)

Definition at line 3278 of file qpaintengine_vg.cpp.

Referenced by QVGPixmapConvolutionFilter::draw(), QVGPixmapColorizeFilter::draw(), QVGPixmapBlurFilter::draw(), and QVGPixmapConvolutionFilter::~QVGPixmapConvolutionFilter().

3279 {
3280  QVGPaintEngine *engine =
3281  static_cast<QVGPaintEngine *>(painter->paintEngine());
3282  drawVGImage(engine->vgPrivate(), pos, vgImg);
3283 }
QVGPaintEnginePrivate * vgPrivate()
QPaintEngine * paintEngine() const
Returns the paint engine that the painter is currently operating on if the painter is active; otherwi...
Definition: qpainter.cpp:1991
static void drawVGImage(QVGPaintEnginePrivate *d, const QRectF &r, VGImage vgImg, const QSize &imageSize, const QRectF &sr)

◆ qt_vg_drawVGImageStencil()

void qt_vg_drawVGImageStencil ( QPainter painter,
const QPointF pos,
VGImage  vgImg,
const QBrush brush 
)

Definition at line 3287 of file qpaintengine_vg.cpp.

Referenced by QVGPixmapDropShadowFilter::draw(), qt_vg_drawVGImage(), and QVGPixmapConvolutionFilter::~QVGPixmapConvolutionFilter().

3288 {
3289  QVGPaintEngine *engine =
3290  static_cast<QVGPaintEngine *>(painter->paintEngine());
3291 
3292  QVGPaintEnginePrivate *d = engine->vgPrivate();
3293 
3294  QTransform transform(d->imageTransform);
3295  transform.translate(pos.x(), pos.y());
3296  d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform);
3297 
3298  d->ensureBrush(brush);
3299  d->setImageMode(VG_DRAW_IMAGE_STENCIL);
3300  vgDrawImage(vgImg);
3301 }
double d
Definition: qnumeric_p.h:62
void setTransform(VGMatrixMode mode, const QTransform &transform)
qreal x() const
Returns the x-coordinate of this point.
Definition: qpoint.h:282
QVGPaintEnginePrivate * vgPrivate()
QPaintEngine * paintEngine() const
Returns the paint engine that the painter is currently operating on if the painter is active; otherwi...
Definition: qpainter.cpp:1991
void setImageMode(VGImageMode mode)
void ensureBrush(const QBrush &brush)
qreal y() const
Returns the y-coordinate of this point.
Definition: qpoint.h:287
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65