Qwt User's Guide svn
Static Public Member Functions
QwtClipper Class Reference

#include <qwt_clipper.h>

List of all members.

Static Public Member Functions

static QVector< QwtIntervalclipCircle (const QRectF &, const QPointF &, double radius)
static QPolygon clipPolygon (const QRect &, const QPolygon &, bool closePolygon=false)
static QPolygonF clipPolygonF (const QRectF &, const QPolygonF &, bool closePolygon=false)

Detailed Description

Some clipping algos.


Member Function Documentation

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

Circle clipping

clipCircle() devides 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 * M_PI] is returned.

Parameters:
clipRectClip rectangle
centerCenter of the circle
radiusRadius of the circle
Returns:
Arcs of the circle
QPolygon QwtClipper::clipPolygon ( const QRect &  clipRect,
const QPolygon &  polygon,
bool  closePolygon = false 
) [static]

Sutherland-Hodgman polygon clipping

Parameters:
clipRectClip rectangle
polygonPolygon
closePolygonTrue, when the polygon is closed
Returns:
Clipped polygon
QPolygonF QwtClipper::clipPolygonF ( const QRectF &  clipRect,
const QPolygonF &  polygon,
bool  closePolygon = false 
) [static]

Sutherland-Hodgman polygon clipping

Parameters:
clipRectClip rectangle
polygonPolygon
closePolygonTrue, when the polygon is closed
Returns:
Clipped polygon
qmi style