qwt_rect.h

00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  * 
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 #ifndef QWT_RECT_H
00011 #define QWT_RECT_H
00012 
00013 #include <qrect.h>
00014 #include "qwt_global.h"
00015 #include "qwt_polygon.h"
00016 
00021 class QWT_EXPORT QwtRect : public QRect
00022 {
00023 public:
00024     QwtRect();
00025     QwtRect(const QRect &r);
00026 
00027     QwtPolygon clip(const QwtPolygon &) const;
00028 
00029 private:
00030     enum Edge { Left, Top, Right, Bottom, NEdges };
00031 
00032     void clipEdge(Edge, const QwtPolygon &, QwtPolygon &) const;
00033     bool insideEdge(const QPoint &, Edge edge) const;
00034     QPoint intersectEdge(const QPoint &p1, 
00035         const QPoint &p2, Edge edge) const;
00036 };
00037 
00038 #endif

Generated on Mon Feb 26 21:22:38 2007 for Qwt User's Guide by  doxygen 1.4.6