A bit field corresponding to the pixels of a rectangle.
More...
#include <qwt_pixel_matrix.h>
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 24 of file qwt_pixel_matrix.h.
◆ QwtPixelMatrix()
QwtPixelMatrix::QwtPixelMatrix |
( |
const QRect & |
rect | ) |
|
|
explicit |
Constructor.
- Parameters
-
rect | Bounding rectangle for the matrix |
Definition at line 17 of file qwt_pixel_matrix.cpp.
◆ ~QwtPixelMatrix()
QwtPixelMatrix::~QwtPixelMatrix |
( |
| ) |
|
◆ index()
int QwtPixelMatrix::index |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
|
inline |
Calculate the index in the bit field corresponding to a position.
- Parameters
-
x | X-coordinate |
y | Y-coordinate |
- Returns
- Index, when rect() contains pos - otherwise -1.
Definition at line 86 of file qwt_pixel_matrix.h.
◆ rect()
QRect QwtPixelMatrix::rect |
( |
| ) |
const |
◆ setRect()
void QwtPixelMatrix::setRect |
( |
const QRect & |
rect | ) |
|
Set the bounding rectangle of the matrix
- Parameters
-
- Note
- All bits are cleared
Definition at line 35 of file qwt_pixel_matrix.cpp.
◆ testAndSetPixel()
bool QwtPixelMatrix::testAndSetPixel |
( |
int |
x, |
|
|
int |
y, |
|
|
bool |
on |
|
) |
| |
|
inline |
Set a pixel and test if a pixel has been set before.
- Parameters
-
x | X-coordinate |
y | Y-coordinate |
on | Set/Clear the pixel |
- Returns
- true, when pos is outside of rect(), or when the pixel was set before.
Definition at line 67 of file qwt_pixel_matrix.h.
◆ testPixel()
bool QwtPixelMatrix::testPixel |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
|
inline |
Test if a pixel has been set.
- Parameters
-
x | X-coordinate |
y | Y-coordinate |
- Returns
- true, when pos is outside of rect(), or when the pixel has already been set.
Definition at line 51 of file qwt_pixel_matrix.h.
◆ m_rect
QRect QwtPixelMatrix::m_rect |
|
private |
The documentation for this class was generated from the following files: