📄 qwtpainter.3
字号:
.TH "QwtPainter" 3 "16 Nov 2004" "Version 4.2.0" "Qwt User's Guide" \" -*- nroff -*-.ad l.nh.SH NAMEQwtPainter \- .SH SYNOPSIS.br.PP.SH "Detailed Description".PP A collection of QPainter workarounds. 1) Clipping to coordinate system limits.PPOn X11 pixel coordinates are stored in shorts. Qt produces overruns when mapping QCOORDS to shorts..PP2) Scaling to device metrics.PPQPainter scales fonts, line and fill patterns to the metrics of the paint device. Other values like the geometries of rects, points remain device independend. To enable a device independent widget implementation, QwtPainter adds scaling of these geometries. (Unfortunately QPainter::scale scales both types of paintings, so the objects of the first type would be scaled twice)..PP3) Hide some Qt2/3 incompatibilities .PPDefinition at line 50 of file qwt_painter.h..SS "Public Types".in +1c.ti -1c.RI "enum \fBTextXorRopMode\fP { \fBXorRopTextNormal\fP = 0, \fBXorRopTextKeepFont\fP = 1, \fBXorRopTextKeepColor\fP = 2 }".br.in -1c.SS "Static Public Member Functions".in +1c.ti -1c.RI "void \fBsetMetricsMap\fP (const QPaintDevice *layout, const QPaintDevice *device)".br.ti -1c.RI "void \fBsetMetricsMap\fP (const QwtMetricsMap &)".br.ti -1c.RI "void \fBresetMetricsMap\fP ()".br.ti -1c.RI "const QwtMetricsMap & \fBmetricsMap\fP ()".br.ti -1c.RI "void \fBsetDeviceClipping\fP (bool)".br.ti -1c.RI "bool \fBdeviceClipping\fP ()".br.ti -1c.RI "void \fBsetClipRect\fP (QPainter *, const QRect &)".br.ti -1c.RI "void \fBdrawText\fP (QPainter *, int x, int y, const QString &, int len=-1)".br.ti -1c.RI "void \fBdrawText\fP (QPainter *, const QPoint &, const QString &, int len=-1)".br.ti -1c.RI "void \fBdrawText\fP (QPainter *, int x, int y, int w, int h, int flags, const QString &, int len=-1)".br.ti -1c.RI "void \fBdrawText\fP (QPainter *, const QRect &, int flags, const QString &, int len=-1)".br.ti -1c.RI "void \fBdrawSimpleRichText\fP (QPainter *, const QRect &, int flags, QSimpleRichText &)".br.ti -1c.RI "void \fBdrawRect\fP (QPainter *, int x, int y, int w, int h)".br.ti -1c.RI "void \fBdrawRect\fP (QPainter *, const QRect &rect)".br.ti -1c.RI "void \fBfillRect\fP (QPainter *, const QRect &, const QBrush &)".br.ti -1c.RI "void \fBdrawEllipse\fP (QPainter *, const QRect &)".br.ti -1c.RI "void \fBdrawLine\fP (QPainter *, int x1, int y1, int x2, int y2)".br.ti -1c.RI "void \fBdrawLine\fP (QPainter *, const QPoint &p1, const QPoint &p2)".br.ti -1c.RI "void \fBdrawPolygon\fP (QPainter *, const QPointArray &pa)".br.ti -1c.RI "void \fBdrawPolyline\fP (QPainter *, const QPointArray &pa)".br.ti -1c.RI "void \fBdrawPoint\fP (QPainter *, int x, int y)".br.ti -1c.RI "void \fBdrawRoundFrame\fP (QPainter *, const QRect &, int width, const QColorGroup &cg, bool sunken)".br.ti -1c.RI "QPointArray \fBclip\fP (const QPointArray &)".br.ti -1c.RI "int \fBtextXorRopMode\fP ()".br.ti -1c.RI "int \fBsetTextXorRopMode\fP (\fBTextXorRopMode\fP mode)".br.in -1c.SH "Member Enumeration Documentation".PP .SS "enum \fBQwtPainter::TextXorRopMode\fP".PPIndicates a method to work around a bug in the drawing of text using the XorROP raster operator on the X Window system. Has no effect on other platforms..PP\fBSee also:\fP.RS 4\fBQwtPainter::setTextXorRopMode\fP .RE.PPDefinition at line 60 of file qwt_painter.h..SH "Member Function Documentation".PP .SS "QPointArray QwtPainter::clip (const QPointArray &)\fC [static]\fP".PPClip a point array. .PPDefinition at line 524 of file qwt_painter.cpp..PPReferences QwtRect::clip()..PPReferenced by drawPolygon(), and drawPolyline()..SS "bool QwtPainter::deviceClipping ()\fC [static]\fP".PPReturns whether device clipping is enabled. On X11 the default is enabled, otherwise it is disabled. .PP\fBSee also:\fP.RS 4\fBQwtPainter::setDeviceClipping()\fP .RE.PPDefinition at line 88 of file qwt_painter.cpp..SS "void QwtPainter::drawEllipse (QPainter * painter, const QRect & rect)\fC [static]\fP".PPWrapper for QPainter::drawEllipse() Definition at line 195 of file qwt_painter.cpp..PPReferenced by QwtSymbol::draw(), and QwtPicker::drawRubberBand()..SS "void QwtPainter::drawLine (QPainter * painter, const QPoint & p1, const QPoint & p2)\fC [static]\fP".PPWrapper for QPainter::drawLine() Definition at line 443 of file qwt_painter.cpp..PPReferences drawPolyline()..SS "void QwtPainter::drawLine (QPainter * painter, int x1, int y1, int x2, int y2)\fC [static]\fP".PPWrapper for QPainter::drawLine() Definition at line 481 of file qwt_painter.cpp..PPReferenced by QwtSymbol::draw(), QwtMarker::draw(), QwtGrid::draw(), QwtScaleDraw::drawBackbone(), QwtLegendItem::drawIdentifier(), QwtPicker::drawRubberBand(), QwtCurve::drawSticks(), and QwtScaleDraw::drawTick()..SS "void QwtPainter::drawPoint (QPainter * painter, int x, int y)\fC [static]\fP".PPWrapper for QPainter::drawPoint() Definition at line 513 of file qwt_painter.cpp..PPReferenced by QwtCurve::drawDots()..SS "void QwtPainter::drawPolygon (QPainter * painter, const QPointArray & pa)\fC [static]\fP".PPWrapper for QPainter::drawPolygon() Definition at line 490 of file qwt_painter.cpp..PPReferences clip()..PPReferenced by QwtSymbol::draw(), QwtCurve::drawDots(), QwtCurve::drawLines(), QwtCurve::drawSpline(), and QwtCurve::drawSteps()..SS "void QwtPainter::drawPolyline (QPainter * painter, const QPointArray & pa)\fC [static]\fP".PPWrapper for QPainter::drawPolyline() Definition at line 501 of file qwt_painter.cpp..PPReferences clip()..PPReferenced by drawLine(), QwtCurve::drawLines(), QwtCurve::drawSpline(), and QwtCurve::drawSteps()..SS "void QwtPainter::drawRect (QPainter * painter, const QRect & rect)\fC [static]\fP".PPWrapper for QPainter::drawRect() Definition at line 168 of file qwt_painter.cpp..SS "void QwtPainter::drawRect (QPainter * painter, int x, int y, int w, int h)\fC [static]\fP".PPWrapper for QPainter::drawRect() Definition at line 160 of file qwt_painter.cpp..PPReferenced by QwtRichText::draw(), QwtPlainText::draw(), QwtSymbol::draw(), QwtPicker::drawRubberBand(), and QwtPlot::printCanvas()..SS "void QwtPainter::drawRoundFrame (QPainter *, const QRect &, int width, const QColorGroup & cg, bool sunken)\fC [static]\fP".PPDraw a round frame. .PPDefinition at line 560 of file qwt_painter.cpp..PPReferenced by QwtDial::drawFrame()..SS "void QwtPainter::drawSimpleRichText (QPainter * painter, const QRect & rect, int flags, QSimpleRichText & text)\fC [static]\fP".PPWrapper for QSimpleRichText::draw() Definition at line 357 of file qwt_painter.cpp..PPReferenced by QwtRichText::draw()..SS "void QwtPainter::drawText (QPainter * painter, const QRect & rect, int flags, const QString & text, int len = \fC-1\fP)\fC [static]\fP".PPWrapper for QPainter::drawText() Definition at line 293 of file qwt_painter.cpp..SS "void QwtPainter::drawText (QPainter * painter, int x, int y, int w, int h, int flags, const QString & text, int len = \fC-1\fP)\fC [static]\fP".PPWrapper for QPainter::drawText() Definition at line 284 of file qwt_painter.cpp..PPReferences drawText()..SS "void QwtPainter::drawText (QPainter * painter, const QPoint & pos, const QString & text, int len = \fC-1\fP)\fC [static]\fP".PPWrapper for QPainter::drawText() Definition at line 217 of file qwt_painter.cpp..SS "void QwtPainter::drawText (QPainter * painter, int x, int y, const QString & text, int len = \fC-1\fP)\fC [static]\fP".PPWrapper for QPainter::drawText() Definition at line 208 of file qwt_painter.cpp..PPReferenced by QwtPlainText::draw(), QwtScaleDraw::drawLabel(), and drawText()..SS "void QwtPainter::fillRect (QPainter * painter, const QRect & rect, const QBrush & brush)\fC [static]\fP".PPWrapper for QPainter::fillRect() Definition at line 181 of file qwt_painter.cpp..PPReferenced by QwtPlot::printCanvas()..SS "const QwtMetricsMap & QwtPainter::metricsMap ()\fC [static]\fP".PP\fBReturns:\fP.RS 4Metrics map .RE.PPDefinition at line 144 of file qwt_painter.cpp..PPReferenced by QwtMarker::draw(), QwtLegendItem::drawIdentifier(), QwtLegendItem::drawItem(), and QwtPlot::print()..SS "void QwtPainter::resetMetricsMap ()\fC [static]\fP".PPReset the metrics map to the ratio 1:1 .PP\fBSee also:\fP.RS 4\fBQwtPainter::setMetricsMap\fP, \fBQwtPainter::resetMetricsMap\fP .RE.PPDefinition at line 136 of file qwt_painter.cpp..PPReferenced by QwtPlot::print()..SS "void QwtPainter::setClipRect (QPainter * painter, const QRect & rect)\fC [static]\fP".PPWrapper for QPainter::setClipRect() Definition at line 152 of file qwt_painter.cpp..PPReferenced by QwtPlot::printCanvas(), and QwtPlot::printLegend()..SS "void QwtPainter::setDeviceClipping (bool enable)\fC [static]\fP".PPEn/Disable device clipping. On X11 the default for device clipping is enabled, otherwise it is disabled. .PP\fBSee also:\fP.RS 4\fBQwtPainter::deviceClipping()\fP .RE.PPDefinition at line 77 of file qwt_painter.cpp..SS "void QwtPainter::setMetricsMap (const QwtMetricsMap & map)\fC [static]\fP".PPChange the metrics map .PP\fBSee also:\fP.RS 4\fBQwtPainter::resetMetricsMap\fP, \fBQwtPainter::metricsMap\fP .RE.PPDefinition at line 127 of file qwt_painter.cpp..SS "void QwtPainter::setMetricsMap (const QPaintDevice * layout, const QPaintDevice * device)\fC [static]\fP".PPScale all QwtPainter drawing operations using the ratio QwtPaintMetrics(from).logicalDpiX() / QwtPaintMetrics(to).logicalDpiX() and QwtPaintMetrics(from).logicalDpiY() / QwtPaintMetrics(to).logicalDpiY().PP\fBSee also:\fP.RS 4QwtPainter::resetScaleMetrics(), QwtPainter::scaleMetricsX, QwtPainter::scaleMetricsY() .RE.PPDefinition at line 117 of file qwt_painter.cpp..PPReferenced by QwtPlot::print()..SS "int QwtPainter::setTextXorRopMode (\fBTextXorRopMode\fP mode)\fC [static]\fP".PPSelects a method to work around a bug in the drawing of text using the XorROP raster operator on the X Window system. Has no effect on other platforms..PP\fBSee also:\fP.RS 4\fBQwtPicker\fP.RE.PPPossible modes are:.IP "\(bu" 2XorRopTextNormal; fails on the X Window System with X Free Type enabled..IP "\(bu" 2XorRopTextKeepFont; works around the bug while keeping the font, but the color of the text is unpredictable. It is possible to get satisfactory results by choosing a suitable combination of font, text color and background color..IP "\(bu" 2XorRopTextKeepColor; works around the bug while keeping the color, but the font of the text is unpredictable (it depends on the version of Qt). The font that is used may not at all resemble the requested font. This mode does not exist when Qwt has been built for Qt-2.3..PP.PP\fBParameters:\fP.RS 4\fImode\fP Mode to do the XorROP text drawing .RE.PPDefinition at line 640 of file qwt_painter.cpp..SS "int QwtPainter::textXorRopMode ()\fC [static]\fP".PPReturn the method to work around a bug in the drawing of text using the XorROP raster operator on the X Window system..PP\fBSee also:\fP.RS 4\fBQwtPainter::textXorRopMode\fP .RE.PPDefinition at line 594 of file qwt_painter.cpp..SH "Author".PP Generated automatically by Doxygen for Qwt User's Guide from the source code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -