QwtClipper Namespace Reference

Some clipping algorithms. More...

## Functions

QWT_EXPORT void | clipPolygon (const QRect &, QPolygon &, bool closePolygon=false)
QWT_EXPORT void | clipPolygon (const QRectF &, QPolygon &, bool closePolygon=false)
QWT_EXPORT void | clipPolygonF (const QRectF &, QPolygonF &, bool closePolygon=false)
QWT_EXPORT QPolygon | clippedPolygon (const QRect &, const QPolygon &, bool closePolygon=false)
QWT_EXPORT QPolygon | clippedPolygon (const QRectF &, const QPolygon &, bool closePolygon=false)
QWT_EXPORT QPolygonF | clippedPolygonF (const QRectF &, const QPolygonF &, bool closePolygon=false)
QWT_EXPORT QVector< QwtInterval > | clipCircle (const QRectF &, const QPointF &, double radius)

## Detailed Description

Some clipping algorithms.

## Function Documentation

## clipCircle()

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

Circle clipping

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 * M_PI] is returned.

Parameters

  clipRect | Clip rectangle
  center | Center of the circle
  radius | Radius of the circle

Returns
  Arcs of the circle

Definition at line 477 of file qwt_clipper.cpp.

## clippedPolygon() [1/2]

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

Sutherland-Hodgman polygon clipping

Parameters

  clipRect | Clip rectangle
  polygon | Polygon
  closePolygon | True, when the polygon is closed

Returns
  Clipped polygon

Definition at line 437 of file qwt_clipper.cpp.

## clippedPolygon() [2/2]

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

Sutherland-Hodgman polygon clipping

Parameters

  clipRect | Clip rectangle
  polygon | Polygon
  closePolygon | True, when the polygon is closed

Returns
  Clipped polygon

Definition at line 420 of file qwt_clipper.cpp.

## clippedPolygonF()

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

Sutherland-Hodgman polygon clipping

Parameters

  clipRect | Clip rectangle
  polygon | Polygon
  closePolygon | True, when the polygon is closed

Returns
  Clipped polygon

Definition at line 455 of file qwt_clipper.cpp.

## clipPolygon() [1/2]

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

Sutherland-Hodgman polygon clipping

Parameters

  clipRect | Clip rectangle
  polygon | Polygon IN/OUT
  closePolygon | True, when the polygon is closed

Definition at line 390 of file qwt_clipper.cpp.

## clipPolygon() [2/2]

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

Sutherland-Hodgman polygon clipping

Parameters

  clipRect | Clip rectangle
  polygon | Polygon IN/OUT
  closePolygon | True, when the polygon is closed

Definition at line 369 of file qwt_clipper.cpp.

## clipPolygonF()

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

Sutherland-Hodgman polygon clipping

Parameters

  clipRect | Clip rectangle
  polygon | Polygon IN/OUT
  closePolygon | True, when the polygon is closed

Definition at line 404 of file qwt_clipper.cpp.