10 #ifndef QWT_PIXEL_MATRIX_H 
   11 #define QWT_PIXEL_MATRIX_H 
   13 #include "qwt_global.h" 
   14 #include <qbitarray.h> 
   29     void setRect( 
const QRect& rect );
 
   32     bool testPixel( 
int x, 
int y ) 
const;
 
   33     bool testAndSetPixel( 
int x, 
int y, 
bool on );
 
   35     int index( 
int x, 
int y ) 
const;
 
   52     const int idx = 
index( x, y );
 
   53     return ( idx >= 0 ) ? testBit( idx ) : 
true;
 
   68     const int idx = 
index( x, y );
 
   72     const bool onBefore = testBit( idx );
 
   87     const int dx = x - d_rect.x();
 
   88     if ( dx < 0 || dx >= d_rect.width() )
 
   91     const int dy = y - d_rect.y();
 
   92     if ( dy < 0 || dy >= d_rect.height() )
 
   95     return dy * d_rect.width() + dx;
 
bool testAndSetPixel(int x, int y, bool on)
Set a pixel and test if a pixel has been set before. 
Definition: qwt_pixel_matrix.h:66
bool testPixel(int x, int y) const 
Test if a pixel has been set. 
Definition: qwt_pixel_matrix.h:50
int index(int x, int y) const 
Calculate the index in the bit field corresponding to a position. 
Definition: qwt_pixel_matrix.h:85
A bit field corresponding to the pixels of a rectangle. 
Definition: qwt_pixel_matrix.h:23