10 #ifndef QWT_PIXEL_MATRIX_H 
   11 #define QWT_PIXEL_MATRIX_H 
   13 #include "qwt_global.h" 
   15 #include <qbitarray.h> 
   30     void setRect( 
const QRect& rect );
 
   33     bool testPixel( 
int x, 
int y ) 
const;
 
   34     bool testAndSetPixel( 
int x, 
int y, 
bool on );
 
   36     int index( 
int x, 
int y ) 
const;
 
   53     const int idx = index( x, y );
 
   54     return ( idx >= 0 ) ? testBit( idx ) : 
true;
 
   69     const int idx = index( x, y );
 
   73     const bool onBefore = testBit( idx );
 
   86 inline int QwtPixelMatrix::index( 
int x, 
int y )
 const 
   88     const int dx = x - m_rect.x();
 
   89     if ( dx < 0 || dx >= m_rect.width() )
 
   92     const int dy = y - m_rect.y();
 
   93     if ( dy < 0 || dy >= m_rect.height() )
 
   96     return dy * m_rect.width() + dx;
 
A bit field corresponding to the pixels of a rectangle.
bool testPixel(int x, int y) const
Test if a pixel has been set.
bool testAndSetPixel(int x, int y, bool on)
Set a pixel and test if a pixel has been set before.