classQCPPainter.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta name="author" content="Emanuel Eichhammer" />
  6. <meta name="copyright" content="(C) 2013-2015 Emanuel Eichhammer" />
  7. <title>QCPPainter Class Reference</title>
  8. <link href="qt.css" rel="stylesheet" type="text/css"/>
  9. </head>
  10. <body>
  11. <div id="top">
  12. <a class="headerLink" href="index.html">Main Page</a> &middot;
  13. <a class="headerLink" href="classoverview.html">Class Overview</a> &middot;
  14. <a class="headerLink" href="hierarchy.html">Hierarchy</a> &middot;
  15. <a class="headerLink" href="annotated.html">All Classes</a> &middot;
  16. <a class="headerLink" href="pages.html">Special Pages</a>
  17. <!-- Generated by Doxygen 1.8.6 -->
  18. </div><!-- top -->
  19. <div class="header">
  20. <div class="summary">
  21. <a href="#pub-types">Public Types</a> &#124;
  22. <a href="#pub-methods">Public Functions</a> </div>
  23. <div class="headertitle">
  24. <div class="title">QCPPainter Class Reference</div> </div>
  25. </div><!--header-->
  26. <div class="contents">
  27. <p>QPainter subclass used internally.
  28. <a href="classQCPPainter.html#details">More...</a></p>
  29. <p>Inherits QPainter.</p>
  30. <table class="memberdecls">
  31. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
  32. Public Types</h2></td></tr>
  33. <tr class="memitem:a156cf16444ff5e0d81a73c615fdb156d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#a156cf16444ff5e0d81a73c615fdb156d">PainterMode</a> </td></tr>
  34. <tr class="separator:a156cf16444ff5e0d81a73c615fdb156d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  35. </table><table class="memberdecls">
  36. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  37. Public Functions</h2></td></tr>
  38. <tr class="memitem:a3c52cb0f43f34573d29bea487da28fe8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#a3c52cb0f43f34573d29bea487da28fe8">QCPPainter</a> ()</td></tr>
  39. <tr class="separator:a3c52cb0f43f34573d29bea487da28fe8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  40. <tr class="memitem:ae58dbb1795ddc4351ab324dc9898aa22"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#ae58dbb1795ddc4351ab324dc9898aa22">QCPPainter</a> (QPaintDevice *device)</td></tr>
  41. <tr class="separator:ae58dbb1795ddc4351ab324dc9898aa22"><td class="memSeparator" colspan="2">&#160;</td></tr>
  42. <tr class="memitem:a13370d7996315a7150be2fc868da3d4a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a13370d7996315a7150be2fc868da3d4a"></a>
  43. bool&#160;</td><td class="memItemRight" valign="bottom"><b>antialiasing</b> () const </td></tr>
  44. <tr class="separator:a13370d7996315a7150be2fc868da3d4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  45. <tr class="memitem:a99b89eaf5363faaa1e1e6162856f436c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a99b89eaf5363faaa1e1e6162856f436c"></a>
  46. PainterModes&#160;</td><td class="memItemRight" valign="bottom"><b>modes</b> () const </td></tr>
  47. <tr class="separator:a99b89eaf5363faaa1e1e6162856f436c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  48. <tr class="memitem:aaba1deb9188244d9ea65b035112b4d05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#aaba1deb9188244d9ea65b035112b4d05">setAntialiasing</a> (bool enabled)</td></tr>
  49. <tr class="separator:aaba1deb9188244d9ea65b035112b4d05"><td class="memSeparator" colspan="2">&#160;</td></tr>
  50. <tr class="memitem:af6b1f7d2bbc548b10aa55d8b6ad49577"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#af6b1f7d2bbc548b10aa55d8b6ad49577">setMode</a> (<a class="el" href="classQCPPainter.html#a156cf16444ff5e0d81a73c615fdb156d">PainterMode</a> mode, bool enabled=true)</td></tr>
  51. <tr class="separator:af6b1f7d2bbc548b10aa55d8b6ad49577"><td class="memSeparator" colspan="2">&#160;</td></tr>
  52. <tr class="memitem:a5fac93adc29c7c4dea9f3e171e9e635e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#a5fac93adc29c7c4dea9f3e171e9e635e">setModes</a> (PainterModes modes)</td></tr>
  53. <tr class="separator:a5fac93adc29c7c4dea9f3e171e9e635e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  54. <tr class="memitem:a0a41146ccd619dceab6e25ec7b46b044"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#a0a41146ccd619dceab6e25ec7b46b044">begin</a> (QPaintDevice *device)</td></tr>
  55. <tr class="separator:a0a41146ccd619dceab6e25ec7b46b044"><td class="memSeparator" colspan="2">&#160;</td></tr>
  56. <tr class="memitem:af9c7a4cd1791403901f8c5b82a150195"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#af9c7a4cd1791403901f8c5b82a150195">setPen</a> (const QPen &amp;pen)</td></tr>
  57. <tr class="separator:af9c7a4cd1791403901f8c5b82a150195"><td class="memSeparator" colspan="2">&#160;</td></tr>
  58. <tr class="memitem:a5c4d88f21564e156e88ef807f7cf0003"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#a5c4d88f21564e156e88ef807f7cf0003">setPen</a> (const QColor &amp;color)</td></tr>
  59. <tr class="separator:a5c4d88f21564e156e88ef807f7cf0003"><td class="memSeparator" colspan="2">&#160;</td></tr>
  60. <tr class="memitem:a25e76095aae41da0d08035060e5f81ca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#a25e76095aae41da0d08035060e5f81ca">setPen</a> (Qt::PenStyle penStyle)</td></tr>
  61. <tr class="separator:a25e76095aae41da0d08035060e5f81ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
  62. <tr class="memitem:a0b4b1b9bd495e182c731774dc800e6e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#a0b4b1b9bd495e182c731774dc800e6e0">drawLine</a> (const QLineF &amp;line)</td></tr>
  63. <tr class="separator:a0b4b1b9bd495e182c731774dc800e6e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  64. <tr class="memitem:ad1638db27929491b3f1beb74d6cbad5e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad1638db27929491b3f1beb74d6cbad5e"></a>
  65. void&#160;</td><td class="memItemRight" valign="bottom"><b>drawLine</b> (const QPointF &amp;p1, const QPointF &amp;p2)</td></tr>
  66. <tr class="separator:ad1638db27929491b3f1beb74d6cbad5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  67. <tr class="memitem:a8fd6821ee6fecbfa04444c9062912abd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#a8fd6821ee6fecbfa04444c9062912abd">save</a> ()</td></tr>
  68. <tr class="separator:a8fd6821ee6fecbfa04444c9062912abd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  69. <tr class="memitem:a64908e6298d5bbd83457dc987cc3a022"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#a64908e6298d5bbd83457dc987cc3a022">restore</a> ()</td></tr>
  70. <tr class="separator:a64908e6298d5bbd83457dc987cc3a022"><td class="memSeparator" colspan="2">&#160;</td></tr>
  71. <tr class="memitem:a7e63fbcf47e35c6f2ecd11b8fef7c7d8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQCPPainter.html#a7e63fbcf47e35c6f2ecd11b8fef7c7d8">makeNonCosmetic</a> ()</td></tr>
  72. <tr class="separator:a7e63fbcf47e35c6f2ecd11b8fef7c7d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  73. </table>
  74. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  75. <div class="textblock"><p>QPainter subclass used internally. </p>
  76. <p>This QPainter subclass is used to provide some extended functionality e.g. for tweaking position consistency between antialiased and non-antialiased painting. Further it provides workarounds for QPainter quirks.</p>
  77. <dl class="section warning"><dt>Warning</dt><dd>This class intentionally hides non-virtual functions of QPainter, e.g. setPen, save and restore. So while it is possible to pass a <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a> instance to a function that expects a QPainter pointer, some of the workarounds and tweaks will be unavailable to the function (because it will call the base class implementations of the functions actually hidden by <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a>). </dd></dl>
  78. </div><h2 class="groupheader">Member Enumeration Documentation</h2>
  79. <a class="anchor" id="a156cf16444ff5e0d81a73c615fdb156d"></a>
  80. <div class="memitem">
  81. <div class="memproto">
  82. <table class="memname">
  83. <tr>
  84. <td class="memname">enum <a class="el" href="classQCPPainter.html#a156cf16444ff5e0d81a73c615fdb156d">QCPPainter::PainterMode</a></td>
  85. </tr>
  86. </table>
  87. </div><div class="memdoc">
  88. <p>Defines special modes the painter can operate in. They disable or enable certain subsets of features/fixes/workarounds, depending on whether they are wanted on the respective output device. </p>
  89. <table class="fieldtable">
  90. <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a156cf16444ff5e0d81a73c615fdb156da3bac5e87e3d58553b297befb4eee2a45"></a>pmDefault</em>&#160;</td><td class="fielddoc">
  91. <p><code>0x00</code> Default mode for painting on screen devices </p>
  92. </td></tr>
  93. <tr><td class="fieldname"><em><a class="anchor" id="a156cf16444ff5e0d81a73c615fdb156daeda679cd55dcd468341d07d48a30b6ab"></a>pmVectorized</em>&#160;</td><td class="fielddoc">
  94. <p><code>0x01</code> Mode for vectorized painting (e.g. PDF export). For example, this prevents some antialiasing fixes. </p>
  95. </td></tr>
  96. <tr><td class="fieldname"><em><a class="anchor" id="a156cf16444ff5e0d81a73c615fdb156dae78f9a4eb277a5f9207f50850a51a0b0"></a>pmNoCaching</em>&#160;</td><td class="fielddoc">
  97. <p><code>0x02</code> Mode for all sorts of exports (e.g. PNG, PDF,...). For example, this prevents using cached pixmap labels </p>
  98. </td></tr>
  99. <tr><td class="fieldname"><em><a class="anchor" id="a156cf16444ff5e0d81a73c615fdb156dac1e481bfaf408f2bd2eaad3ec341f36b"></a>pmNonCosmetic</em>&#160;</td><td class="fielddoc">
  100. <p><code>0x04</code> Turns pen widths 0 to 1, i.e. disables cosmetic pens. (A cosmetic pen is always drawn with width 1 pixel in the vector image/pdf viewer, independent of zoom.) </p>
  101. </td></tr>
  102. </table>
  103. </div>
  104. </div>
  105. <h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  106. <a class="anchor" id="a3c52cb0f43f34573d29bea487da28fe8"></a>
  107. <div class="memitem">
  108. <div class="memproto">
  109. <table class="memname">
  110. <tr>
  111. <td class="memname">QCPPainter::QCPPainter </td>
  112. <td>(</td>
  113. <td class="paramname"></td><td>)</td>
  114. <td></td>
  115. </tr>
  116. </table>
  117. </div><div class="memdoc">
  118. <p>Creates a new <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a> instance and sets default values </p>
  119. </div>
  120. </div>
  121. <a class="anchor" id="ae58dbb1795ddc4351ab324dc9898aa22"></a>
  122. <div class="memitem">
  123. <div class="memproto">
  124. <table class="memname">
  125. <tr>
  126. <td class="memname">QCPPainter::QCPPainter </td>
  127. <td>(</td>
  128. <td class="paramtype">QPaintDevice *&#160;</td>
  129. <td class="paramname"><em>device</em></td><td>)</td>
  130. <td></td>
  131. </tr>
  132. </table>
  133. </div><div class="memdoc">
  134. <p>Creates a new <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a> instance on the specified paint <em>device</em> and sets default values. Just like the analogous QPainter constructor, begins painting on <em>device</em> immediately.</p>
  135. <p>Like <a class="el" href="classQCPPainter.html#a0a41146ccd619dceab6e25ec7b46b044">begin</a>, this method sets QPainter::NonCosmeticDefaultPen in Qt versions before Qt5. </p>
  136. </div>
  137. </div>
  138. <h2 class="groupheader">Member Function Documentation</h2>
  139. <a class="anchor" id="aaba1deb9188244d9ea65b035112b4d05"></a>
  140. <div class="memitem">
  141. <div class="memproto">
  142. <table class="memname">
  143. <tr>
  144. <td class="memname">void QCPPainter::setAntialiasing </td>
  145. <td>(</td>
  146. <td class="paramtype">bool&#160;</td>
  147. <td class="paramname"><em>enabled</em></td><td>)</td>
  148. <td></td>
  149. </tr>
  150. </table>
  151. </div><div class="memdoc">
  152. <p>Sets whether painting uses antialiasing or not. Use this method instead of using setRenderHint with QPainter::Antialiasing directly, as it allows <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a> to regain pixel exactness between antialiased and non-antialiased painting (Since Qt &lt; 5.0 uses slightly different coordinate systems for AA/Non-AA painting). </p>
  153. </div>
  154. </div>
  155. <a class="anchor" id="af6b1f7d2bbc548b10aa55d8b6ad49577"></a>
  156. <div class="memitem">
  157. <div class="memproto">
  158. <table class="memname">
  159. <tr>
  160. <td class="memname">void QCPPainter::setMode </td>
  161. <td>(</td>
  162. <td class="paramtype"><a class="el" href="classQCPPainter.html#a156cf16444ff5e0d81a73c615fdb156d">QCPPainter::PainterMode</a>&#160;</td>
  163. <td class="paramname"><em>mode</em>, </td>
  164. </tr>
  165. <tr>
  166. <td class="paramkey"></td>
  167. <td></td>
  168. <td class="paramtype">bool&#160;</td>
  169. <td class="paramname"><em>enabled</em> = <code>true</code>&#160;</td>
  170. </tr>
  171. <tr>
  172. <td></td>
  173. <td>)</td>
  174. <td></td><td></td>
  175. </tr>
  176. </table>
  177. </div><div class="memdoc">
  178. <p>This is an overloaded function.</p>
  179. <p>Sets the mode of the painter. This controls whether the painter shall adjust its fixes/workarounds optimized for certain output devices. </p>
  180. </div>
  181. </div>
  182. <a class="anchor" id="a5fac93adc29c7c4dea9f3e171e9e635e"></a>
  183. <div class="memitem">
  184. <div class="memproto">
  185. <table class="memname">
  186. <tr>
  187. <td class="memname">void QCPPainter::setModes </td>
  188. <td>(</td>
  189. <td class="paramtype">PainterModes&#160;</td>
  190. <td class="paramname"><em>modes</em></td><td>)</td>
  191. <td></td>
  192. </tr>
  193. </table>
  194. </div><div class="memdoc">
  195. <p>Sets the mode of the painter. This controls whether the painter shall adjust its fixes/workarounds optimized for certain output devices. </p>
  196. </div>
  197. </div>
  198. <a class="anchor" id="a0a41146ccd619dceab6e25ec7b46b044"></a>
  199. <div class="memitem">
  200. <div class="memproto">
  201. <table class="memname">
  202. <tr>
  203. <td class="memname">bool QCPPainter::begin </td>
  204. <td>(</td>
  205. <td class="paramtype">QPaintDevice *&#160;</td>
  206. <td class="paramname"><em>device</em></td><td>)</td>
  207. <td></td>
  208. </tr>
  209. </table>
  210. </div><div class="memdoc">
  211. <p>Sets the QPainter::NonCosmeticDefaultPen in Qt versions before Qt5 after beginning painting on <em>device</em>. This is necessary to get cosmetic pen consistency across Qt versions, because since Qt5, all pens are non-cosmetic by default, and in Qt4 this render hint must be set to get that behaviour.</p>
  212. <p>The Constructor <a class="el" href="classQCPPainter.html#ae58dbb1795ddc4351ab324dc9898aa22">QCPPainter(QPaintDevice *device)</a> which directly starts painting also sets the render hint as appropriate.</p>
  213. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation. </dd></dl>
  214. </div>
  215. </div>
  216. <a class="anchor" id="af9c7a4cd1791403901f8c5b82a150195"></a>
  217. <div class="memitem">
  218. <div class="memproto">
  219. <table class="memname">
  220. <tr>
  221. <td class="memname">void QCPPainter::setPen </td>
  222. <td>(</td>
  223. <td class="paramtype">const QPen &amp;&#160;</td>
  224. <td class="paramname"><em>pen</em></td><td>)</td>
  225. <td></td>
  226. </tr>
  227. </table>
  228. </div><div class="memdoc">
  229. <p>Sets the pen of the painter and applies certain fixes to it, depending on the mode of this <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a>.</p>
  230. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation. </dd></dl>
  231. </div>
  232. </div>
  233. <a class="anchor" id="a5c4d88f21564e156e88ef807f7cf0003"></a>
  234. <div class="memitem">
  235. <div class="memproto">
  236. <table class="memname">
  237. <tr>
  238. <td class="memname">void QCPPainter::setPen </td>
  239. <td>(</td>
  240. <td class="paramtype">const QColor &amp;&#160;</td>
  241. <td class="paramname"><em>color</em></td><td>)</td>
  242. <td></td>
  243. </tr>
  244. </table>
  245. </div><div class="memdoc">
  246. <p>This is an overloaded function.</p>
  247. <p>Sets the pen (by color) of the painter and applies certain fixes to it, depending on the mode of this <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a>.</p>
  248. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation. </dd></dl>
  249. </div>
  250. </div>
  251. <a class="anchor" id="a25e76095aae41da0d08035060e5f81ca"></a>
  252. <div class="memitem">
  253. <div class="memproto">
  254. <table class="memname">
  255. <tr>
  256. <td class="memname">void QCPPainter::setPen </td>
  257. <td>(</td>
  258. <td class="paramtype">Qt::PenStyle&#160;</td>
  259. <td class="paramname"><em>penStyle</em></td><td>)</td>
  260. <td></td>
  261. </tr>
  262. </table>
  263. </div><div class="memdoc">
  264. <p>This is an overloaded function.</p>
  265. <p>Sets the pen (by style) of the painter and applies certain fixes to it, depending on the mode of this <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a>.</p>
  266. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation. </dd></dl>
  267. </div>
  268. </div>
  269. <a class="anchor" id="a0b4b1b9bd495e182c731774dc800e6e0"></a>
  270. <div class="memitem">
  271. <div class="memproto">
  272. <table class="memname">
  273. <tr>
  274. <td class="memname">void QCPPainter::drawLine </td>
  275. <td>(</td>
  276. <td class="paramtype">const QLineF &amp;&#160;</td>
  277. <td class="paramname"><em>line</em></td><td>)</td>
  278. <td></td>
  279. </tr>
  280. </table>
  281. </div><div class="memdoc">
  282. <p>This is an overloaded function.</p>
  283. <p>Works around a Qt bug introduced with Qt 4.8 which makes drawing QLineF unpredictable when antialiasing is disabled. Thus when antialiasing is disabled, it rounds the <em>line</em> to integer coordinates and then passes it to the original drawLine.</p>
  284. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation. </dd></dl>
  285. </div>
  286. </div>
  287. <a class="anchor" id="a8fd6821ee6fecbfa04444c9062912abd"></a>
  288. <div class="memitem">
  289. <div class="memproto">
  290. <table class="memname">
  291. <tr>
  292. <td class="memname">void QCPPainter::save </td>
  293. <td>(</td>
  294. <td class="paramname"></td><td>)</td>
  295. <td></td>
  296. </tr>
  297. </table>
  298. </div><div class="memdoc">
  299. <p>Saves the painter (see QPainter::save). Since <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a> adds some new internal state to QPainter, the save/restore functions are reimplemented to also save/restore those members.</p>
  300. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation.</dd></dl>
  301. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPPainter.html#a64908e6298d5bbd83457dc987cc3a022">restore</a> </dd></dl>
  302. </div>
  303. </div>
  304. <a class="anchor" id="a64908e6298d5bbd83457dc987cc3a022"></a>
  305. <div class="memitem">
  306. <div class="memproto">
  307. <table class="memname">
  308. <tr>
  309. <td class="memname">void QCPPainter::restore </td>
  310. <td>(</td>
  311. <td class="paramname"></td><td>)</td>
  312. <td></td>
  313. </tr>
  314. </table>
  315. </div><div class="memdoc">
  316. <p>Restores the painter (see QPainter::restore). Since <a class="el" href="classQCPPainter.html" title="QPainter subclass used internally. ">QCPPainter</a> adds some new internal state to QPainter, the save/restore functions are reimplemented to also save/restore those members.</p>
  317. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation.</dd></dl>
  318. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classQCPPainter.html#a8fd6821ee6fecbfa04444c9062912abd">save</a> </dd></dl>
  319. </div>
  320. </div>
  321. <a class="anchor" id="a7e63fbcf47e35c6f2ecd11b8fef7c7d8"></a>
  322. <div class="memitem">
  323. <div class="memproto">
  324. <table class="memname">
  325. <tr>
  326. <td class="memname">void QCPPainter::makeNonCosmetic </td>
  327. <td>(</td>
  328. <td class="paramname"></td><td>)</td>
  329. <td></td>
  330. </tr>
  331. </table>
  332. </div><div class="memdoc">
  333. <p>Changes the pen width to 1 if it currently is 0. This function is called in the <a class="el" href="classQCPPainter.html#af9c7a4cd1791403901f8c5b82a150195">setPen</a> overrides when the <a class="el" href="classQCPPainter.html#a156cf16444ff5e0d81a73c615fdb156dac1e481bfaf408f2bd2eaad3ec341f36b">pmNonCosmetic</a> mode is set. </p>
  334. </div>
  335. </div>
  336. <hr/>The documentation for this class was generated from the following files:<ul>
  337. <li>src/painter.h</li>
  338. <li>src/painter.cpp</li>
  339. </ul>
  340. </div><!-- contents -->
  341. </body>
  342. </html>