Qwt User's Guide
|
A bit field corresponding to the pixels of a rectangle. More...
#include <qwt_pixel_matrix.h>
Public Member Functions | |
QwtPixelMatrix (const QRect &rect) | |
Constructor. | |
~QwtPixelMatrix () | |
Destructor. | |
void | setRect (const QRect &rect) |
QRect | rect () const |
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. | |
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.
QwtPixelMatrix is intended to filter out duplicates in an unsorted array of points.
QwtPixelMatrix::QwtPixelMatrix | ( | const QRect & | rect | ) |
Constructor.
rect | Bounding rectangle for the matrix |
int QwtPixelMatrix::index | ( | int | x, |
int | y | ||
) | const [inline] |
Calculate the index in the bit field corresponding to a position.
x | X-coordinate |
y | Y-coordinate |
QRect QwtPixelMatrix::rect | ( | ) | const |
void QwtPixelMatrix::setRect | ( | const QRect & | rect | ) |
Set the bounding rectangle of the matrix
rect | Bounding rectangle |
bool QwtPixelMatrix::testAndSetPixel | ( | int | x, |
int | y, | ||
bool | on | ||
) | [inline] |
Set a pixel and test if a pixel has been set before.
x | X-coordinate |
y | Y-coordinate |
on | Set/Clear the pixel |
bool QwtPixelMatrix::testPixel | ( | int | x, |
int | y | ||
) | const [inline] |
Test if a pixel has been set.
x | X-coordinate |
y | Y-coordinate |