<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/src/kernel/qpainter.cpp:59 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Translator" content="Cavendish">
<meta name="Qt zh_CN Documents Website" content="http://www.qiliang.net/qt">
<title>QPainter类</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; font-family: "Times New Roman" }
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
<a href="index.html">
<font color="#004faf">主页</font></a>
| <a href="classes.html">
<font color="#004faf">所有的类</font></a>
| <a href="mainclasses.html">
<font color="#004faf">主要的类</font></a>
| <a href="annotated.html">
<font color="#004faf">注释的类</font></a>
| <a href="groups.html">
<font color="#004faf">分组的类</font></a>
| <a href="functions.html">
<font color="#004faf">函数</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table>
<h1 align=center>QPainter类参考</h1>
<p>QPainter类低水平的绘制,例如在窗口部件上。
<a href="#details">详情请见……</a>
<p><tt>#include <<a href="qpainter-h.html">qpainter.h</a>></tt>
<p>继承了<a href="qt.html">Qt</a>。
<p>被<a href="qdirectpainter.html">QDirectPainter</a>继承。
<p><a href="qpainter-members.html">所有成员函数的列表。</a>
<h2>公有成员</h2>
<ul>
<li><div class=fn>enum <a href="#CoordinateMode-enum"><b>CoordinateMode</b></a> { CoordDevice, CoordPainter }</div></li>
<li><div class=fn><a href="#QPainter"><b>QPainter</b></a> ()</div></li>
<li><div class=fn><a href="#QPainter-2"><b>QPainter</b></a> ( const QPaintDevice * pd, bool unclipped = FALSE )</div></li>
<li><div class=fn><a href="#QPainter-3"><b>QPainter</b></a> ( const QPaintDevice * pd, const QWidget * copyAttributes, bool unclipped = FALSE )</div></li>
<li><div class=fn><a href="#~QPainter"><b>~QPainter</b></a> ()</div></li>
<li><div class=fn>bool <a href="#begin"><b>begin</b></a> ( const QPaintDevice * pd, bool unclipped = FALSE )</div></li>
<li><div class=fn>bool <a href="#begin-2"><b>begin</b></a> ( const QPaintDevice * pd, const QWidget * copyAttributes, bool unclipped = FALSE )</div></li>
<li><div class=fn>bool <a href="#end"><b>end</b></a> ()</div></li>
<li><div class=fn>QPaintDevice * <a href="#device"><b>device</b></a> () const</div></li>
<li><div class=fn>QGfx * <b>internalGfx</b> ()</div></li>
<li><div class=fn>bool <a href="#isActive"><b>isActive</b></a> () const</div></li>
<li><div class=fn>void <a href="#flush"><b>flush</b></a> ( const QRegion & region, CoordinateMode cm = CoordDevice )</div></li>
<li><div class=fn>void <a href="#flush-2"><b>flush</b></a> ()</div></li>
<li><div class=fn>void <a href="#save"><b>save</b></a> ()</div></li>
<li><div class=fn>void <a href="#restore"><b>restore</b></a> ()</div></li>
<li><div class=fn>QFontMetrics <a href="#fontMetrics"><b>fontMetrics</b></a> () const</div></li>
<li><div class=fn>QFontInfo <a href="#fontInfo"><b>fontInfo</b></a> () const</div></li>
<li><div class=fn>const QFont & <a href="#font"><b>font</b></a> () const</div></li>
<li><div class=fn>void <a href="#setFont"><b>setFont</b></a> ( const QFont & font )</div></li>
<li><div class=fn>const QPen & <a href="#pen"><b>pen</b></a> () const</div></li>
<li><div class=fn>void <a href="#setPen"><b>setPen</b></a> ( const QPen & pen )</div></li>
<li><div class=fn>void <a href="#setPen-2"><b>setPen</b></a> ( PenStyle style )</div></li>
<li><div class=fn>void <a href="#setPen-3"><b>setPen</b></a> ( const QColor & color )</div></li>
<li><div class=fn>const QBrush & <a href="#brush"><b>brush</b></a> () const</div></li>
<li><div class=fn>void <a href="#setBrush-2"><b>setBrush</b></a> ( const QBrush & brush )</div></li>
<li><div class=fn>void <a href="#setBrush"><b>setBrush</b></a> ( BrushStyle style )</div></li>
<li><div class=fn>void <a href="#setBrush-3"><b>setBrush</b></a> ( const QColor & color )</div></li>
<li><div class=fn>QPoint <a href="#pos"><b>pos</b></a> () const</div></li>
<li><div class=fn>const QColor & <a href="#backgroundColor"><b>backgroundColor</b></a> () const</div></li>
<li><div class=fn>void <a href="#setBackgroundColor"><b>setBackgroundColor</b></a> ( const QColor & c )</div></li>
<li><div class=fn>BGMode <a href="#backgroundMode"><b>backgroundMode</b></a> () const</div></li>
<li><div class=fn>void <a href="#setBackgroundMode"><b>setBackgroundMode</b></a> ( BGMode m )</div></li>
<li><div class=fn>RasterOp <a href="#rasterOp"><b>rasterOp</b></a> () const</div></li>
<li><div class=fn>void <a href="#setRasterOp"><b>setRasterOp</b></a> ( RasterOp r )</div></li>
<li><div class=fn>const QPoint & <a href="#brushOrigin"><b>brushOrigin</b></a> () const</div></li>
<li><div class=fn>void <a href="#setBrushOrigin"><b>setBrushOrigin</b></a> ( int x, int y )</div></li>
<li><div class=fn>void <a href="#setBrushOrigin-2"><b>setBrushOrigin</b></a> ( const QPoint & p )</div></li>
<li><div class=fn>bool <a href="#hasViewXForm"><b>hasViewXForm</b></a> () const</div></li>
<li><div class=fn>bool <a href="#hasWorldXForm"><b>hasWorldXForm</b></a> () const</div></li>
<li><div class=fn>void <a href="#setViewXForm"><b>setViewXForm</b></a> ( bool enable )</div></li>
<li><div class=fn>QRect <a href="#window"><b>window</b></a> () const</div></li>
<li><div class=fn>void <a href="#setWindow-2"><b>setWindow</b></a> ( const QRect & r )</div></li>
<li><div class=fn>void <a href="#setWindow"><b>setWindow</b></a> ( int x, int y, int w, int h )</div></li>
<li><div class=fn>QRect <a href="#viewport"><b>viewport</b></a> () const</div></li>
<li><div class=fn>void <a href="#setViewport-2"><b>setViewport</b></a> ( const QRect & r )</div></li>
<li><div class=fn>void <a href="#setViewport"><b>setViewport</b></a> ( int x, int y, int w, int h )</div></li>
<li><div class=fn>void <a href="#setWorldXForm"><b>setWorldXForm</b></a> ( bool enable )</div></li>
<li><div class=fn>const QWMatrix & <a href="#worldMatrix"><b>worldMatrix</b></a> () const</div></li>
<li><div class=fn>void <a href="#setWorldMatrix"><b>setWorldMatrix</b></a> ( const QWMatrix & m, bool combine = FALSE )</div></li>
<li><div class=fn>void saveWorldMatrix () <em>(obsolete)</em></div></li>
<li><div class=fn>void restoreWorldMatrix () <em>(obsolete)</em></div></li>
<li><div class=fn>void <a href="#scale"><b>scale</b></a> ( double sx, double sy )</div></li>
<li><div class=fn>void <a href="#shear"><b>shear</b></a> ( double sh, double sv )</div></li>
<li><div class=fn>void <a href="#rotate"><b>rotate</b></a> ( double a )</div></li>
<li><div class=fn>void <a href="#translate"><b>translate</b></a> ( double dx, double dy )</div></li>
<li><div class=fn>void <a href="#resetXForm"><b>resetXForm</b></a> ()</div></li>
<li><div class=fn>QPoint <a href="#xForm"><b>xForm</b></a> ( const QPoint & pv ) const</div></li>
<li><div class=fn>QRect <a href="#xForm-2"><b>xForm</b></a> ( const QRect & rv ) const</div></li>
<li><div class=fn>QPointArray <a href="#xForm-3"><b>xForm</b></a> ( const QPointArray & av ) const</div></li>
<li><div