10 #ifndef QWT_PIXEL_MATRIX_H 11 #define QWT_PIXEL_MATRIX_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 testPixel(int x, int y) const
Test if a pixel has been set.
int index(int x, int y) const
Calculate the index in the bit field corresponding to a position.
A bit field corresponding to the pixels of a rectangle.
TFSIMD_FORCE_INLINE const tfScalar & y() const
bool testAndSetPixel(int x, int y, bool on)
Set a pixel and test if a pixel has been set before.
TFSIMD_FORCE_INLINE const tfScalar & x() const