QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Functions
QwtClipper Namespace Reference

Namespace for clipping algorithms. More...

Functions

QWTCORE_EXPORT void clipPolygon (const QRect &, QPolygon &, bool closePolygon=false)
 Sutherland-Hodgman polygon clipping algorithm (integer coordinates)
 
QWTCORE_EXPORT void clipPolygon (const QRectF &, QPolygon &, bool closePolygon=false)
 Sutherland-Hodgman polygon clipping algorithm.
 
QWTCORE_EXPORT void clipPolygonF (const QRectF &, QPolygonF &, bool closePolygon=false)
 Sutherland-Hodgman polygon clipping algorithm (float coordinates)
 
QWTCORE_EXPORT QPolygon clippedPolygon (const QRect &, const QPolygon &, bool closePolygon=false)
 Return clipped polygon (integer rectangle)
 
QWTCORE_EXPORT QPolygon clippedPolygon (const QRectF &, const QPolygon &, bool closePolygon=false)
 Return clipped polygon (float rectangle)
 
QWTCORE_EXPORT QPolygonF clippedPolygonF (const QRectF &, const QPolygonF &, bool closePolygon=false)
 Return clipped float polygon.
 
QWTCORE_EXPORT QVector< QwtIntervalclipCircle (const QRectF &, const QPointF &, double radius)
 Clip circle and return arcs as intervals.
 

Detailed Description

Namespace for clipping algorithms.

Function Documentation

◆ clipCircle()

QVector< QwtInterval > QwtClipper::clipCircle ( const QRectF &  clipRect,
const QPointF &  center,
double  radius 
)

Clip circle and return arcs as intervals.

clipCircle() divides a circle into intervals of angles representing arcs of the circle. When the circle is completely inside the clip rectangle, an interval [0.0, 2π] is returned.

Parameters
clipRectClip rectangle
centerCenter of the circle
radiusRadius of the circle
Returns
Arcs of the circle as angle intervals

◆ clippedPolygon() [1/2]

QPolygon QwtClipper::clippedPolygon ( const QRect &  clipRect,
const QPolygon &  polygon,
bool  closePolygon = false 
)

Return clipped polygon (integer rectangle)

Parameters
clipRectClip rectangle
polygonPolygon to clip
closePolygonTrue if the polygon is closed
Returns
Clipped polygon

◆ clippedPolygon() [2/2]

QPolygon QwtClipper::clippedPolygon ( const QRectF &  clipRect,
const QPolygon &  polygon,
bool  closePolygon = false 
)

Return clipped polygon (float rectangle)

Parameters
clipRectClip rectangle
polygonPolygon to clip
closePolygonTrue if the polygon is closed
Returns
Clipped polygon

◆ clippedPolygonF()

QPolygonF QwtClipper::clippedPolygonF ( const QRectF &  clipRect,
const QPolygonF &  polygon,
bool  closePolygon = false 
)

Return clipped float polygon.

Parameters
clipRectClip rectangle
polygonPolygon to clip
closePolygonTrue if the polygon is closed
Returns
Clipped polygon

◆ clipPolygon() [1/2]

void QwtClipper::clipPolygon ( const QRect &  clipRect,
QPolygon &  polygon,
bool  closePolygon = false 
)

Sutherland-Hodgman polygon clipping algorithm (integer coordinates)

Parameters
clipRectClip rectangle
polygonPolygon to be clipped (modified in place)
closePolygonTrue if the polygon is closed

◆ clipPolygon() [2/2]

void QwtClipper::clipPolygon ( const QRectF &  clipRect,
QPolygon &  polygon,
bool  closePolygon = false 
)

Sutherland-Hodgman polygon clipping algorithm.

Parameters
clipRectClip rectangle
polygonPolygon to be clipped (modified in place)
closePolygonTrue if the polygon is closed

◆ clipPolygonF()

void QwtClipper::clipPolygonF ( const QRectF &  clipRect,
QPolygonF &  polygon,
bool  closePolygon = false 
)

Sutherland-Hodgman polygon clipping algorithm (float coordinates)

Parameters
clipRectClip rectangle
polygonPolygon to be clipped (modified in place)
closePolygonTrue if the polygon is closed