Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

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 #if QT_VERSION < 0x040000
00015 #include <qpointarray.h>
00016 #else
00017 #include <qpolygon.h>
00018 #endif
00019 #include "qwt_global.h"
00020 
00025 class QWT_EXPORT QwtRect : public QRect
00026 {
00027 public:
00028     QwtRect();
00029     QwtRect(const QRect &r);
00030 
00031 #if QT_VERSION < 0x040000
00032     QPointArray clip(const QPointArray &) const;
00033 #else
00034     QPolygon clip(const QPolygon &) const;
00035 #endif
00036 
00037 private:
00038     enum Edge { Left, Top, Right, Bottom, NEdges };
00039 
00040 #if QT_VERSION < 0x040000
00041     void clipEdge(Edge, const QPointArray &, QPointArray &) const;
00042 #else
00043     void clipEdge(Edge, const QPolygon &, QPolygon &) const;
00044 #endif
00045     bool insideEdge(const QPoint &, Edge edge) const;
00046     QPoint intersectEdge(const QPoint &p1, 
00047         const QPoint &p2, Edge edge) const;
00048 };
00049 
00050 #endif

Generated on Mon Jan 30 22:16:26 2006 for Qwt User's Guide by  doxygen 1.4.4