Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QVectorPath Class Reference

#include <qvectorpath_p.h>

+ Inheritance diagram for QVectorPath:
+ Collaboration diagram for QVectorPath:

Classes

struct  CacheEntry
 

Public Types

enum  Hint {
  AreaShapeMask = 0x0001 , NonConvexShapeMask = 0x0002 , CurvedShapeMask = 0x0004 , LinesShapeMask = 0x0008 ,
  RectangleShapeMask = 0x0010 , ShapeMask = 0x001f , LinesHint = LinesShapeMask , RectangleHint = AreaShapeMask | RectangleShapeMask ,
  EllipseHint = AreaShapeMask | CurvedShapeMask , ConvexPolygonHint = AreaShapeMask , PolygonHint = AreaShapeMask | NonConvexShapeMask , RoundedRectHint = AreaShapeMask | CurvedShapeMask ,
  ArbitraryShapeHint = AreaShapeMask | NonConvexShapeMask | CurvedShapeMask , IsCachedHint = 0x0100 , ShouldUseCacheHint = 0x0200 , ControlPointRect = 0x0400 ,
  OddEvenFill = 0x1000 , WindingFill = 0x2000 , ImplicitClose = 0x4000 , ExplicitOpen = 0x8000
}
 

Public Member Functions

 QVectorPath (const qreal *points, int count, const QPainterPath::ElementType *elements=nullptr, uint hints=ArbitraryShapeHint)
 
 ~QVectorPath ()
 
QRectF controlPointRect () const
 
Hint shape () const
 
bool isConvex () const
 
bool isCurved () const
 
bool isCacheable () const
 
bool hasImplicitClose () const
 
bool hasExplicitOpen () const
 
bool hasWindingFill () const
 
void makeCacheable () const
 
uint hints () const
 
const QPainterPath::ElementTypeelements () const
 
const qrealpoints () const
 
bool isEmpty () const
 
int elementCount () const
 
const QPainterPath convertToPainterPath () const
 
CacheEntryaddCacheData (QPaintEngineEx *engine, void *data, qvectorpath_cache_cleanup cleanup) const
 
CacheEntrylookupCacheData (QPaintEngineEx *engine) const
 
bool isRect () const
 

Static Public Member Functions

static uint polygonFlags (QPaintEngine::PolygonDrawMode mode)
 
template<typename T >
static bool isRect (const T *pts, int elementCount)
 

Detailed Description

Definition at line 37 of file qvectorpath_p.h.

Member Enumeration Documentation

◆ Hint

Enumerator
AreaShapeMask 
NonConvexShapeMask 
CurvedShapeMask 
LinesShapeMask 
RectangleShapeMask 
ShapeMask 
LinesHint 
RectangleHint 
EllipseHint 
ConvexPolygonHint 
PolygonHint 
RoundedRectHint 
ArbitraryShapeHint 
IsCachedHint 
ShouldUseCacheHint 
ControlPointRect 
OddEvenFill 
WindingFill 
ImplicitClose 
ExplicitOpen 

Definition at line 40 of file qvectorpath_p.h.

Constructor & Destructor Documentation

◆ QVectorPath()

QVectorPath::QVectorPath ( const qreal * points,
int count,
const QPainterPath::ElementType * elements = nullptr,
uint hints = ArbitraryShapeHint )
inline

Definition at line 71 of file qvectorpath_p.h.

◆ ~QVectorPath()

Member Function Documentation

◆ addCacheData()

QVectorPath::CacheEntry * QVectorPath::addCacheData ( QPaintEngineEx * engine,
void * data,
qvectorpath_cache_cleanup cleanup ) const

Definition at line 78 of file qpaintengineex.cpp.

References QVectorPath::CacheEntry::cleanup, QVectorPath::CacheEntry::data, QVectorPath::CacheEntry::engine, engine, IsCachedHint, lookupCacheData(), QVectorPath::CacheEntry::next, and Q_ASSERT.

+ Here is the call graph for this function:

◆ controlPointRect()

QRectF QVectorPath::controlPointRect ( ) const

◆ convertToPainterPath()

const QPainterPath QVectorPath::convertToPainterPath ( ) const
inline

Definition at line 193 of file qpainterpath_p.h.

References i, QPainterPath::LineToElement, QPainterPath::MoveToElement, Qt::OddEvenFill, OddEvenFill, QList< T >::reserve(), QPainterPath::Element::type, Qt::WindingFill, QPainterPath::Element::x, and QPainterPath::Element::y.

+ Here is the call graph for this function:

◆ elementCount()

int QVectorPath::elementCount ( ) const
inline

Definition at line 102 of file qvectorpath_p.h.

◆ elements()

const QPainterPath::ElementType * QVectorPath::elements ( ) const
inline

Definition at line 98 of file qvectorpath_p.h.

◆ hasExplicitOpen()

bool QVectorPath::hasExplicitOpen ( ) const
inline

Definition at line 92 of file qvectorpath_p.h.

◆ hasImplicitClose()

bool QVectorPath::hasImplicitClose ( ) const
inline

Definition at line 91 of file qvectorpath_p.h.

◆ hasWindingFill()

bool QVectorPath::hasWindingFill ( ) const
inline

Definition at line 93 of file qvectorpath_p.h.

◆ hints()

uint QVectorPath::hints ( ) const
inline

Definition at line 96 of file qvectorpath_p.h.

◆ isCacheable()

bool QVectorPath::isCacheable ( ) const
inline

Definition at line 90 of file qvectorpath_p.h.

◆ isConvex()

bool QVectorPath::isConvex ( ) const
inline

Definition at line 87 of file qvectorpath_p.h.

◆ isCurved()

bool QVectorPath::isCurved ( ) const
inline

Definition at line 88 of file qvectorpath_p.h.

◆ isEmpty()

bool QVectorPath::isEmpty ( ) const
inline

Definition at line 100 of file qvectorpath_p.h.

◆ isRect() [1/2]

bool QVectorPath::isRect ( ) const
inline

Definition at line 149 of file qvectorpath_p.h.

References elements, QPainterPath::LineToElement, QPainterPath::MoveToElement, and RectangleHint.

Referenced by QRasterPaintEngine::drawPolygon(), and QRasterPaintEngine::drawPolygon().

+ Here is the caller graph for this function:

◆ isRect() [2/2]

template<typename T >
static bool QVectorPath::isRect ( const T * pts,
int elementCount )
inlinestatic

Definition at line 135 of file qvectorpath_p.h.

◆ lookupCacheData()

CacheEntry * QVectorPath::lookupCacheData ( QPaintEngineEx * engine) const
inline

Definition at line 124 of file qvectorpath_p.h.

References QVectorPath::CacheEntry::engine, engine, QVectorPath::CacheEntry::next, and Q_ASSERT.

Referenced by addCacheData().

+ Here is the caller graph for this function:

◆ makeCacheable()

void QVectorPath::makeCacheable ( ) const
inline

Definition at line 95 of file qvectorpath_p.h.

◆ points()

const qreal * QVectorPath::points ( ) const
inline

Definition at line 99 of file qvectorpath_p.h.

Referenced by QTriangulator< T >::initialize().

+ Here is the caller graph for this function:

◆ polygonFlags()

static uint QVectorPath::polygonFlags ( QPaintEngine::PolygonDrawMode mode)
inlinestatic

Definition at line 105 of file qvectorpath_p.h.

References QPaintEngine::ConvexMode, QPaintEngine::OddEvenMode, QPaintEngine::PolylineMode, and QPaintEngine::WindingMode.

Referenced by QRasterPaintEngine::drawPolygon(), QPaintEngineEx::drawPolygon(), QRasterPaintEngine::drawPolygon(), QPaintEngineEx::drawPolygon(), and QRasterPaintEngine::fillPolygon().

+ Here is the caller graph for this function:

◆ shape()

Hint QVectorPath::shape ( ) const
inline

Definition at line 86 of file qvectorpath_p.h.


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