qwt_clipper.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
  2. * Qwt Widget Library
  3. * Copyright (C) 1997 Josef Wilgen
  4. * Copyright (C) 2002 Uwe Rathmann
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the Qwt License, Version 1.0
  8. *****************************************************************************/
  9. #ifndef QWT_CLIPPER_H
  10. #define QWT_CLIPPER_H
  11. #include "qwt_global.h"
  12. #include "qwt_interval.h"
  13. #include <qpolygon.h>
  14. #include <qvector.h>
  15. class QRect;
  16. class QRectF;
  17. /*!
  18. \brief Some clipping algorithms
  19. */
  20. class QWT_EXPORT QwtClipper
  21. {
  22. public:
  23. static QPolygon clipPolygon( const QRect &,
  24. const QPolygon &, bool closePolygon = false );
  25. static QPolygon clipPolygon( const QRectF &,
  26. const QPolygon &, bool closePolygon = false );
  27. static QPolygonF clipPolygonF( const QRectF &,
  28. const QPolygonF &, bool closePolygon = false );
  29. static QVector<QwtInterval> clipCircle(
  30. const QRectF &, const QPointF &, double radius );
  31. };
  32. #endif