QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
QwtPixelMatrix类 参考

A bit field corresponding to the pixels of a rectangle 更多...

#include <qwt_pixel_matrix.h>

类 QwtPixelMatrix 继承关系图:

Public 成员函数

 QwtPixelMatrix (const QRect &rect)
 Constructor
 
 ~QwtPixelMatrix ()
 Destructor
 
void setRect (const QRect &rect)
 Set the bounding rectangle of the matrix
 
QRect rect () const
 Get the bounding rectangle
 
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::QwtPixelMatrix ( const QRect &  rect)
explicit

Constructor

参数
[in]rectBounding rectangle for the matrix

成员函数说明

◆ index()

int QwtPixelMatrix::index ( int  x,
int  y 
) const
inline

Calculate the index in the bit field corresponding to a position

参数
[in]xX-coordinate
[in]yY-coordinate
返回
Index when rect() contains position, otherwise -1

◆ rect()

QRect QwtPixelMatrix::rect ( ) const

Get the bounding rectangle

返回
Bounding rectangle

◆ setRect()

void QwtPixelMatrix::setRect ( const QRect &  rect)

Set the bounding rectangle of the matrix

参数
[in]rectBounding rectangle
注解
All bits are cleared

◆ testAndSetPixel()

bool QwtPixelMatrix::testAndSetPixel ( int  x,
int  y,
bool  on 
)
inline

Set a pixel and test if a pixel has been set before

参数
[in]xX-coordinate
[in]yY-coordinate
[in]onSet/Clear the pixel
返回
true when position is outside of rect(), or when the pixel was set before

◆ testPixel()

bool QwtPixelMatrix::testPixel ( int  x,
int  y 
) const
inline

Test if a pixel has been set

参数
[in]xX-coordinate
[in]yY-coordinate
返回
true when position is outside of rect(), or when the pixel has already been set

该类的文档由以下文件生成: