Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QPathClipper Class Reference

#include <qpathclipper_p.h>

+ Collaboration diagram for QPathClipper:

Public Types

enum  Operation { BoolAnd , BoolOr , BoolSub , Simplify }
 

Public Member Functions

 QPathClipper (const QPainterPath &subject, const QPainterPath &clip)
 
QPainterPath clip (Operation op=BoolAnd)
 
bool intersect ()
 
bool contains ()
 

Static Public Member Functions

static bool pathToRect (const QPainterPath &path, QRectF *rect=nullptr)
 
static QPainterPath intersect (const QPainterPath &path, const QRectF &rect)
 

Detailed Description

Definition at line 31 of file qpathclipper_p.h.

Member Enumeration Documentation

◆ Operation

Enumerator
BoolAnd 
BoolOr 
BoolSub 
Simplify 

Definition at line 34 of file qpathclipper_p.h.

Constructor & Destructor Documentation

◆ QPathClipper()

QPathClipper::QPathClipper ( const QPainterPath subject,
const QPainterPath clip 
)

Definition at line 1417 of file qpathclipper.cpp.

References QPainterPath::fillRule(), and Qt::WindingFill.

+ Here is the call graph for this function:

Member Function Documentation

◆ clip()

QPainterPath QPathClipper::clip ( Operation  op = BoolAnd)

Definition at line 1495 of file qpathclipper.cpp.

References QPainterPath::addPath(), QPainterPath::addRect(), BoolAnd, BoolOr, BoolSub, QPainterPath::boundingRect(), QRectF::contains(), QPainterPath::fillRule(), intersect(), QRectF::intersects(), list, Qt::OddEvenFill, pathToRect(), QPainterPath::simplified(), Simplify, and Qt::WindingFill.

Referenced by QPainterPath::intersected(), QPainterPath::simplified(), QPainterPath::subtracted(), and QPainterPath::united().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ contains()

bool QPathClipper::contains ( )

Definition at line 1380 of file qpathclipper.cpp.

References QPainterPath::contains(), QRect::contains(), QPainterPath::controlPointRect(), QPainterPath::elementAt(), QPainterPath::elementCount(), QIntersectionFinder::hasIntersections(), QRect::height(), i, QPainterPath::MoveToElement, pathToRect(), qMax(), qMin(), r1, r2, QPainterPath::Element::type, QRect::width(), QRect::x(), and QRect::y().

Referenced by QPainterPath::contains().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ intersect() [1/2]

bool QPathClipper::intersect ( )

Definition at line 1329 of file qpathclipper.cpp.

References QPainterPath::contains(), QRect::contains(), QPainterPath::controlPointRect(), QPainterPath::elementAt(), QPainterPath::elementCount(), QIntersectionFinder::hasIntersections(), QRect::height(), i, QPainterPath::intersects(), QPainterPath::MoveToElement, pathToRect(), qMax(), qMin(), r1, r2, QPainterPath::Element::type, QRect::width(), QRect::x(), and QRect::y().

Referenced by clip(), and QPainterPath::intersects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ intersect() [2/2]

QPainterPath QPathClipper::intersect ( const QPainterPath path,
const QRectF rect 
)
static

Definition at line 2074 of file qpathclipper.cpp.

References rect.

◆ pathToRect()

bool QPathClipper::pathToRect ( const QPainterPath path,
QRectF rect = nullptr 
)
static

Definition at line 1456 of file qpathclipper.cpp.

References rect.

Referenced by clip(), contains(), intersect(), and setClip().

+ Here is the caller graph for this function:

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