Qt 4.8
Public Types | Public Functions | Public Variables | Properties | List of all members
QVGPaintEnginePrivate Class Reference
Inheritance diagram for QVGPaintEnginePrivate:
QPaintEngineExPrivate QPaintEnginePrivate

Public Types

enum  AdvancedBlending {
  QT_VG_BLEND_OVERLAY_KHR = 0x2010, QT_VG_BLEND_HARDLIGHT_KHR = 0x2011, QT_VG_BLEND_SOFTLIGHT_SVG_KHR = 0x2012, QT_VG_BLEND_SOFTLIGHT_KHR = 0x2013,
  QT_VG_BLEND_COLORDODGE_KHR = 0x2014, QT_VG_BLEND_COLORBURN_KHR = 0x2015, QT_VG_BLEND_DIFFERENCE_KHR = 0x2016, QT_VG_BLEND_SUBTRACT_KHR = 0x2017,
  QT_VG_BLEND_INVERT_KHR = 0x2018, QT_VG_BLEND_EXCLUSION_KHR = 0x2019, QT_VG_BLEND_LINEARDODGE_KHR = 0x201a, QT_VG_BLEND_LINEARBURN_KHR = 0x201b,
  QT_VG_BLEND_VIVIDLIGHT_KHR = 0x201c, QT_VG_BLEND_LINEARLIGHT_KHR = 0x201d, QT_VG_BLEND_PINLIGHT_KHR = 0x201e, QT_VG_BLEND_HARDMIX_KHR = 0x201f,
  QT_VG_BLEND_CLEAR_KHR = 0x2020, QT_VG_BLEND_DST_KHR = 0x2021, QT_VG_BLEND_SRC_OUT_KHR = 0x2022, QT_VG_BLEND_DST_OUT_KHR = 0x2023,
  QT_VG_BLEND_SRC_ATOP_KHR = 0x2024, QT_VG_BLEND_DST_ATOP_KHR = 0x2025, QT_VG_BLEND_XOR_KHR = 0x2026
}
 

Public Functions

void clearModes ()
 
void destroy ()
 
void draw (VGPath path, const QPen &pen, const QBrush &brush, VGint rule=VG_EVEN_ODD)
 
void ensureBrush (const QBrush &brush)
 
void ensureMask (QVGPaintEngine *engine, int width, int height)
 
void ensurePathTransform ()
 
void ensurePen (const QPen &pen)
 
void fill (VGPath path, const QBrush &brush, VGint rule=VG_EVEN_ODD)
 
void init ()
 
void initObjects ()
 
void modifyMask (QVGPaintEngine *engine, VGMaskOperation op, const QRegion &region)
 
void modifyMask (QVGPaintEngine *engine, VGMaskOperation op, const QRect &rect)
 
bool needsBrushEmulation () const
 
bool needsEmulation (const QBrush &brush) const
 
bool needsEmulation () const
 
bool needsPenEmulation () const
 
VGPath painterPathToVGPath (const QPainterPath &path)
 
 QVGPaintEnginePrivate (QVGPaintEngine *q_ptr)
 
VGPath roundedRectPath (const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
 
void setBlendMode (VGBlendMode mode)
 
VGPaintType setBrush (VGPaint paint, const QBrush &brush, VGMatrixMode mode, VGPaintType prevPaintType)
 
void setBrushTransform (const QBrush &brush, VGMatrixMode mode)
 
void setFillRule (VGint mode)
 
void setImageMode (VGImageMode mode)
 
void setImageOptions ()
 
void setImageQuality (VGImageQuality mode)
 
void setPenParams (const QPen &pen)
 
void setRenderingQuality (VGRenderingQuality mode)
 
void setTransform (VGMatrixMode mode, const QTransform &transform)
 
void setupColorRamp (const QGradient *grad, VGPaint paint)
 
void stroke (VGPath path, const QPen &pen)
 
void systemStateChanged ()
 
void updateTransform (QPaintDevice *pdev)
 
VGPath vectorPathToVGPath (const QVectorPath &path)
 
 ~QVGPaintEnginePrivate ()
 
- Public Functions inherited from QPaintEngineExPrivate
bool hasClipOperations () const
 
 QPaintEngineExPrivate ()
 
void replayClipOperations ()
 
 ~QPaintEngineExPrivate ()
 
- Public Functions inherited from QPaintEnginePrivate
void drawBoxTextItem (const QPointF &p, const QTextItemInt &ti)
 
 QPaintEnginePrivate ()
 
void setSystemTransform (const QTransform &xform)
 
void setSystemViewport (const QRegion &region)
 
void transformSystemClip ()
 
virtual ~QPaintEnginePrivate ()
 

Public Variables

VGBlendMode blendMode
 
QScopedPointer< QPixmapFilterblurFilter
 
QPointF brushOrigin
 
VGPaint brushPaint
 
QTransform brushTransform
 
VGPaintType brushType
 
QColor clearColor
 
VGfloat clearOpacity
 
QScopedPointer< QPixmapFiltercolorizeFilter
 
QScopedPointer< QPixmapFilterconvolutionFilter
 
QBrush currentBrush
 
QPen currentPen
 
QPaintEngine::DirtyFlags dirty
 
QScopedPointer< QPixmapFilterdropShadowFilter
 
VGPaint fillPaint
 
VGint fillRule
 
bool forceBrushChange
 
bool forcePenChange
 
bool hasAdvancedBlending
 
bool hasExtendedRadialGradientBrush
 
bool hasExtendedRadialGradientPen
 
VGImageMode imageMode
 
VGImageQuality imageQuality
 
QTransform imageTransform
 
VGPath linePath
 
bool maskIsSet
 
QRect maskRect
 
bool maskValid
 
VGMatrixMode matrixMode
 
VGint maxScissorRects
 
qreal opacity
 
VGPaint opacityPaint
 
qreal paintOpacity
 
QTransform pathTransform
 
bool pathTransformSet
 
VGPaint penPaint
 
qreal penScale
 
QTransform penTransform
 
VGPaintType penType
 
bool rawVG
 
VGPath rectPath
 
VGRenderingQuality renderingQuality
 
VGPath roundRectPath
 
bool scissorActive
 
bool scissorDirty
 
bool scissorMask
 
QRegion scissorRegion
 
bool simpleTransform
 
QTransform transform
 
- Public Variables inherited from QPaintEngineExPrivate
QStrokerOpsactiveStroker
 
QDashStroker dasher
 
QRect exDeviceRect
 
StrokeHandlerstrokeHandler
 
QStroker stroker
 
QPen strokerPen
 
- Public Variables inherited from QPaintEnginePrivate
QWidgetcurrentClipWidget
 
uint hasSystemTransform: 1
 
uint hasSystemViewport: 1
 
QPaintDevicepdev
 
QPaintEngineq_ptr
 
QRegion systemClip
 
QRect systemRect
 
QTransform systemTransform
 
QRegion systemViewport
 

Properties

QVGPaintEngineq
 

Detailed Description

Definition at line 100 of file qpaintengine_vg.cpp.

Enumerations

◆ AdvancedBlending

Enumerator
QT_VG_BLEND_OVERLAY_KHR 
QT_VG_BLEND_HARDLIGHT_KHR 
QT_VG_BLEND_SOFTLIGHT_SVG_KHR 
QT_VG_BLEND_SOFTLIGHT_KHR 
QT_VG_BLEND_COLORDODGE_KHR 
QT_VG_BLEND_COLORBURN_KHR 
QT_VG_BLEND_DIFFERENCE_KHR 
QT_VG_BLEND_SUBTRACT_KHR 
QT_VG_BLEND_INVERT_KHR 
QT_VG_BLEND_EXCLUSION_KHR 
QT_VG_BLEND_LINEARDODGE_KHR 
QT_VG_BLEND_LINEARBURN_KHR 
QT_VG_BLEND_VIVIDLIGHT_KHR 
QT_VG_BLEND_LINEARLIGHT_KHR 
QT_VG_BLEND_PINLIGHT_KHR 
QT_VG_BLEND_HARDMIX_KHR 
QT_VG_BLEND_CLEAR_KHR 
QT_VG_BLEND_DST_KHR 
QT_VG_BLEND_SRC_OUT_KHR 
QT_VG_BLEND_DST_OUT_KHR 
QT_VG_BLEND_SRC_ATOP_KHR 
QT_VG_BLEND_DST_ATOP_KHR 
QT_VG_BLEND_XOR_KHR 

Definition at line 107 of file qpaintengine_vg.cpp.

107  {
108  QT_VG_BLEND_OVERLAY_KHR = 0x2010,
109  QT_VG_BLEND_HARDLIGHT_KHR = 0x2011,
111  QT_VG_BLEND_SOFTLIGHT_KHR = 0x2013,
113  QT_VG_BLEND_COLORBURN_KHR = 0x2015,
115  QT_VG_BLEND_SUBTRACT_KHR = 0x2017,
116  QT_VG_BLEND_INVERT_KHR = 0x2018,
117  QT_VG_BLEND_EXCLUSION_KHR = 0x2019,
122  QT_VG_BLEND_PINLIGHT_KHR = 0x201e,
123  QT_VG_BLEND_HARDMIX_KHR = 0x201f,
124  QT_VG_BLEND_CLEAR_KHR = 0x2020,
125  QT_VG_BLEND_DST_KHR = 0x2021,
126  QT_VG_BLEND_SRC_OUT_KHR = 0x2022,
127  QT_VG_BLEND_DST_OUT_KHR = 0x2023,
128  QT_VG_BLEND_SRC_ATOP_KHR = 0x2024,
129  QT_VG_BLEND_DST_ATOP_KHR = 0x2025,
130  QT_VG_BLEND_XOR_KHR = 0x2026
131  };

Constructors and Destructors

◆ QVGPaintEnginePrivate()

QVGPaintEnginePrivate::QVGPaintEnginePrivate ( QVGPaintEngine q_ptr)

Definition at line 366 of file qpaintengine_vg.cpp.

366  : q(q_ptr)
367 {
368  init();
369 }

◆ ~QVGPaintEnginePrivate()

QVGPaintEnginePrivate::~QVGPaintEnginePrivate ( )

Definition at line 427 of file qpaintengine_vg.cpp.

428 {
429  destroy();
430 }

Functions

◆ clearModes()

void QVGPaintEnginePrivate::clearModes ( )

Definition at line 357 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::endNativePainting(), and init().

358 {
359  matrixMode = (VGMatrixMode)0;
360  imageMode = (VGImageMode)0;
361  blendMode = (VGBlendMode)0;
362  renderingQuality = (VGRenderingQuality)0;
363  imageQuality = (VGImageQuality)0;
364 }
VGImageQuality imageQuality
VGRenderingQuality renderingQuality

◆ destroy()

void QVGPaintEnginePrivate::destroy ( )

Definition at line 506 of file qpaintengine_vg.cpp.

Referenced by ~QVGPaintEnginePrivate().

507 {
508  if (penPaint)
509  vgDestroyPaint(penPaint);
510  if (brushPaint)
511  vgDestroyPaint(brushPaint);
512  if (opacityPaint)
513  vgDestroyPaint(opacityPaint);
514 
515 #if !defined(QVG_NO_MODIFY_PATH)
516  if (rectPath)
517  vgDestroyPath(rectPath);
518  if (linePath)
519  vgDestroyPath(linePath);
520  if (roundRectPath)
521  vgDestroyPath(roundRectPath);
522 #endif
523 
524 #if !defined(QVG_NO_DRAW_GLYPHS)
525  QVGFontCache::Iterator it;
526  for (it = fontCache.begin(); it != fontCache.end(); ++it)
527  delete it.value();
528  fontCache.clear();
529  delete fontEngineCleaner;
530 #endif
531 }
#define it(className, varName)

◆ draw()

void QVGPaintEnginePrivate::draw ( VGPath  path,
const QPen pen,
const QBrush brush,
VGint  rule = VG_EVEN_ODD 
)

Definition at line 1499 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::createState().

1500 {
1501  VGbitfield mode = 0;
1502  if (qpen_style(pen) != Qt::NoPen && qbrush_style(qpen_brush(pen)) != Qt::NoBrush) {
1503  ensurePen(pen);
1504  mode |= VG_STROKE_PATH;
1505  }
1506  if (brush.style() != Qt::NoBrush) {
1507  ensureBrush(brush);
1508  setFillRule(rule);
1509  mode |= VG_FILL_PATH;
1510  }
1511  if (mode != 0) {
1513  vgDrawPath(path, mode);
1514  }
1515 }
Qt::BrushStyle qbrush_style(const QBrush &b)
Definition: qpainter_p.h:96
void ensurePen(const QPen &pen)
QBrush qpen_brush(const QPen &p)
Definition: qpainter_p.h:87
Qt::BrushStyle style() const
Returns the brush style.
Definition: qbrush.h:182
void ensureBrush(const QBrush &brush)
Qt::PenStyle qpen_style(const QPen &p)
Definition: qpainter_p.h:89
void setFillRule(VGint mode)

◆ ensureBrush()

void QVGPaintEnginePrivate::ensureBrush ( const QBrush brush)
inline

Definition at line 268 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::beginNativePainting(), QVGPaintEngine::drawCachedGlyphs(), QVGCompositionHelper::fillBackground(), and qt_vg_drawVGImageStencil().

268  {
269  if (forceBrushChange || brush != currentBrush) {
270  currentBrush = brush;
271  forceBrushChange = false;
273  (brushPaint, brush, VG_MATRIX_FILL_PAINT_TO_USER, brushType);
274  }
275  if (fillPaint != brushPaint) {
276  vgSetPaint(brushPaint, VG_FILL_PATH);
278  }
279  }
VGPaintType setBrush(VGPaint paint, const QBrush &brush, VGMatrixMode mode, VGPaintType prevPaintType)

◆ ensureMask()

void QVGPaintEnginePrivate::ensureMask ( QVGPaintEngine engine,
int  width,
int  height 
)

Definition at line 2177 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::clip().

2178 {
2179  scissorMask = false;
2180  if (maskIsSet) {
2181  vgMask(VG_INVALID_HANDLE, VG_FILL_MASK, 0, 0, width, height);
2182  maskRect = QRect();
2183  } else {
2184  vgMask(VG_INVALID_HANDLE, VG_CLEAR_MASK, 0, 0, width, height);
2185  if (maskRect.isValid()) {
2186  vgMask(VG_INVALID_HANDLE, VG_FILL_MASK,
2187  maskRect.x(), height - maskRect.y() - maskRect.height(),
2188  maskRect.width(), maskRect.height());
2189  maskRect = QRect();
2190  engine->updateScissor();
2191  }
2192  }
2193 }
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
Definition: qrect.h:237

◆ ensurePathTransform()

void QVGPaintEnginePrivate::ensurePathTransform ( )
inline

Definition at line 243 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::beginNativePainting().

244  {
245  if (!pathTransformSet) {
246  QTransform aliasedTransform = pathTransform;
247  if (renderingQuality == VG_RENDERING_QUALITY_NONANTIALIASED && currentPen != Qt::NoPen)
248  aliasedTransform = aliasedTransform
250  setTransform(VG_MATRIX_PATH_USER_TO_SURFACE, aliasedTransform);
251  pathTransformSet = true;
252  }
253  }
void setTransform(VGMatrixMode mode, const QTransform &transform)
VGRenderingQuality renderingQuality
static QTransform fromTranslate(qreal dx, qreal dy)
Creates a matrix which corresponds to a translation of dx along the x axis and dy along the y axis...
Definition: qtransform.cpp:462
static const qreal aliasedCoordinateDelta
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65

◆ ensurePen()

void QVGPaintEnginePrivate::ensurePen ( const QPen pen)
inline

Definition at line 256 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::beginNativePainting().

256  {
257  if (forcePenChange || pen != currentPen) {
258  currentPen = pen;
259  forcePenChange = false;
260  penType = setBrush
261  (penPaint, pen.brush(),
262  VG_MATRIX_STROKE_PAINT_TO_USER, penType);
263  setPenParams(pen);
264  }
265  }
void setPenParams(const QPen &pen)
VGPaintType setBrush(VGPaint paint, const QBrush &brush, VGMatrixMode mode, VGPaintType prevPaintType)
QBrush brush() const
Returns the brush used to fill strokes generated with this pen.
Definition: qpen.cpp:797

◆ fill()

void QVGPaintEnginePrivate::fill ( VGPath  path,
const QBrush brush,
VGint  rule = VG_EVEN_ODD 
)

Definition at line 1526 of file qpaintengine_vg.cpp.

1527 {
1528  if (brush.style() == Qt::NoBrush)
1529  return;
1530  ensureBrush(brush);
1531  setFillRule(rule);
1532  QPen savedPen = currentPen;
1535  currentPen = savedPen;
1536  vgDrawPath(path, VG_FILL_PATH);
1537 }
The QPen class defines how a QPainter should draw lines and outlines of shapes.
Definition: qpen.h:64
Qt::BrushStyle style() const
Returns the brush style.
Definition: qbrush.h:182
void ensureBrush(const QBrush &brush)
void setFillRule(VGint mode)

◆ init()

void QVGPaintEnginePrivate::init ( )

Definition at line 371 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEnginePrivate().

372 {
373  maxScissorRects = 0;
374 
375  penPaint = 0;
376  brushPaint = 0;
377  opacityPaint = 0;
378  fillPaint = 0;
379 
380  forcePenChange = true;
381  forceBrushChange = true;
382 
385 
386  penType = (VGPaintType)0;
387  brushType = (VGPaintType)0;
388 
389  brushOrigin = QPointF(0.0f, 0.0f);
390 
391  fillRule = 0;
392 
393  opacity = 1.0;
394  paintOpacity = 1.0f;
395 
396 #if !defined(QVG_NO_MODIFY_PATH)
397  rectPath = 0;
398  linePath = 0;
399  roundRectPath = 0;
400 #endif
401 
402  simpleTransform = true;
403  pathTransformSet = false;
404  penScale = 1.0;
405 
406  maskValid = false;
407  maskIsSet = false;
408  scissorMask = false;
409  rawVG = false;
410 
411  scissorActive = false;
412  scissorDirty = false;
413 
414  dirty = 0;
415 
416  clearOpacity = 1.0f;
417 
418 #if !defined(QVG_NO_DRAW_GLYPHS)
419  fontEngineCleaner = 0;
420 #endif
421 
422  hasAdvancedBlending = false;
423 
424  clearModes();
425 }
The QPointF class defines a point in the plane using floating point precision.
Definition: qpoint.h:214
QPaintEngine::DirtyFlags dirty

◆ initObjects()

void QVGPaintEnginePrivate::initObjects ( )

Definition at line 432 of file qpaintengine_vg.cpp.

433 {
434  maxScissorRects = vgGeti(VG_MAX_SCISSOR_RECTS);
435 
436  penPaint = vgCreatePaint();
437  vgSetParameteri(penPaint, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR);
438  vgSetPaint(penPaint, VG_STROKE_PATH);
439 
440  vgSeti(VG_MATRIX_MODE, VG_MATRIX_STROKE_PAINT_TO_USER);
441  vgLoadIdentity();
442 
443  brushPaint = vgCreatePaint();
444  vgSetParameteri(brushPaint, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR);
445  vgSetPaint(brushPaint, VG_FILL_PATH);
447 
448  vgSeti(VG_MATRIX_MODE, VG_MATRIX_FILL_PAINT_TO_USER);
449  vgLoadIdentity();
450  matrixMode = VG_MATRIX_FILL_PAINT_TO_USER;
451 
452  opacityPaint = vgCreatePaint();
453  vgSetParameteri(opacityPaint, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR);
454  VGfloat values[4];
455  values[0] = 1.0f;
456  values[1] = 1.0f;
457  values[2] = 1.0f;
458  values[3] = paintOpacity;
459  vgSetParameterfv(opacityPaint, VG_PAINT_COLOR, 4, values);
460 
461 #if !defined(QVG_NO_MODIFY_PATH)
462  // Create a dummy path for rectangle drawing, which we can
463  // modify later with vgModifyPathCoords(). This should be
464  // faster than constantly creating and destroying paths.
465  rectPath = vgCreatePath(VG_PATH_FORMAT_STANDARD,
466  VG_PATH_DATATYPE_F,
467  1.0f, // scale
468  0.0f, // bias
469  5, // segmentCapacityHint
470  8, // coordCapacityHint
471  VG_PATH_CAPABILITY_ALL);
472  static VGubyte const segments[5] = {
473  VG_MOVE_TO_ABS,
474  VG_LINE_TO_ABS,
475  VG_LINE_TO_ABS,
476  VG_LINE_TO_ABS,
477  VG_CLOSE_PATH
478  };
479  VGfloat coords[8];
480  coords[0] = 0.0f;
481  coords[1] = 0.0f;
482  coords[2] = 100.0f;
483  coords[3] = coords[1];
484  coords[4] = coords[2];
485  coords[5] = 100.0f;
486  coords[6] = coords[0];
487  coords[7] = coords[5];
488  vgAppendPathData(rectPath, 5, segments, coords);
489 
490  // Create a dummy line drawing path as well.
491  linePath = vgCreatePath(VG_PATH_FORMAT_STANDARD,
492  VG_PATH_DATATYPE_F,
493  1.0f, // scale
494  0.0f, // bias
495  2, // segmentCapacityHint
496  4, // coordCapacityHint
497  VG_PATH_CAPABILITY_ALL);
498  vgAppendPathData(linePath, 2, segments, coords);
499 #endif
500 
501  const char *extensions = reinterpret_cast<const char *>(vgGetString(VG_EXTENSIONS));
502  if (extensions)
503  hasAdvancedBlending = strstr(extensions, "VG_KHR_advanced_blending") != 0;
504 }
Q_GUI_EXPORT QString extensions()
Definition: qegl.cpp:785
quint16 values[128]

◆ modifyMask() [1/2]

void QVGPaintEnginePrivate::modifyMask ( QVGPaintEngine engine,
VGMaskOperation  op,
const QRegion region 
)

Definition at line 2196 of file qpaintengine_vg.cpp.

Referenced by ensureMask().

2197 {
2198  QPaintDevice *pdev = engine->paintDevice();
2199  int width = pdev->width();
2200  int height = pdev->height();
2201 
2202  if (!maskValid)
2203  ensureMask(engine, width, height);
2204 
2205  QVector<QRect> rects = region.rects();
2206  for (int i = 0; i < rects.size(); ++i) {
2207  vgMask(VG_INVALID_HANDLE, op,
2208  rects[i].x(), height - rects[i].y() - rects[i].height(),
2209  rects[i].width(), rects[i].height());
2210  }
2211 
2212  vgSeti(VG_MASKING, VG_TRUE);
2213  maskValid = true;
2214  maskIsSet = false;
2215  scissorMask = false;
2216 }
QPaintDevice * paintDevice() const
Returns the device that this engine is painting on, if painting is active; otherwise returns 0...
int height() const
Definition: qpaintdevice.h:92
int width() const
Definition: qpaintdevice.h:91
void ensureMask(QVGPaintEngine *engine, int width, int height)
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
Definition: qregion.cpp:4412
QPaintDevice * pdev
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137

◆ modifyMask() [2/2]

void QVGPaintEnginePrivate::modifyMask ( QVGPaintEngine engine,
VGMaskOperation  op,
const QRect rect 
)

Definition at line 2219 of file qpaintengine_vg.cpp.

2220 {
2221  QPaintDevice *pdev = engine->paintDevice();
2222  int width = pdev->width();
2223  int height = pdev->height();
2224 
2225  if (!maskValid)
2226  ensureMask(engine, width, height);
2227 
2228  if (rect.isValid()) {
2229  vgMask(VG_INVALID_HANDLE, op,
2230  rect.x(), height - rect.y() - rect.height(),
2231  rect.width(), rect.height());
2232  }
2233 
2234  vgSeti(VG_MASKING, VG_TRUE);
2235  maskValid = true;
2236  maskIsSet = false;
2237  scissorMask = false;
2238 }
QPaintDevice * paintDevice() const
Returns the device that this engine is painting on, if painting is active; otherwise returns 0...
int height() const
Definition: qpaintdevice.h:92
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
int width() const
Definition: qpaintdevice.h:91
void ensureMask(QVGPaintEngine *engine, int width, int height)
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252
QPaintDevice * pdev
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
Definition: qrect.h:237

◆ needsBrushEmulation()

bool QVGPaintEnginePrivate::needsBrushEmulation ( ) const
inline

Definition at line 297 of file qpaintengine_vg.cpp.

298  {
300  }

◆ needsEmulation() [1/2]

bool QVGPaintEnginePrivate::needsEmulation ( const QBrush brush) const
inline

Definition at line 281 of file qpaintengine_vg.cpp.

282  {
284  return qt_isExtendedRadialGradient(brush);
285  }
#define Q_GUI_EXPORT
Definition: qglobal.h:1450
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Definition: qbrush.h:76
Q_GUI_EXPORT bool qt_isExtendedRadialGradient(const QBrush &brush)
Definition: qbrush.cpp:881

◆ needsEmulation() [2/2]

bool QVGPaintEnginePrivate::needsEmulation ( ) const
inline

Definition at line 287 of file qpaintengine_vg.cpp.

◆ needsPenEmulation()

bool QVGPaintEnginePrivate::needsPenEmulation ( ) const
inline

Definition at line 292 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::drawTextItem().

293  {
295  }

◆ painterPathToVGPath()

VGPath QVGPaintEnginePrivate::painterPathToVGPath ( const QPainterPath path)

Definition at line 780 of file qpaintengine_vg.cpp.

Referenced by QVGFontEngineCleaner::fontEngineDestroyed().

781 {
782  int count = path.elementCount();
783 
784  VGPath vgpath = vgCreatePath(VG_PATH_FORMAT_STANDARD,
785  VG_PATH_DATATYPE_F,
786  1.0f, // scale
787  0.0f, // bias
788  count + 1, // segmentCapacityHint
789  count * 2, // coordCapacityHint
790  VG_PATH_CAPABILITY_ALL);
791 
792  if (count == 0)
793  return vgpath;
794 
795  const QPainterPath::Element *elements = &(path.elementAt(0));
796 
797  // Sizes chosen so that drawRoundedRect() paths fit in these arrays.
800 
801  int curvePos = 0;
802  QPointF temp;
803 
804  // Keep track of the start and end of each sub-path. QPainterPath
805  // does not have an "implicit close" flag like QVectorPath does.
806  // We therefore have to detect closed paths by looking for a LineTo
807  // element that connects back to the initial MoveTo element.
808  qreal startx = 0.0;
809  qreal starty = 0.0;
810  qreal endx = 0.0;
811  qreal endy = 0.0;
812  bool haveStart = false;
813  bool haveEnd = false;
814 
815  if (simpleTransform) {
816  // Convert the members of the element array.
817  for (int i = 0; i < count; ++i) {
818  switch (elements[i].type) {
819 
821  {
822  if (haveStart && haveEnd && startx == endx && starty == endy) {
823  // Implicitly close the previous sub-path.
824  segments.append(VG_CLOSE_PATH);
825  }
826  startx = elements[i].x;
827  starty = elements[i].y;
828  coords.append(startx);
829  coords.append(starty);
830  haveStart = true;
831  haveEnd = false;
832  segments.append(VG_MOVE_TO_ABS);
833  }
834  break;
835 
837  {
838  endx = elements[i].x;
839  endy = elements[i].y;
840  coords.append(endx);
841  coords.append(endy);
842  haveEnd = true;
843  segments.append(VG_LINE_TO_ABS);
844  }
845  break;
846 
848  {
849  coords.append(elements[i].x);
850  coords.append(elements[i].y);
851  haveEnd = false;
852  curvePos = 2;
853  }
854  break;
855 
857  {
858  coords.append(elements[i].x);
859  coords.append(elements[i].y);
860  haveEnd = false;
861  curvePos += 2;
862  if (curvePos == 6) {
863  curvePos = 0;
864  segments.append(VG_CUBIC_TO_ABS);
865  }
866  }
867  break;
868 
869  }
870  }
871  } else {
872  // Convert the members of the element array after applying the
873  // current transform to the path locally.
874  for (int i = 0; i < count; ++i) {
875  switch (elements[i].type) {
876 
878  {
879  if (haveStart && haveEnd && startx == endx && starty == endy) {
880  // Implicitly close the previous sub-path.
881  segments.append(VG_CLOSE_PATH);
882  }
883  temp = transform.map(QPointF(elements[i].x, elements[i].y));
884  startx = temp.x();
885  starty = temp.y();
886  coords.append(startx);
887  coords.append(starty);
888  haveStart = true;
889  haveEnd = false;
890  segments.append(VG_MOVE_TO_ABS);
891  }
892  break;
893 
895  {
896  temp = transform.map(QPointF(elements[i].x, elements[i].y));
897  endx = temp.x();
898  endy = temp.y();
899  coords.append(endx);
900  coords.append(endy);
901  haveEnd = true;
902  segments.append(VG_LINE_TO_ABS);
903  }
904  break;
905 
907  {
908  temp = transform.map(QPointF(elements[i].x, elements[i].y));
909  coords.append(temp.x());
910  coords.append(temp.y());
911  haveEnd = false;
912  curvePos = 2;
913  }
914  break;
915 
917  {
918  temp = transform.map(QPointF(elements[i].x, elements[i].y));
919  coords.append(temp.x());
920  coords.append(temp.y());
921  haveEnd = false;
922  curvePos += 2;
923  if (curvePos == 6) {
924  curvePos = 0;
925  segments.append(VG_CUBIC_TO_ABS);
926  }
927  }
928  break;
929 
930  }
931  }
932  }
933 
934  if (haveStart && haveEnd && startx == endx && starty == endy) {
935  // Implicitly close the last sub-path.
936  segments.append(VG_CLOSE_PATH);
937  }
938 
939  vgAppendPathData(vgpath, segments.count(),
940  segments.constData(), coords.constData());
941 
942  return vgpath;
943 }
The QPainterPath::Element class specifies the position and type of a subpath.
Definition: qpainterpath.h:77
const T * constData() const
int type
Definition: qmetatype.cpp:239
double qreal
Definition: qglobal.h:1193
The QPointF class defines a point in the plane using floating point precision.
Definition: qpoint.h:214
qreal y
the y coordinate of the element&#39;s position.
Definition: qpainterpath.h:80
void append(const T &t)
const QPainterPath::Element & elementAt(int i) const
Returns the element at the given index in the painter path.
Definition: qpainterpath.h:402
qreal x() const
Returns the x-coordinate of this point.
Definition: qpoint.h:282
QPoint map(const QPoint &p) const
Creates and returns a QPoint object that is a copy of the given point, mapped into the coordinate sys...
int count() const
qreal x
the x coordinate of the element&#39;s position.
Definition: qpainterpath.h:79
qreal y() const
Returns the y-coordinate of this point.
Definition: qpoint.h:287
static const QTextHtmlElement elements[Html_NumElements]
int elementCount() const
Returns the number of path elements in the painter path.
Definition: qpainterpath.h:397

◆ roundedRectPath()

VGPath QVGPaintEnginePrivate::roundedRectPath ( const QRectF rect,
qreal  xRadius,
qreal  yRadius,
Qt::SizeMode  mode 
)

Definition at line 945 of file qpaintengine_vg.cpp.

946 {
947  static VGubyte roundedrect_types[] = {
948  VG_MOVE_TO_ABS,
949  VG_LINE_TO_ABS,
950  VG_CUBIC_TO_ABS,
951  VG_LINE_TO_ABS,
952  VG_CUBIC_TO_ABS,
953  VG_LINE_TO_ABS,
954  VG_CUBIC_TO_ABS,
955  VG_LINE_TO_ABS,
956  VG_CUBIC_TO_ABS,
957  VG_CLOSE_PATH
958  };
959 
960  qreal x1 = rect.left();
961  qreal x2 = rect.right();
962  qreal y1 = rect.top();
963  qreal y2 = rect.bottom();
964 
965  if (mode == Qt::RelativeSize) {
966  xRadius = xRadius * rect.width() / 200.;
967  yRadius = yRadius * rect.height() / 200.;
968  }
969 
970  xRadius = qMin(xRadius, rect.width() / 2);
971  yRadius = qMin(yRadius, rect.height() / 2);
972 
973  VGfloat pts[] = {
974  x1 + xRadius, y1, // MoveTo
975  x2 - xRadius, y1, // LineTo
976  x2 - (1 - KAPPA) * xRadius, y1, // CurveTo
977  x2, y1 + (1 - KAPPA) * yRadius,
978  x2, y1 + yRadius,
979  x2, y2 - yRadius, // LineTo
980  x2, y2 - (1 - KAPPA) * yRadius, // CurveTo
981  x2 - (1 - KAPPA) * xRadius, y2,
982  x2 - xRadius, y2,
983  x1 + xRadius, y2, // LineTo
984  x1 + (1 - KAPPA) * xRadius, y2, // CurveTo
985  x1, y2 - (1 - KAPPA) * yRadius,
986  x1, y2 - yRadius,
987  x1, y1 + yRadius, // LineTo
988  x1, y1 + (1 - KAPPA) * yRadius, // CurveTo
989  x1 + (1 - KAPPA) * xRadius, y1,
990  x1 + xRadius, y1
991  };
992 
993 #if !defined(QVG_NO_MODIFY_PATH)
994  VGPath vgpath = roundRectPath;
995  if (!vgpath) {
996  vgpath = vgCreatePath(VG_PATH_FORMAT_STANDARD,
997  VG_PATH_DATATYPE_F,
998  1.0f, // scale
999  0.0f, // bias
1000  10, // segmentCapacityHint
1001  17 * 2, // coordCapacityHint
1002  VG_PATH_CAPABILITY_ALL);
1003  vgAppendPathData(vgpath, 10, roundedrect_types, pts);
1004  roundRectPath = vgpath;
1005  } else {
1006  vgModifyPathCoords(vgpath, 0, 9, pts);
1007  }
1008 #else
1009  VGPath vgpath = vgCreatePath(VG_PATH_FORMAT_STANDARD,
1010  VG_PATH_DATATYPE_F,
1011  1.0f, // scale
1012  0.0f, // bias
1013  10, // segmentCapacityHint
1014  17 * 2, // coordCapacityHint
1015  VG_PATH_CAPABILITY_ALL);
1016  vgAppendPathData(vgpath, 10, roundedrect_types, pts);
1017 #endif
1018 
1019  return vgpath;
1020 }
qreal right() const
Returns the x-coordinate of the rectangle&#39;s right edge.
Definition: qrect.h:527
double qreal
Definition: qglobal.h:1193
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
qreal left() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:525
#define KAPPA
Definition: qbezier.cpp:370
qreal height() const
Returns the height of the rectangle.
Definition: qrect.h:710
qreal width() const
Returns the width of the rectangle.
Definition: qrect.h:707
qreal top() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:526
qreal bottom() const
Returns the y-coordinate of the rectangle&#39;s bottom edge.
Definition: qrect.h:528

◆ setBlendMode()

void QVGPaintEnginePrivate::setBlendMode ( VGBlendMode  mode)
inline

Definition at line 341 of file qpaintengine_vg.cpp.

Referenced by QVGCompositionHelper::startCompositing().

342 {
343  if (blendMode != mode) {
344  vgSeti(VG_BLEND_MODE, mode);
345  blendMode = mode;
346  }
347 }

◆ setBrush()

VGPaintType QVGPaintEnginePrivate::setBrush ( VGPaint  paint,
const QBrush brush,
VGMatrixMode  mode,
VGPaintType  prevPaintType 
)

Definition at line 1178 of file qpaintengine_vg.cpp.

Referenced by toVGImageWithOpacitySubRect().

1180 {
1181  VGfloat values[5];
1182  setBrushTransform(brush, mode);
1183 
1184  // Reset the paint pattern on the brush, which will discard
1185  // the previous VGImage if one was set.
1186  if (prevType == VG_PAINT_TYPE_PATTERN || prevType == (VGPaintType)0)
1187  vgPaintPattern(paint, VG_INVALID_HANDLE);
1188 
1189  switch (brush.style()) {
1190 
1191  case Qt::SolidPattern: {
1192  // The brush is a solid color.
1193  QColor color(brush.color());
1194  values[0] = color.redF();
1195  values[1] = color.greenF();
1196  values[2] = color.blueF();
1197  values[3] = color.alphaF() * opacity;
1198  if (prevType != VG_PAINT_TYPE_COLOR)
1199  vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR);
1200  vgSetParameterfv(paint, VG_PAINT_COLOR, 4, values);
1201  return VG_PAINT_TYPE_COLOR;
1202  }
1203 
1205  // The brush is a linear gradient.
1207  const QLinearGradient *grad =
1208  static_cast<const QLinearGradient*>(brush.gradient());
1209  values[0] = grad->start().x();
1210  values[1] = grad->start().y();
1211  values[2] = grad->finalStop().x();
1212  values[3] = grad->finalStop().y();
1213  if (prevType != VG_PAINT_TYPE_LINEAR_GRADIENT)
1214  vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_LINEAR_GRADIENT);
1215  vgSetParameterfv(paint, VG_PAINT_LINEAR_GRADIENT, 4, values);
1216  setupColorRamp(grad, paint);
1217  return VG_PAINT_TYPE_LINEAR_GRADIENT;
1218  }
1219 
1221  // The brush is a radial gradient.
1223  const QRadialGradient *grad =
1224  static_cast<const QRadialGradient*>(brush.gradient());
1225  values[0] = grad->center().x();
1226  values[1] = grad->center().y();
1227  values[2] = grad->focalPoint().x();
1228  values[3] = grad->focalPoint().y();
1229  values[4] = grad->radius();
1230  if (prevType != VG_PAINT_TYPE_RADIAL_GRADIENT)
1231  vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_RADIAL_GRADIENT);
1232  vgSetParameterfv(paint, VG_PAINT_RADIAL_GRADIENT, 5, values);
1233  setupColorRamp(grad, paint);
1234  return VG_PAINT_TYPE_RADIAL_GRADIENT;
1235  }
1236 
1237  case Qt::TexturePattern: {
1238  // The brush is a texture specified by a QPixmap/QImage.
1239  QPixmapData *pd = brush.texture().pixmapData();
1240  if (!pd)
1241  break; // null QPixmap
1242  VGImage vgImg;
1243  bool deref = false;
1244  if (pd->pixelType() == QPixmapData::BitmapType) {
1245  // Colorize bitmaps using the brush color and opacity.
1246  QColor color = brush.color();
1247  if (opacity != 1.0)
1248  color.setAlphaF(color.alphaF() * opacity);
1249  QImage image = colorizeBitmap(*(pd->buffer()), color);
1250  vgImg = toVGImage(image);
1251  deref = true;
1252  } else if (opacity == 1.0) {
1253  if (pd->classId() == QPixmapData::OpenVGClass) {
1254  QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd);
1255  vgImg = vgpd->toVGImage();
1256 
1257  // We don't want the pool to reclaim this image
1258  // because we cannot predict when the paint object
1259  // will stop using it. Replacing the image with
1260  // new data will make the paint object invalid.
1261  vgpd->detachImageFromPool();
1262  } else {
1263  vgImg = toVGImage(*(pd->buffer()));
1264  deref = true;
1265  }
1266  } else if (pd->classId() == QPixmapData::OpenVGClass) {
1267  QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd);
1268  vgImg = vgpd->toVGImage(opacity);
1269  vgpd->detachImageFromPool();
1270  } else {
1271  vgImg = toVGImageWithOpacity(*(pd->buffer()), opacity);
1272  deref = true;
1273  }
1274  if (vgImg == VG_INVALID_HANDLE)
1275  break;
1276  if (prevType != VG_PAINT_TYPE_PATTERN)
1277  vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_PATTERN);
1278  vgSetParameteri(paint, VG_PAINT_PATTERN_TILING_MODE, VG_TILE_REPEAT);
1279  vgPaintPattern(paint, vgImg);
1280  if (deref)
1281  vgDestroyImage(vgImg); // Will be valid until pattern is destroyed.
1282  return VG_PAINT_TYPE_PATTERN;
1283  }
1284 
1286  // Convert conical gradients into the first stop color.
1287  qWarning() << "QVGPaintEnginePrivate::setBrush: conical gradients are not supported by OpenVG";
1289  const QConicalGradient *grad =
1290  static_cast<const QConicalGradient*>(brush.gradient());
1291  const QGradientStops stops = grad->stops();
1292  QColor color;
1293  if (stops.size() > 0)
1294  color = stops[0].second;
1295  values[0] = color.redF();
1296  values[1] = color.greenF();
1297  values[2] = color.blueF();
1298  values[3] = color.alphaF() * opacity;
1299  if (prevType != VG_PAINT_TYPE_COLOR)
1300  vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR);
1301  vgSetParameterfv(paint, VG_PAINT_COLOR, 4, values);
1302  return VG_PAINT_TYPE_COLOR;
1303  }
1304 
1305  case Qt::Dense1Pattern:
1306  case Qt::Dense2Pattern:
1307  case Qt::Dense3Pattern:
1308  case Qt::Dense4Pattern:
1309  case Qt::Dense5Pattern:
1310  case Qt::Dense6Pattern:
1311  case Qt::Dense7Pattern:
1312  case Qt::HorPattern:
1313  case Qt::VerPattern:
1314  case Qt::CrossPattern:
1315  case Qt::BDiagPattern:
1316  case Qt::FDiagPattern:
1317  case Qt::DiagCrossPattern: {
1318  // The brush is a traditional dotted or cross-hatched pattern brush.
1319  QColor color = brush.color();
1320  if (opacity != 1.0)
1321  color.setAlphaF(color.alphaF() * opacity);
1322  QImage image = colorizeBitmap
1323  (qt_imageForBrush(brush.style(), true), color);
1324  VGImage vgImg = toVGImage(image);
1325  if (prevType != VG_PAINT_TYPE_PATTERN)
1326  vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_PATTERN);
1327  vgSetParameteri(paint, VG_PAINT_PATTERN_TILING_MODE, VG_TILE_REPEAT);
1328  vgPaintPattern(paint, vgImg);
1329  vgDestroyImage(vgImg); // Will stay valid until pattern is destroyed.
1330  return VG_PAINT_TYPE_PATTERN;
1331  }
1332 
1333  default: break;
1334  }
1335  return (VGPaintType)0;
1336 }
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
qreal alphaF() const
Returns the alpha color component of this color.
Definition: qcolor.cpp:1106
const QColor & color() const
Returns the brush color.
Definition: qbrush.h:183
void setBrushTransform(const QBrush &brush, VGMatrixMode mode)
qreal greenF() const
Returns the green color component of this color.
Definition: qcolor.cpp:1241
const QGradient * gradient() const
Returns the gradient describing this brush.
Definition: qbrush.cpp:871
The QConicalGradient class is used in combination with QBrush to specify a conical gradient brush...
Definition: qbrush.h:329
static VGImage toVGImageWithOpacity(const QImage &image, qreal opacity)
The QRadialGradient class is used in combination with QBrush to specify a radial gradient brush...
Definition: qbrush.h:297
static QImage colorizeBitmap(const QImage &image, const QColor &color)
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
qreal x() const
Returns the x-coordinate of this point.
Definition: qpoint.h:282
Q_GUI_EXPORT QImage qt_imageForBrush(int style, bool invert)
Definition: qbrush.cpp:167
PixelType pixelType() const
virtual VGImage toVGImage()
Q_CORE_EXPORT void qWarning(const char *,...)
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
void setupColorRamp(const QGradient *grad, VGPaint paint)
ClassId classId() const
Qt::BrushStyle style() const
Returns the brush style.
Definition: qbrush.h:182
QPixmap texture() const
Returns the custom brush pattern, or a null pixmap if no custom brush pattern has been set...
Definition: qbrush.cpp:785
quint16 values[128]
QPointF start() const
Returns the start point of this linear gradient in logical coordinates.
Definition: qbrush.cpp:1796
static VGImage toVGImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
void setAlphaF(qreal alpha)
Sets the alpha of this color to alpha.
Definition: qcolor.cpp:1117
Type type() const
Returns the type of gradient.
Definition: qbrush.h:232
The QLinearGradient class is used in combination with QBrush to specify a linear gradient brush...
Definition: qbrush.h:280
qreal redF() const
Returns the red color component of this color.
Definition: qcolor.cpp:1213
qreal blueF() const
Returns the blue color component of this color.
Definition: qcolor.cpp:1269
QPointF center() const
Returns the center of this radial gradient in logical coordinates.
Definition: qbrush.cpp:2102
virtual QImage * buffer()
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137
virtual void detachImageFromPool()
QPixmapData * pixmapData() const
Definition: qpixmap.cpp:2277

◆ setBrushTransform()

void QVGPaintEnginePrivate::setBrushTransform ( const QBrush brush,
VGMatrixMode  mode 
)

Definition at line 1381 of file qpaintengine_vg.cpp.

Referenced by setBrush(), and setPenParams().

1382 {
1383  // Compute the new brush transformation matrix.
1384  QTransform transform(brush.transform());
1385  if (brushOrigin.x() != 0.0f || brushOrigin.y() != 0.0f)
1387 
1388  // Bail out if the matrix is the same as last time, to avoid
1389  // updating the VG context state unless absolutely necessary.
1390  // Most applications won't have a brush transformation set,
1391  // which will leave the VG setting at its default of identity.
1392  // Always change the transform if coming out of raw VG mode.
1393  if (mode == VG_MATRIX_FILL_PAINT_TO_USER) {
1394  if (!rawVG && transform == brushTransform)
1395  return;
1397  } else {
1398  if (!rawVG && transform == penTransform)
1399  return;
1401  }
1402 
1403  // Set the brush transformation matrix.
1404  if (mode != matrixMode) {
1405  vgSeti(VG_MATRIX_MODE, mode);
1406  matrixMode = mode;
1407  }
1408  if (transform.isIdentity()) {
1409  vgLoadIdentity();
1410  } else {
1411  VGfloat mat[9];
1412  mat[0] = transform.m11();
1413  mat[1] = transform.m12();
1414  mat[2] = transform.m13();
1415  mat[3] = transform.m21();
1416  mat[4] = transform.m22();
1417  mat[5] = transform.m23();
1418  mat[6] = transform.m31();
1419  mat[7] = transform.m32();
1420  mat[8] = transform.m33();
1421  vgLoadMatrix(mat);
1422  }
1423 }
qreal m32() const
Returns the vertical translation factor.
Definition: qtransform.h:265
qreal m21() const
Returns the horizontal shearing factor.
Definition: qtransform.h:249
qreal m22() const
Returns the vertical scaling factor.
Definition: qtransform.h:253
QTransform & translate(qreal dx, qreal dy)
Moves the coordinate system dx along the x axis and dy along the y axis, and returns a reference to t...
Definition: qtransform.cpp:417
QTransform transform() const
Returns the current transformation matrix for the brush.
Definition: qbrush.h:185
qreal x() const
Returns the x-coordinate of this point.
Definition: qpoint.h:282
bool isIdentity() const
Returns true if the matrix is the identity matrix, otherwise returns false.
Definition: qtransform.h:204
qreal m12() const
Returns the vertical shearing factor.
Definition: qtransform.h:241
qreal m31() const
Returns the horizontal translation factor.
Definition: qtransform.h:261
qreal m23() const
Returns the vertical projection factor.
Definition: qtransform.h:257
qreal y() const
Returns the y-coordinate of this point.
Definition: qpoint.h:287
qreal m13() const
Returns the horizontal projection factor.
Definition: qtransform.h:245
qreal m11() const
Returns the horizontal scaling factor.
Definition: qtransform.h:237
qreal m33() const
Returns the division factor.
Definition: qtransform.h:269
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65

◆ setFillRule()

void QVGPaintEnginePrivate::setFillRule ( VGint  mode)
inline

Definition at line 349 of file qpaintengine_vg.cpp.

Referenced by QVGCompositionHelper::fillBackground().

350 {
351  if (fillRule != mode) {
352  fillRule = mode;
353  vgSeti(VG_FILL_RULE, mode);
354  }
355 }

◆ setImageMode()

void QVGPaintEnginePrivate::setImageMode ( VGImageMode  mode)
inline

Definition at line 316 of file qpaintengine_vg.cpp.

Referenced by QVGCompositionHelper::blitWindow(), QVGPaintEngine::drawCachedGlyphs(), QVGCompositionHelper::drawCursorPixmap(), QVGPaintEngine::drawPixmapFragments(), and qt_vg_drawVGImageStencil().

317 {
318  if (imageMode != mode) {
319  imageMode = mode;
320  vgSeti(VG_IMAGE_MODE, mode);
321  }
322 }

◆ setImageOptions()

void QVGPaintEnginePrivate::setImageOptions ( )

Definition at line 3107 of file qpaintengine_vg.cpp.

Referenced by drawImageTiled(), and drawVGImage().

3108 {
3109  if (opacity != 1.0f && simpleTransform) {
3110  if (opacity != paintOpacity) {
3111  VGfloat values[4];
3112  values[0] = 1.0f;
3113  values[1] = 1.0f;
3114  values[2] = 1.0f;
3115  values[3] = opacity;
3116  vgSetParameterfv(opacityPaint, VG_PAINT_COLOR, 4, values);
3118  }
3119  if (fillPaint != opacityPaint) {
3120  vgSetPaint(opacityPaint, VG_FILL_PATH);
3122  }
3123  setImageMode(VG_DRAW_IMAGE_MULTIPLY);
3124  } else {
3125  setImageMode(VG_DRAW_IMAGE_NORMAL);
3126  }
3127 }
void setImageMode(VGImageMode mode)
quint16 values[128]

◆ setImageQuality()

void QVGPaintEnginePrivate::setImageQuality ( VGImageQuality  mode)
inline

Definition at line 333 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::drawCachedGlyphs(), and drawImageTiled().

334 {
335  if (imageQuality != mode) {
336  vgSeti(VG_IMAGE_QUALITY, mode);
337  imageQuality = mode;
338  }
339 }
VGImageQuality imageQuality

◆ setPenParams()

void QVGPaintEnginePrivate::setPenParams ( const QPen pen)

Definition at line 1338 of file qpaintengine_vg.cpp.

1339 {
1340  // Note: OpenVG does not support zero-width or cosmetic pens,
1341  // so we have to simulate cosmetic pens by reversing the scale.
1342  VGfloat width = pen.widthF();
1343  if (width <= 0.0f)
1344  width = 1.0f;
1345  if (pen.isCosmetic()) {
1346  if (penScale != 1.0 && penScale != 0.0)
1347  width /= penScale;
1348  }
1349  vgSetf(VG_STROKE_LINE_WIDTH, width);
1350 
1351  if (pen.capStyle() == Qt::FlatCap)
1352  vgSetf(VG_STROKE_CAP_STYLE, VG_CAP_BUTT);
1353  else if (pen.capStyle() == Qt::SquareCap)
1354  vgSetf(VG_STROKE_CAP_STYLE, VG_CAP_SQUARE);
1355  else
1356  vgSetf(VG_STROKE_CAP_STYLE, VG_CAP_ROUND);
1357 
1358  if (pen.joinStyle() == Qt::MiterJoin) {
1359  vgSetf(VG_STROKE_JOIN_STYLE, VG_JOIN_MITER);
1360  vgSetf(VG_STROKE_MITER_LIMIT, pen.miterLimit());
1361  } else if (pen.joinStyle() == Qt::BevelJoin) {
1362  vgSetf(VG_STROKE_JOIN_STYLE, VG_JOIN_BEVEL);
1363  } else {
1364  vgSetf(VG_STROKE_JOIN_STYLE, VG_JOIN_ROUND);
1365  }
1366 
1367  if (pen.style() == Qt::SolidLine) {
1368  vgSetfv(VG_STROKE_DASH_PATTERN, 0, NULL);
1369  } else {
1370  const QVector<qreal> dashPattern = pen.dashPattern();
1371  QVector<VGfloat> currentDashPattern(dashPattern.count());
1372  for (int i = 0; i < dashPattern.count(); ++i)
1373  currentDashPattern[i] = dashPattern[i] * width;
1374  vgSetfv(VG_STROKE_DASH_PATTERN, currentDashPattern.count(), currentDashPattern.data());
1375  vgSetf(VG_STROKE_DASH_PHASE, pen.dashOffset());
1376  vgSetf(VG_STROKE_DASH_PHASE_RESET, VG_FALSE);
1377  }
1378 }
int count(const T &t) const
Returns the number of occurrences of value in the vector.
Definition: qvector.h:742
Qt::PenStyle style() const
Returns the pen style.
Definition: qpen.cpp:428
QVector< qreal > dashPattern() const
Returns the dash pattern of this pen.
Definition: qpen.cpp:466
bool isCosmetic() const
Returns true if the pen is cosmetic; otherwise returns false.
Definition: qpen.cpp:840
Qt::PenJoinStyle joinStyle() const
Returns the pen&#39;s join style.
Definition: qpen.cpp:736
qreal miterLimit() const
Returns the miter limit of the pen.
Definition: qpen.cpp:589
qreal widthF() const
Returns the pen width with floating point precision.
Definition: qpen.cpp:645
qreal dashOffset() const
Returns the dash offset for the pen.
Definition: qpen.cpp:547
Qt::PenCapStyle capStyle() const
Returns the pen&#39;s cap style.
Definition: qpen.cpp:706

◆ setRenderingQuality()

void QVGPaintEnginePrivate::setRenderingQuality ( VGRenderingQuality  mode)
inline

Definition at line 324 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::drawCachedGlyphs(), and drawImageTiled().

325 {
326  if (renderingQuality != mode) {
327  vgSeti(VG_RENDERING_QUALITY, mode);
328  renderingQuality = mode;
329  pathTransformSet = false; // need to tweak transform for aliased stroking
330  }
331 }
VGRenderingQuality renderingQuality

◆ setTransform()

void QVGPaintEnginePrivate::setTransform ( VGMatrixMode  mode,
const QTransform transform 
)

Definition at line 535 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::beginNativePainting(), QVGCompositionHelper::blitWindow(), destroy(), QVGPaintEngine::drawCachedGlyphs(), QVGCompositionHelper::drawCursorPixmap(), drawImageTiled(), QVGPaintEngine::drawPixmapFragments(), drawVGImage(), QVGCompositionHelper::fillBackground(), and qt_vg_drawVGImageStencil().

536 {
537  VGfloat mat[9];
538  if (mode != matrixMode) {
539  vgSeti(VG_MATRIX_MODE, mode);
540  matrixMode = mode;
541  }
542  mat[0] = transform.m11();
543  mat[1] = transform.m12();
544  mat[2] = transform.m13();
545  mat[3] = transform.m21();
546  mat[4] = transform.m22();
547  mat[5] = transform.m23();
548  mat[6] = transform.m31();
549  mat[7] = transform.m32();
550  mat[8] = transform.m33();
551  vgLoadMatrix(mat);
552 }
qreal m32() const
Returns the vertical translation factor.
Definition: qtransform.h:265
qreal m21() const
Returns the horizontal shearing factor.
Definition: qtransform.h:249
qreal m22() const
Returns the vertical scaling factor.
Definition: qtransform.h:253
qreal m12() const
Returns the vertical shearing factor.
Definition: qtransform.h:241
qreal m31() const
Returns the horizontal translation factor.
Definition: qtransform.h:261
qreal m23() const
Returns the vertical projection factor.
Definition: qtransform.h:257
qreal m13() const
Returns the horizontal projection factor.
Definition: qtransform.h:245
qreal m11() const
Returns the horizontal scaling factor.
Definition: qtransform.h:237
qreal m33() const
Returns the division factor.
Definition: qtransform.h:269

◆ setupColorRamp()

void QVGPaintEnginePrivate::setupColorRamp ( const QGradient grad,
VGPaint  paint 
)

Definition at line 1425 of file qpaintengine_vg.cpp.

Referenced by setBrush().

1426 {
1427  QGradient::Spread spread = grad->spread();
1428  VGColorRampSpreadMode spreadMode;
1429  if (spread == QGradient::ReflectSpread)
1430  spreadMode = VG_COLOR_RAMP_SPREAD_REFLECT;
1431  else if (spread == QGradient::RepeatSpread)
1432  spreadMode = VG_COLOR_RAMP_SPREAD_REPEAT;
1433  else
1434  spreadMode = VG_COLOR_RAMP_SPREAD_PAD;
1435 
1436  const QGradientStops stops = grad->stops();
1437  int n = 5*stops.size();
1438  QVector<VGfloat> fill_stops(n);
1439 
1440  for (int i = 0; i < stops.size(); ++i ) {
1441  QColor col = stops[i].second;
1442  fill_stops[i*5] = stops[i].first;
1443  fill_stops[i*5 + 1] = col.redF();
1444  fill_stops[i*5 + 2] = col.greenF();
1445  fill_stops[i*5 + 3] = col.blueF();
1446  fill_stops[i*5 + 4] = col.alphaF() * opacity;
1447  }
1448 
1449  vgSetParameteri(paint, VG_PAINT_COLOR_RAMP_SPREAD_MODE, spreadMode);
1450  vgSetParameteri(paint, VG_PAINT_COLOR_RAMP_PREMULTIPLIED, VG_FALSE);
1451  vgSetParameterfv(paint, VG_PAINT_COLOR_RAMP_STOPS, n, fill_stops.data());
1452 }
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
qreal alphaF() const
Returns the alpha color component of this color.
Definition: qcolor.cpp:1106
qreal greenF() const
Returns the green color component of this color.
Definition: qcolor.cpp:1241
T & first()
Returns a reference to the first item in the vector.
Definition: qvector.h:260
QGradientStops stops() const
Returns the stop points for this gradient.
Definition: qbrush.cpp:1520
Spread
Specifies how the area outside the gradient area should be filled.
Definition: qbrush.h:213
qreal redF() const
Returns the red color component of this color.
Definition: qcolor.cpp:1213
qreal blueF() const
Returns the blue color component of this color.
Definition: qcolor.cpp:1269
Spread spread() const
Returns the spread method use by this gradient.
Definition: qbrush.h:235
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137

◆ stroke()

void QVGPaintEnginePrivate::stroke ( VGPath  path,
const QPen pen 
)

Definition at line 1517 of file qpaintengine_vg.cpp.

1518 {
1519  if (pen.style() == Qt::NoPen)
1520  return;
1521  ensurePen(pen);
1523  vgDrawPath(path, VG_STROKE_PATH);
1524 }
Qt::PenStyle style() const
Returns the pen style.
Definition: qpen.cpp:428
void ensurePen(const QPen &pen)

◆ systemStateChanged()

void QVGPaintEnginePrivate::systemStateChanged ( )
virtual

Reimplemented from QPaintEnginePrivate.

Definition at line 3129 of file qpaintengine_vg.cpp.

3130 {
3131  q->updateScissor();
3132 }

◆ updateTransform()

void QVGPaintEnginePrivate::updateTransform ( QPaintDevice pdev)

Definition at line 556 of file qpaintengine_vg.cpp.

557 {
558  VGfloat devh = pdev->height();
559 
560  // Construct the VG transform by combining the Qt transform with
561  // the following viewport transformation:
562  // | 1 0 0 |
563  // | 0 -1 devh |
564  // | 0 0 1 |
565  // The full VG transform is effectively:
566  // 1. Apply the user's transformation matrix.
567  // 2. Flip the co-ordinate system upside down.
568  QTransform viewport(1.0f, 0.0f, 0.0f,
569  0.0f, -1.0f, 0.0f,
570  0.0f, devh, 1.0f);
571 
572  // Compute the path transform and determine if it is projective.
573  pathTransform = transform * viewport;
574  bool projective = (pathTransform.m13() != 0.0f ||
575  pathTransform.m23() != 0.0f ||
576  pathTransform.m33() != 1.0f);
577  if (projective) {
578  // The engine cannot do projective path transforms for us,
579  // so we will have to convert the co-ordinates ourselves.
580  // Change the matrix to just the viewport transformation.
581  pathTransform = viewport;
582  simpleTransform = false;
583  } else {
584  simpleTransform = true;
585  }
586  pathTransformSet = false;
587 
588  // The image transform is always the full transformation,
589  imageTransform = transform * viewport;
590 
591  // Calculate the scaling factor to use for turning cosmetic pens
592  // into ordinary non-cosmetic pens.
594 }
int height() const
Definition: qpaintdevice.h:92
qreal m23() const
Returns the vertical projection factor.
Definition: qtransform.h:257
Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale)
qreal m13() const
Returns the horizontal projection factor.
Definition: qtransform.h:245
qreal m33() const
Returns the division factor.
Definition: qtransform.h:269
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65

◆ vectorPathToVGPath()

VGPath QVGPaintEnginePrivate::vectorPathToVGPath ( const QVectorPath path)

Definition at line 596 of file qpaintengine_vg.cpp.

597 {
598  int count = path.elementCount();
599  const qreal *points = path.points();
601 
602  VGPath vgpath = vgCreatePath(VG_PATH_FORMAT_STANDARD,
603  VG_PATH_DATATYPE_F,
604  1.0f, // scale
605  0.0f, // bias
606  count + 1, // segmentCapacityHint
607  count * 2, // coordCapacityHint
608  VG_PATH_CAPABILITY_ALL);
609 
610  // Size is sufficient segments for drawRoundedRect() paths.
612 
613  if (sizeof(qreal) == sizeof(VGfloat) && elements && simpleTransform) {
614  // If Qt was compiled with qreal the same size as VGfloat,
615  // then convert the segment types and use the incoming
616  // points array directly.
617  for (int i = 0; i < count; ++i) {
618  switch (elements[i]) {
619 
621  segments.append(VG_MOVE_TO_ABS); break;
622 
624  segments.append(VG_LINE_TO_ABS); break;
625 
627  segments.append(VG_CUBIC_TO_ABS); break;
628 
630 
631  }
632  }
633  if (path.hasImplicitClose())
634  segments.append(VG_CLOSE_PATH);
635 
636  vgAppendPathData(vgpath, segments.count(), segments.constData(),
637  reinterpret_cast<const VGfloat *>(points));
638 
639  return vgpath;
640  }
641 
642  // Sizes chosen so that drawRoundedRect() paths fit in these arrays.
644 
645  int curvePos = 0;
646  QPointF temp;
647 
648  if (elements && simpleTransform) {
649  // Convert the members of the element array.
650  for (int i = 0; i < count; ++i) {
651  switch (elements[i]) {
652 
654  {
655  coords.append(points[0]);
656  coords.append(points[1]);
657  segments.append(VG_MOVE_TO_ABS);
658  }
659  break;
660 
662  {
663  coords.append(points[0]);
664  coords.append(points[1]);
665  segments.append(VG_LINE_TO_ABS);
666  }
667  break;
668 
670  {
671  coords.append(points[0]);
672  coords.append(points[1]);
673  curvePos = 2;
674  }
675  break;
676 
678  {
679  coords.append(points[0]);
680  coords.append(points[1]);
681  curvePos += 2;
682  if (curvePos == 6) {
683  curvePos = 0;
684  segments.append(VG_CUBIC_TO_ABS);
685  }
686  }
687  break;
688 
689  }
690  points += 2;
691  }
692  } else if (elements && !simpleTransform) {
693  // Convert the members of the element array after applying the
694  // current transform to the path locally.
695  for (int i = 0; i < count; ++i) {
696  switch (elements[i]) {
697 
699  {
700  temp = transform.map(QPointF(points[0], points[1]));
701  coords.append(temp.x());
702  coords.append(temp.y());
703  segments.append(VG_MOVE_TO_ABS);
704  }
705  break;
706 
708  {
709  temp = transform.map(QPointF(points[0], points[1]));
710  coords.append(temp.x());
711  coords.append(temp.y());
712  segments.append(VG_LINE_TO_ABS);
713  }
714  break;
715 
717  {
718  temp = transform.map(QPointF(points[0], points[1]));
719  coords.append(temp.x());
720  coords.append(temp.y());
721  curvePos = 2;
722  }
723  break;
724 
726  {
727  temp = transform.map(QPointF(points[0], points[1]));
728  coords.append(temp.x());
729  coords.append(temp.y());
730  curvePos += 2;
731  if (curvePos == 6) {
732  curvePos = 0;
733  segments.append(VG_CUBIC_TO_ABS);
734  }
735  }
736  break;
737 
738  }
739  points += 2;
740  }
741  } else if (count > 0 && simpleTransform) {
742  // If there is no element array, then the path is assumed
743  // to be a MoveTo followed by several LineTo's.
744  coords.append(points[0]);
745  coords.append(points[1]);
746  segments.append(VG_MOVE_TO_ABS);
747  while (count > 1) {
748  points += 2;
749  coords.append(points[0]);
750  coords.append(points[1]);
751  segments.append(VG_LINE_TO_ABS);
752  --count;
753  }
754  } else if (count > 0 && !simpleTransform) {
755  // Convert a simple path, and apply the transform locally.
756  temp = transform.map(QPointF(points[0], points[1]));
757  coords.append(temp.x());
758  coords.append(temp.y());
759  segments.append(VG_MOVE_TO_ABS);
760  while (count > 1) {
761  points += 2;
762  temp = transform.map(QPointF(points[0], points[1]));
763  coords.append(temp.x());
764  coords.append(temp.y());
765  segments.append(VG_LINE_TO_ABS);
766  --count;
767  }
768  }
769 
770  // Close the path if specified.
771  if (path.hasImplicitClose())
772  segments.append(VG_CLOSE_PATH);
773 
774  vgAppendPathData(vgpath, segments.count(),
775  segments.constData(), coords.constData());
776 
777  return vgpath;
778 }
const T * constData() const
ElementType
This enum describes the types of elements used to connect vertices in subpaths.
Definition: qpainterpath.h:70
double qreal
Definition: qglobal.h:1193
int elementCount() const
The QPointF class defines a point in the plane using floating point precision.
Definition: qpoint.h:214
void append(const T &t)
const QPainterPath::ElementType * elements() const
qreal x() const
Returns the x-coordinate of this point.
Definition: qpoint.h:282
QPoint map(const QPoint &p) const
Creates and returns a QPoint object that is a copy of the given point, mapped into the coordinate sys...
int count() const
const qreal * points() const
bool hasImplicitClose() const
qreal y() const
Returns the y-coordinate of this point.
Definition: qpoint.h:287
static const QTextHtmlElement elements[Html_NumElements]

Properties

◆ blendMode

VGBlendMode QVGPaintEnginePrivate::blendMode

Definition at line 225 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::canVgWritePixels().

◆ blurFilter

QScopedPointer<QPixmapFilter> QVGPaintEnginePrivate::blurFilter

Definition at line 239 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::pixmapFilter().

◆ brushOrigin

QPointF QVGPaintEnginePrivate::brushOrigin

Definition at line 182 of file qpaintengine_vg.cpp.

Referenced by init(), and setBrushTransform().

◆ brushPaint

VGPaint QVGPaintEnginePrivate::brushPaint

Definition at line 166 of file qpaintengine_vg.cpp.

Referenced by destroy(), QVGPaintEngine::endNativePainting(), init(), and initObjects().

◆ brushTransform

QTransform QVGPaintEnginePrivate::brushTransform

Definition at line 211 of file qpaintengine_vg.cpp.

Referenced by setBrushTransform().

◆ brushType

VGPaintType QVGPaintEnginePrivate::brushType

Definition at line 180 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::endNativePainting(), and init().

◆ clearColor

QColor QVGPaintEnginePrivate::clearColor

◆ clearOpacity

VGfloat QVGPaintEnginePrivate::clearOpacity

◆ colorizeFilter

QScopedPointer<QPixmapFilter> QVGPaintEnginePrivate::colorizeFilter

Definition at line 237 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::pixmapFilter().

◆ convolutionFilter

QScopedPointer<QPixmapFilter> QVGPaintEnginePrivate::convolutionFilter

Definition at line 236 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::pixmapFilter().

◆ currentBrush

QBrush QVGPaintEnginePrivate::currentBrush

Definition at line 171 of file qpaintengine_vg.cpp.

◆ currentPen

QPen QVGPaintEnginePrivate::currentPen

Definition at line 170 of file qpaintengine_vg.cpp.

◆ dirty

QPaintEngine::DirtyFlags QVGPaintEnginePrivate::dirty

◆ dropShadowFilter

QScopedPointer<QPixmapFilter> QVGPaintEnginePrivate::dropShadowFilter

Definition at line 238 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::pixmapFilter().

◆ fillPaint

VGPaint QVGPaintEnginePrivate::fillPaint

◆ fillRule

VGint QVGPaintEnginePrivate::fillRule

Definition at line 184 of file qpaintengine_vg.cpp.

Referenced by init(), and QVGPaintEngine::restoreState().

◆ forceBrushChange

bool QVGPaintEnginePrivate::forceBrushChange

Definition at line 174 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::endNativePainting(), and init().

◆ forcePenChange

bool QVGPaintEnginePrivate::forcePenChange

Definition at line 173 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::endNativePainting(), and init().

◆ hasAdvancedBlending

bool QVGPaintEnginePrivate::hasAdvancedBlending

Definition at line 234 of file qpaintengine_vg.cpp.

Referenced by init(), and initObjects().

◆ hasExtendedRadialGradientBrush

bool QVGPaintEnginePrivate::hasExtendedRadialGradientBrush

Definition at line 177 of file qpaintengine_vg.cpp.

Referenced by init().

◆ hasExtendedRadialGradientPen

bool QVGPaintEnginePrivate::hasExtendedRadialGradientPen

Definition at line 176 of file qpaintengine_vg.cpp.

Referenced by init().

◆ imageMode

VGImageMode QVGPaintEnginePrivate::imageMode

Definition at line 214 of file qpaintengine_vg.cpp.

◆ imageQuality

VGImageQuality QVGPaintEnginePrivate::imageQuality

Definition at line 227 of file qpaintengine_vg.cpp.

Referenced by drawImageTiled().

◆ imageTransform

QTransform QVGPaintEnginePrivate::imageTransform

◆ linePath

VGPath QVGPaintEnginePrivate::linePath

Definition at line 191 of file qpaintengine_vg.cpp.

Referenced by destroy(), init(), and initObjects().

◆ maskIsSet

bool QVGPaintEnginePrivate::maskIsSet

Definition at line 204 of file qpaintengine_vg.cpp.

Referenced by init(), and QVGPaintEngine::restoreState().

◆ maskRect

QRect QVGPaintEnginePrivate::maskRect

Definition at line 208 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::restoreState().

◆ maskValid

bool QVGPaintEnginePrivate::maskValid

Definition at line 203 of file qpaintengine_vg.cpp.

Referenced by init(), and QVGPaintEngine::restoreState().

◆ matrixMode

VGMatrixMode QVGPaintEnginePrivate::matrixMode

Definition at line 213 of file qpaintengine_vg.cpp.

Referenced by initObjects(), setBrushTransform(), and setTransform().

◆ maxScissorRects

VGint QVGPaintEnginePrivate::maxScissorRects

Definition at line 163 of file qpaintengine_vg.cpp.

Referenced by init(), initObjects(), and QVGCompositionHelper::setScissor().

◆ opacity

qreal QVGPaintEnginePrivate::opacity

◆ opacityPaint

VGPaint QVGPaintEnginePrivate::opacityPaint

◆ paintOpacity

qreal QVGPaintEnginePrivate::paintOpacity

◆ pathTransform

QTransform QVGPaintEnginePrivate::pathTransform

◆ pathTransformSet

bool QVGPaintEnginePrivate::pathTransformSet

◆ penPaint

VGPaint QVGPaintEnginePrivate::penPaint

Definition at line 165 of file qpaintengine_vg.cpp.

Referenced by destroy(), QVGPaintEngine::endNativePainting(), init(), and initObjects().

◆ penScale

qreal QVGPaintEnginePrivate::penScale

Definition at line 197 of file qpaintengine_vg.cpp.

Referenced by init(), setPenParams(), and updateTransform().

◆ penTransform

QTransform QVGPaintEnginePrivate::penTransform

Definition at line 210 of file qpaintengine_vg.cpp.

Referenced by setBrushTransform().

◆ penType

VGPaintType QVGPaintEnginePrivate::penType

Definition at line 179 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::endNativePainting(), and init().

◆ q

QVGPaintEngine* QVGPaintEnginePrivate::q
private

Definition at line 313 of file qpaintengine_vg.cpp.

◆ rawVG

bool QVGPaintEnginePrivate::rawVG

◆ rectPath

VGPath QVGPaintEnginePrivate::rectPath

Definition at line 190 of file qpaintengine_vg.cpp.

Referenced by destroy(), fillBackgroundRect(), init(), and initObjects().

◆ renderingQuality

VGRenderingQuality QVGPaintEnginePrivate::renderingQuality

Definition at line 226 of file qpaintengine_vg.cpp.

Referenced by drawImageTiled().

◆ roundRectPath

VGPath QVGPaintEnginePrivate::roundRectPath

Definition at line 192 of file qpaintengine_vg.cpp.

Referenced by destroy(), init(), and roundedRectPath().

◆ scissorActive

bool QVGPaintEnginePrivate::scissorActive

◆ scissorDirty

bool QVGPaintEnginePrivate::scissorDirty

◆ scissorMask

bool QVGPaintEnginePrivate::scissorMask

Definition at line 205 of file qpaintengine_vg.cpp.

Referenced by init(), and QVGPaintEngine::restoreState().

◆ scissorRegion

QRegion QVGPaintEnginePrivate::scissorRegion

Definition at line 216 of file qpaintengine_vg.cpp.

Referenced by QVGCompositionHelper::setScissor().

◆ simpleTransform

bool QVGPaintEnginePrivate::simpleTransform

◆ transform

QTransform QVGPaintEnginePrivate::transform

Definition at line 195 of file qpaintengine_vg.cpp.

Referenced by QVGPaintEngine::drawCachedGlyphs(), and setBrushTransform().


The documentation for this class was generated from the following file: