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

QPainter绘制操作的封装和兼容性处理集合 更多...

#include <qwt_painter.h>

静态 Public 成员函数

static void setPolylineSplitting (bool)
 启用/禁用光栅绘制引擎的线条分割
 
static bool polylineSplitting ()
 
static void setRoundingAlignment (bool)
 启用/禁用坐标对齐
 
static bool roundingAlignment ()
 Check whether coordinates should be rounded, before they are painted to a paint engine that rounds to integer values.
 
static bool roundingAlignment (const QPainter *)
 
static void drawText (QPainter *, qreal x, qreal y, const QString &)
 Wrapper for QPainter::drawText()
 
static void drawText (QPainter *, const QPointF &, const QString &)
 Wrapper for QPainter::drawText()
 
static void drawText (QPainter *, qreal x, qreal y, qreal w, qreal h, int flags, const QString &)
 Wrapper for QPainter::drawText()
 
static void drawText (QPainter *, const QRectF &, int flags, const QString &)
 Wrapper for QPainter::drawText()
 
static void drawSimpleRichText (QPainter *, const QRectF &, int flags, const QTextDocument &)
 将文本文档绘制到矩形区域
 
static void drawRect (QPainter *, qreal x, qreal y, qreal w, qreal h)
 Wrapper for QPainter::drawRect()
 
static void drawRect (QPainter *, const QRectF &rect)
 Wrapper for QPainter::drawRect()
 
static void fillRect (QPainter *, const QRectF &, const QBrush &)
 Wrapper for QPainter::fillRect()
 
static void drawEllipse (QPainter *, const QRectF &)
 Wrapper for QPainter::drawEllipse()
 
static void drawPie (QPainter *, const QRectF &r, int a, int alen)
 Wrapper for QPainter::drawPie()
 
static void drawLine (QPainter *, qreal x1, qreal y1, qreal x2, qreal y2)
 Wrapper for QPainter::drawLine()
 
static void drawLine (QPainter *, const QPointF &p1, const QPointF &p2)
 Wrapper for QPainter::drawLine()
 
static void drawLine (QPainter *, const QLineF &)
 Wrapper for QPainter::drawLine()
 
static void drawPolygon (QPainter *, const QPolygonF &)
 Wrapper for QPainter::drawPolygon()
 
static void drawPolyline (QPainter *, const QPolygonF &)
 Wrapper for QPainter::drawPolyline()
 
static void drawPolyline (QPainter *, const QPointF *, int pointCount)
 Wrapper for QPainter::drawPolyline()
 
static void drawPolygon (QPainter *, const QPolygon &)
 Wrapper for QPainter::drawPolygon()
 
static void drawPolyline (QPainter *, const QPolygon &)
 Wrapper for QPainter::drawPolyline()
 
static void drawPolyline (QPainter *, const QPoint *, int pointCount)
 Wrapper for QPainter::drawPolyline()
 
static void drawPoint (QPainter *, const QPoint &)
 Wrapper for QPainter::drawPoint()
 
static void drawPoints (QPainter *, const QPolygon &)
 Wrapper for QPainter::drawPoints()
 
static void drawPoints (QPainter *, const QPoint *, int pointCount)
 Wrapper for QPainter::drawPoints()
 
static void drawPoint (QPainter *, qreal x, qreal y)
 Wrapper for QPainter::drawPoint()
 
static void drawPoint (QPainter *, const QPointF &)
 Wrapper for QPainter::drawPoint()
 
static void drawPoints (QPainter *, const QPolygonF &)
 Wrapper for QPainter::drawPoints()
 
static void drawPoints (QPainter *, const QPointF *, int pointCount)
 Wrapper for QPainter::drawPoints()
 
static void drawPath (QPainter *, const QPainterPath &)
 Wrapper for QPainter::drawPath()
 
static void drawImage (QPainter *, const QRectF &, const QImage &)
 Wrapper for QPainter::drawImage()
 
static void drawPixmap (QPainter *, const QRectF &, const QPixmap &)
 Wrapper for QPainter::drawPixmap()
 
static void drawRoundFrame (QPainter *, const QRectF &, const QPalette &, int lineWidth, int frameStyle)
 绘制圆形边框
 
static void drawRoundedFrame (QPainter *, const QRectF &, qreal xRadius, qreal yRadius, const QPalette &, int lineWidth, int frameStyle)
 绘制带圆角的矩形边框
 
static void drawFrame (QPainter *, const QRectF &rect, const QPalette &palette, QPalette::ColorRole foregroundRole, int lineWidth, int midLineWidth, int frameStyle)
 绘制矩形边框
 
static void drawFocusRect (QPainter *, const QWidget *)
 Draw a focus rectangle on a widget using its style.
 
static void drawFocusRect (QPainter *, const QWidget *, const QRect &)
 Draw a focus rectangle on a widget using its style.
 
static void drawColorBar (QPainter *, const QwtColorMap &, const QwtInterval &, const QwtScaleMap &, Qt::Orientation, const QRectF &)
 将颜色条绘制到矩形区域
 
static bool isAligning (const QPainter *)
 检查画笔是否使用对齐到整数的绘制引擎
 
static bool isX11GraphicsSystem ()
 检查应用程序是否使用X11图形系统
 
static void fillPixmap (const QWidget *, QPixmap &, const QPoint &offset=QPoint())
 使用widget内容填充pixmap
 
static void fillRegion (QPainter *painter, const QRegion &region)
 填充区域
 
static void fillBackground (QPainter *painter, QWidget *widget, const QVector< QRectF > &fillRects)
 填充widget背景的指定矩形区域
 
static void fillBackground (QPainter *painter, QWidget *canvas)
 自动检测并填充widget的背景
 
static void drawBackgound (QPainter *, const QRectF &, const QWidget *)
 使用widget的背景填充矩形
 
static void drawCanvasBackgound (QPainter *painter, QWidget *canvas)
 绘制widget的背景
 
static void drawStyledBackground (QWidget *w, QPainter *painter)
 确保widget背景按照当前GUI风格正确绘制
 
static QPixmap backingStore (QWidget *, const QSize &)
 创建可用作后备存储的pixmap
 
static qreal devicePixelRatio (const QPaintDevice *)
 获取绘制设备的像素比率
 
static qreal effectivePenWidth (const QPen &)
 
static int horizontalAdvance (const QFontMetrics &, const QString &)
 绘制文本后下一个字符的适当距离
 
static qreal horizontalAdvance (const QFontMetricsF &, const QString &)
 绘制文本后下一个字符的适当距离
 
static int horizontalAdvance (const QFontMetrics &, QChar)
 绘制字符后下一个字符的适当距离
 
static qreal horizontalAdvance (const QFontMetricsF &, QChar)
 绘制字符后下一个字符的适当距离
 
static QFont scaledFont (const QFont &, const QPaintDevice *=nullptr)
 根据绘制设备的DPI值调整字体DPI
 
static QWidget * findBackgroundWidget (QWidget *w)
 查找具有可见背景的顶层widget
 

详细描述

QPainter绘制操作的封装和兼容性处理集合

成员函数说明

◆ backingStore()

QPixmap QwtPainter::backingStore ( QWidget *  widget,
const QSize &  size 
)
static

创建可用作后备存储的pixmap

◆ devicePixelRatio()

qreal QwtPainter::devicePixelRatio ( const QPaintDevice *  paintDevice)
static

获取绘制设备的像素比率

◆ drawBackgound()

void QwtPainter::drawBackgound ( QPainter *  painter,
const QRectF &  rect,
const QWidget *  widget 
)
static

使用widget的背景填充矩形

◆ drawCanvasBackgound()

void QwtPainter::drawCanvasBackgound ( QPainter *  painter,
QWidget *  canvas 
)
static

绘制widget的背景

◆ drawColorBar()

void QwtPainter::drawColorBar ( QPainter *  painter,
const QwtColorMap colorMap,
const QwtInterval interval,
const QwtScaleMap scaleMap,
Qt::Orientation  orientation,
const QRectF &  rect 
)
static

将颜色条绘制到矩形区域

◆ drawFrame()

void QwtPainter::drawFrame ( QPainter *  painter,
const QRectF &  rect,
const QPalette &  palette,
QPalette::ColorRole  foregroundRole,
int  frameWidth,
int  midLineWidth,
int  frameStyle 
)
static

绘制矩形边框

◆ drawRoundedFrame()

void QwtPainter::drawRoundedFrame ( QPainter *  painter,
const QRectF &  rect,
qreal  xRadius,
qreal  yRadius,
const QPalette &  palette,
int  lineWidth,
int  frameStyle 
)
static

绘制带圆角的矩形边框

◆ drawRoundFrame()

void QwtPainter::drawRoundFrame ( QPainter *  painter,
const QRectF &  rect,
const QPalette &  palette,
int  lineWidth,
int  frameStyle 
)
static

绘制圆形边框

◆ drawSimpleRichText()

void QwtPainter::drawSimpleRichText ( QPainter *  painter,
const QRectF &  rect,
int  flags,
const QTextDocument &  text 
)
static

将文本文档绘制到矩形区域

◆ drawStyledBackground()

void QwtPainter::drawStyledBackground ( QWidget *  w,
QPainter *  painter 
)
static

确保widget背景按照当前GUI风格正确绘制

◆ effectivePenWidth()

qreal QwtPainter::effectivePenWidth ( const QPen &  pen)
inlinestatic
返回
pen.widthF() expanded to at least 1.0
参数
penPen

◆ fillBackground() [1/2]

void QwtPainter::fillBackground ( QPainter *  painter,
QWidget *  canvas 
)
static

自动检测并填充widget的背景

◆ fillBackground() [2/2]

void QwtPainter::fillBackground ( QPainter *  painter,
QWidget *  widget,
const QVector< QRectF > &  fillRects 
)
static

填充widget背景的指定矩形区域

◆ fillPixmap()

void QwtPainter::fillPixmap ( const QWidget *  widget,
QPixmap &  pixmap,
const QPoint &  offset = QPoint() 
)
static

使用widget内容填充pixmap

◆ fillRegion()

void QwtPainter::fillRegion ( QPainter *  painter,
const QRegion &  region 
)
static

填充区域

◆ findBackgroundWidget()

QWidget * QwtPainter::findBackgroundWidget ( QWidget *  w)
static

查找具有可见背景的顶层widget

◆ horizontalAdvance() [1/4]

int QwtPainter::horizontalAdvance ( const QFontMetrics &  fontMetrics,
const QString &  text 
)
static

绘制文本后下一个字符的适当距离

◆ horizontalAdvance() [2/4]

int QwtPainter::horizontalAdvance ( const QFontMetrics &  fontMetrics,
QChar  ch 
)
static

绘制字符后下一个字符的适当距离

◆ horizontalAdvance() [3/4]

qreal QwtPainter::horizontalAdvance ( const QFontMetricsF &  fontMetrics,
const QString &  text 
)
static

绘制文本后下一个字符的适当距离

◆ horizontalAdvance() [4/4]

qreal QwtPainter::horizontalAdvance ( const QFontMetricsF &  fontMetrics,
QChar  ch 
)
static

绘制字符后下一个字符的适当距离

◆ isAligning()

bool QwtPainter::isAligning ( const QPainter *  painter)
static

检查画笔是否使用对齐到整数的绘制引擎

◆ isX11GraphicsSystem()

bool QwtPainter::isX11GraphicsSystem ( )
static

检查应用程序是否使用X11图形系统

◆ polylineSplitting()

bool QwtPainter::polylineSplitting ( )
inlinestatic
返回
True, when line splitting for the raster paint engine is enabled.
参见
setPolylineSplitting()

◆ roundingAlignment() [1/2]

bool QwtPainter::roundingAlignment ( )
inlinestatic

Check whether coordinates should be rounded, before they are painted to a paint engine that rounds to integer values.

For other paint engines ( PDF, SVG ), this flag has no effect.

返回
True, when rounding is enabled
参见
setRoundingAlignment(), isAligning()

◆ roundingAlignment() [2/2]

bool QwtPainter::roundingAlignment ( const QPainter *  painter)
inlinestatic
返回
roundingAlignment() && isAligning(painter);
参数
painterPainter

◆ scaledFont()

QFont QwtPainter::scaledFont ( const QFont &  font,
const QPaintDevice *  paintDevice = nullptr 
)
static

根据绘制设备的DPI值调整字体DPI

◆ setPolylineSplitting()

void QwtPainter::setPolylineSplitting ( bool  enable)
static

启用/禁用光栅绘制引擎的线条分割

◆ setRoundingAlignment()

void QwtPainter::setRoundingAlignment ( bool  enable)
static

启用/禁用坐标对齐


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