00001 //--------------------------------------------------------------------------- 00002 // 00003 // File: Txq2dLineArray.h 00004 // 00005 // Purpose: An optimized class for drawing line segments 00006 // using the Qt QPointArray class 00007 // 00008 // Version: $Id: Txq2dLineArray.h,v 1.3 2001/10/10 22:41:05 kgl Exp $ 00009 // 00010 // Author: Kelly G. Luetkemeyer 00011 // 00012 //--------------------------------------------------------------------------- 00013 00014 #ifndef TXQ2D_LINE_ARRAY_H 00015 #define TXQ2D_LINE_ARRAY_H 00016 00017 // Txq includes 00018 #include "Txq2dDrawable.h" 00019 00020 00037 class Txq2dLineArray: public Txq2dDrawable 00038 { 00039 00040 public: 00048 Txq2dLineArray(const vector<double> &x, 00049 const vector<double> &y, 00050 QColor color, 00051 int np=2); 00052 00056 virtual ~Txq2dLineArray(){} 00057 00062 void paint(QPainter* g ); 00063 00064 00065 protected: 00066 00072 void dump(QTextStream *ts); 00073 00074 private: 00075 00079 QColor color; 00080 00084 vector<double> x; 00085 00089 vector<double> y; 00090 00094 int npoints; 00095 00096 }; 00097 #endif
Copyright Tech-X Corporation, all rights reserved.