kpresenter
KoPointArray.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KOPOINTARRAY_H
00021 #define KOPOINTARRAY_H
00022
00023 #include <qmemarray.h>
00024 #include <KoPoint.h>
00025 #include <KoRect.h>
00026
00027 class KoZoomHandler;
00028 class KoPointArray : public QMemArray<KoPoint>
00029 {
00030 public:
00031 KoPointArray() {}
00032 ~KoPointArray() {}
00033 KoPointArray( int size ) : QMemArray<KoPoint>( size ) {}
00034 KoPointArray( const KoPointArray &a ) : QMemArray<KoPoint>( a ) {}
00035
00036 KoPointArray &operator=( const KoPointArray &a )
00037 { return (KoPointArray&)assign( a ); }
00038
00039 KoPointArray copy() const
00040 { KoPointArray tmp; return *((KoPointArray*)&tmp.duplicate(*this)); }
00041
00042 void translate( double dx, double dy );
00043 KoRect boundingRect() const;
00044
00045 void point( uint i, double *x, double *y ) const;
00046 KoPoint point( uint i ) const;
00047 void setPoint( uint i, double x, double y );
00048 void setPoint( uint i, const KoPoint &p );
00049 bool putPoints( int index, int nPoints, double firstx, double firsty, ... );
00050
00051 KoPointArray cubicBezier() const;
00052 static void cleanBuffers();
00053
00054 QPointArray zoomPointArray( const KoZoomHandler* zoomHandler ) const;
00055
00056
00057 QPointArray zoomPointArray( const KoZoomHandler* zoomHandler, int penWidth ) const;
00058
00059 protected:
00060 static uint splen;
00061 static void* sp;
00062 };
00063
00064
00065 #endif // KOPOINTARRAY_H
|