A bit field corresponding to the pixels of a rectangle. More...
#include <qwt_pixel_matrix.h>
Public Member Functions | |
| int | index (int x, int y) const |
| Calculate the index in the bit field corresponding to a position. | |
| QwtPixelMatrix (const QRect &rect) | |
| Constructor. | |
| QRect | rect () const |
| void | setRect (const QRect &rect) |
| bool | testAndSetPixel (int x, int y, bool on) |
| Set a pixel and test if a pixel has been set before. | |
| bool | testPixel (int x, int y) const |
| Test if a pixel has been set. | |
| ~QwtPixelMatrix () | |
| Destructor. | |
Private Attributes | |
| QRect | d_rect |
A bit field corresponding to the pixels of a rectangle.
QwtPixelMatrix is intended to filter out duplicates in an unsorted array of points.
Definition at line 23 of file qwt_pixel_matrix.h.
| QwtPixelMatrix::QwtPixelMatrix | ( | const QRect & | rect | ) | [explicit] |
Constructor.
| rect | Bounding rectangle for the matrix |
Definition at line 17 of file qwt_pixel_matrix.cpp.
Destructor.
Definition at line 24 of file qwt_pixel_matrix.cpp.
| 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 |
Definition at line 85 of file qwt_pixel_matrix.h.
| QRect QwtPixelMatrix::rect | ( | ) | const |
Definition at line 48 of file qwt_pixel_matrix.cpp.
| void QwtPixelMatrix::setRect | ( | const QRect & | rect | ) |
Set the bounding rectangle of the matrix
| rect | Bounding rectangle |
Definition at line 35 of file qwt_pixel_matrix.cpp.
| 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 |
Definition at line 66 of file qwt_pixel_matrix.h.
| bool QwtPixelMatrix::testPixel | ( | int | x, |
| int | y | ||
| ) | const [inline] |
Test if a pixel has been set.
| x | X-coordinate |
| y | Y-coordinate |
Definition at line 50 of file qwt_pixel_matrix.h.
QRect QwtPixelMatrix::d_rect [private] |
Definition at line 38 of file qwt_pixel_matrix.h.