QwtPixelMatrix man page

QwtPixelMatrix —

A bit field corresponding to the pixels of a rectangle.

Synopsis

#include <qwt_pixel_matrix.h>

Inherits QBitArray.

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.

Detailed Description

A bit field corresponding to the pixels of a rectangle.

QwtPixelMatrix is intended to filter out duplicates in an unsorted array of points.

Constructor & Destructor Documentation

QwtPixelMatrix::QwtPixelMatrix (const QRect &rect)

Constructor.

Parameters:

rect Bounding rectangle for the matrix

Member Function Documentation

int QwtPixelMatrix::index (intx, inty) 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.

QRect QwtPixelMatrix::rect () const

Returns:

Bounding rectangle

void QwtPixelMatrix::setRect (const QRect &rect)

Set the bounding rectangle of the matrix

Parameters:

rect Bounding rectangle

Note:

All bits are cleared

bool QwtPixelMatrix::testAndSetPixel (intx, inty, boolon) [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.

bool QwtPixelMatrix::testPixel (intx, inty) 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.

Author

Generated automatically by Doxygen for Qwt User's Guide from the source code.

Info

Thu Dec 11 2014 Version 6.1.2 Qwt User's Guide