Нет описания

class_q_c_p_painter.html 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  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 http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.9.1"/>
  7. <title>My Project: QCPPainter Class Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. </head>
  19. <body>
  20. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  21. <div id="titlearea">
  22. <table cellspacing="0" cellpadding="0">
  23. <tbody>
  24. <tr style="height: 56px;">
  25. <td style="padding-left: 0.5em;">
  26. <div id="projectname">My Project
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.9.1 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  42. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  43. <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
  44. <li><a href="files.html"><span>Files</span></a></li>
  45. <li>
  46. <div id="MSearchBox" class="MSearchBoxInactive">
  47. <span class="left">
  48. <img id="MSearchSelect" src="search/mag_sel.png"
  49. onmouseover="return searchBox.OnSearchSelectShow()"
  50. onmouseout="return searchBox.OnSearchSelectHide()"
  51. alt=""/>
  52. <input type="text" id="MSearchField" value="Search" accesskey="S"
  53. onfocus="searchBox.OnSearchFieldFocus(true)"
  54. onblur="searchBox.OnSearchFieldFocus(false)"
  55. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  56. </span><span class="right">
  57. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  58. </span>
  59. </div>
  60. </li>
  61. </ul>
  62. </div>
  63. <div id="navrow2" class="tabs2">
  64. <ul class="tablist">
  65. <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
  66. <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
  67. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  68. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  69. </ul>
  70. </div>
  71. <!-- window showing the filter options -->
  72. <div id="MSearchSelectWindow"
  73. onmouseover="return searchBox.OnSearchSelectShow()"
  74. onmouseout="return searchBox.OnSearchSelectHide()"
  75. onkeydown="return searchBox.OnSearchSelectKey(event)">
  76. </div>
  77. <!-- iframe showing the search results (closed by default) -->
  78. <div id="MSearchResultsWindow">
  79. <iframe src="javascript:void(0)" frameborder="0"
  80. name="MSearchResults" id="MSearchResults">
  81. </iframe>
  82. </div>
  83. </div><!-- top -->
  84. <div class="header">
  85. <div class="summary">
  86. <a href="#pub-types">Public Types</a> &#124;
  87. <a href="#pub-methods">Public Member Functions</a> &#124;
  88. <a href="#pro-attribs">Protected Attributes</a> &#124;
  89. <a href="class_q_c_p_painter-members.html">List of all members</a> </div>
  90. <div class="headertitle">
  91. <div class="title">QCPPainter Class Reference</div> </div>
  92. </div><!--header-->
  93. <div class="contents">
  94. <p>QPainter subclass used internally.
  95. <a href="class_q_c_p_painter.html#details">More...</a></p>
  96. <div class="dynheader">
  97. Inheritance diagram for QCPPainter:</div>
  98. <div class="dyncontent">
  99. <div class="center">
  100. <img src="class_q_c_p_painter.png" usemap="#QCPPainter_map" alt=""/>
  101. <map id="QCPPainter_map" name="QCPPainter_map">
  102. </map>
  103. </div></div>
  104. <table class="memberdecls">
  105. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
  106. Public Types</h2></td></tr>
  107. <tr class="memitem:a156cf16444ff5e0d81a73c615fdb156d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#a156cf16444ff5e0d81a73c615fdb156d">PainterMode</a> { <a class="el" href="class_q_c_p_painter.html#a156cf16444ff5e0d81a73c615fdb156da3bac5e87e3d58553b297befb4eee2a45">pmDefault</a> = 0x00,
  108. <a class="el" href="class_q_c_p_painter.html#a156cf16444ff5e0d81a73c615fdb156daeda679cd55dcd468341d07d48a30b6ab">pmVectorized</a> = 0x01,
  109. <a class="el" href="class_q_c_p_painter.html#a156cf16444ff5e0d81a73c615fdb156dae78f9a4eb277a5f9207f50850a51a0b0">pmNoCaching</a> = 0x02,
  110. <a class="el" href="class_q_c_p_painter.html#a156cf16444ff5e0d81a73c615fdb156dac1e481bfaf408f2bd2eaad3ec341f36b">pmNonCosmetic</a> = 0x04
  111. }</td></tr>
  112. <tr class="separator:a156cf16444ff5e0d81a73c615fdb156d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. </table><table class="memberdecls">
  114. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  115. Public Member Functions</h2></td></tr>
  116. <tr class="memitem:a3c52cb0f43f34573d29bea487da28fe8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#a3c52cb0f43f34573d29bea487da28fe8">QCPPainter</a> ()</td></tr>
  117. <tr class="separator:a3c52cb0f43f34573d29bea487da28fe8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:ae58dbb1795ddc4351ab324dc9898aa22"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#ae58dbb1795ddc4351ab324dc9898aa22">QCPPainter</a> (QPaintDevice *device)</td></tr>
  119. <tr class="separator:ae58dbb1795ddc4351ab324dc9898aa22"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a13370d7996315a7150be2fc868da3d4a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a13370d7996315a7150be2fc868da3d4a"></a>
  121. bool&#160;</td><td class="memItemRight" valign="bottom"><b>antialiasing</b> () const </td></tr>
  122. <tr class="separator:a13370d7996315a7150be2fc868da3d4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:a99b89eaf5363faaa1e1e6162856f436c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a99b89eaf5363faaa1e1e6162856f436c"></a>
  124. PainterModes&#160;</td><td class="memItemRight" valign="bottom"><b>modes</b> () const </td></tr>
  125. <tr class="separator:a99b89eaf5363faaa1e1e6162856f436c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:aaba1deb9188244d9ea65b035112b4d05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#aaba1deb9188244d9ea65b035112b4d05">setAntialiasing</a> (bool enabled)</td></tr>
  127. <tr class="separator:aaba1deb9188244d9ea65b035112b4d05"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. <tr class="memitem:af6b1f7d2bbc548b10aa55d8b6ad49577"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#af6b1f7d2bbc548b10aa55d8b6ad49577">setMode</a> (<a class="el" href="class_q_c_p_painter.html#a156cf16444ff5e0d81a73c615fdb156d">PainterMode</a> mode, bool enabled=true)</td></tr>
  129. <tr class="separator:af6b1f7d2bbc548b10aa55d8b6ad49577"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. <tr class="memitem:a5fac93adc29c7c4dea9f3e171e9e635e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#a5fac93adc29c7c4dea9f3e171e9e635e">setModes</a> (PainterModes modes)</td></tr>
  131. <tr class="separator:a5fac93adc29c7c4dea9f3e171e9e635e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:a0a41146ccd619dceab6e25ec7b46b044"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#a0a41146ccd619dceab6e25ec7b46b044">begin</a> (QPaintDevice *device)</td></tr>
  133. <tr class="separator:a0a41146ccd619dceab6e25ec7b46b044"><td class="memSeparator" colspan="2">&#160;</td></tr>
  134. <tr class="memitem:af9c7a4cd1791403901f8c5b82a150195"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#af9c7a4cd1791403901f8c5b82a150195">setPen</a> (const QPen &amp;pen)</td></tr>
  135. <tr class="separator:af9c7a4cd1791403901f8c5b82a150195"><td class="memSeparator" colspan="2">&#160;</td></tr>
  136. <tr class="memitem:a5c4d88f21564e156e88ef807f7cf0003"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#a5c4d88f21564e156e88ef807f7cf0003">setPen</a> (const QColor &amp;color)</td></tr>
  137. <tr class="separator:a5c4d88f21564e156e88ef807f7cf0003"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:a25e76095aae41da0d08035060e5f81ca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#a25e76095aae41da0d08035060e5f81ca">setPen</a> (Qt::PenStyle penStyle)</td></tr>
  139. <tr class="separator:a25e76095aae41da0d08035060e5f81ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
  140. <tr class="memitem:a0b4b1b9bd495e182c731774dc800e6e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#a0b4b1b9bd495e182c731774dc800e6e0">drawLine</a> (const QLineF &amp;line)</td></tr>
  141. <tr class="separator:a0b4b1b9bd495e182c731774dc800e6e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  142. <tr class="memitem:ad1638db27929491b3f1beb74d6cbad5e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad1638db27929491b3f1beb74d6cbad5e"></a>
  143. void&#160;</td><td class="memItemRight" valign="bottom"><b>drawLine</b> (const QPointF &amp;p1, const QPointF &amp;p2)</td></tr>
  144. <tr class="separator:ad1638db27929491b3f1beb74d6cbad5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  145. <tr class="memitem:a8fd6821ee6fecbfa04444c9062912abd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#a8fd6821ee6fecbfa04444c9062912abd">save</a> ()</td></tr>
  146. <tr class="separator:a8fd6821ee6fecbfa04444c9062912abd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  147. <tr class="memitem:a64908e6298d5bbd83457dc987cc3a022"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#a64908e6298d5bbd83457dc987cc3a022">restore</a> ()</td></tr>
  148. <tr class="separator:a64908e6298d5bbd83457dc987cc3a022"><td class="memSeparator" colspan="2">&#160;</td></tr>
  149. <tr class="memitem:a7e63fbcf47e35c6f2ecd11b8fef7c7d8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_c_p_painter.html#a7e63fbcf47e35c6f2ecd11b8fef7c7d8">makeNonCosmetic</a> ()</td></tr>
  150. <tr class="separator:a7e63fbcf47e35c6f2ecd11b8fef7c7d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  151. </table><table class="memberdecls">
  152. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
  153. Protected Attributes</h2></td></tr>
  154. <tr class="memitem:af5d1d6e5df0adbc7de5633250fb3396c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af5d1d6e5df0adbc7de5633250fb3396c"></a>
  155. PainterModes&#160;</td><td class="memItemRight" valign="bottom"><b>mModes</b></td></tr>
  156. <tr class="separator:af5d1d6e5df0adbc7de5633250fb3396c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  157. <tr class="memitem:a7055085da176aee0f6b23298f1003d08"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7055085da176aee0f6b23298f1003d08"></a>
  158. bool&#160;</td><td class="memItemRight" valign="bottom"><b>mIsAntialiasing</b></td></tr>
  159. <tr class="separator:a7055085da176aee0f6b23298f1003d08"><td class="memSeparator" colspan="2">&#160;</td></tr>
  160. <tr class="memitem:a0189e641bbf7dc31ac15aef7b36501fa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0189e641bbf7dc31ac15aef7b36501fa"></a>
  161. QStack&lt; bool &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mAntialiasingStack</b></td></tr>
  162. <tr class="separator:a0189e641bbf7dc31ac15aef7b36501fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  163. </table>
  164. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  165. <div class="textblock"><p>QPainter subclass used internally. </p>
  166. <p>This internal class 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>
  167. <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="class_q_c_p_painter.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="class_q_c_p_painter.html" title="QPainter subclass used internally. ">QCPPainter</a>). </dd></dl>
  168. </div><h2 class="groupheader">Member Enumeration Documentation</h2>
  169. <a class="anchor" id="a156cf16444ff5e0d81a73c615fdb156d"></a>
  170. <div class="memitem">
  171. <div class="memproto">
  172. <table class="memname">
  173. <tr>
  174. <td class="memname">enum <a class="el" href="class_q_c_p_painter.html#a156cf16444ff5e0d81a73c615fdb156d">QCPPainter::PainterMode</a></td>
  175. </tr>
  176. </table>
  177. </div><div class="memdoc">
  178. <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>
  179. <table class="fieldtable">
  180. <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a156cf16444ff5e0d81a73c615fdb156da3bac5e87e3d58553b297befb4eee2a45"></a>pmDefault&#160;</td><td class="fielddoc">
  181. <p><code>0x00</code> Default mode for painting on screen devices </p>
  182. </td></tr>
  183. <tr><td class="fieldname"><a class="anchor" id="a156cf16444ff5e0d81a73c615fdb156daeda679cd55dcd468341d07d48a30b6ab"></a>pmVectorized&#160;</td><td class="fielddoc">
  184. <p><code>0x01</code> Mode for vectorized painting (e.g. PDF export). For example, this prevents some antialiasing fixes. </p>
  185. </td></tr>
  186. <tr><td class="fieldname"><a class="anchor" id="a156cf16444ff5e0d81a73c615fdb156dae78f9a4eb277a5f9207f50850a51a0b0"></a>pmNoCaching&#160;</td><td class="fielddoc">
  187. <p><code>0x02</code> Mode for all sorts of exports (e.g. PNG, PDF,...). For example, this prevents using cached pixmap labels </p>
  188. </td></tr>
  189. <tr><td class="fieldname"><a class="anchor" id="a156cf16444ff5e0d81a73c615fdb156dac1e481bfaf408f2bd2eaad3ec341f36b"></a>pmNonCosmetic&#160;</td><td class="fielddoc">
  190. <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>
  191. </td></tr>
  192. </table>
  193. </div>
  194. </div>
  195. <h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  196. <a class="anchor" id="a3c52cb0f43f34573d29bea487da28fe8"></a>
  197. <div class="memitem">
  198. <div class="memproto">
  199. <table class="memname">
  200. <tr>
  201. <td class="memname">QCPPainter::QCPPainter </td>
  202. <td>(</td>
  203. <td class="paramname"></td><td>)</td>
  204. <td></td>
  205. </tr>
  206. </table>
  207. </div><div class="memdoc">
  208. <p>Creates a new <a class="el" href="class_q_c_p_painter.html" title="QPainter subclass used internally. ">QCPPainter</a> instance and sets default values </p>
  209. </div>
  210. </div>
  211. <a class="anchor" id="ae58dbb1795ddc4351ab324dc9898aa22"></a>
  212. <div class="memitem">
  213. <div class="memproto">
  214. <table class="memname">
  215. <tr>
  216. <td class="memname">QCPPainter::QCPPainter </td>
  217. <td>(</td>
  218. <td class="paramtype">QPaintDevice *&#160;</td>
  219. <td class="paramname"><em>device</em></td><td>)</td>
  220. <td></td>
  221. </tr>
  222. </table>
  223. </div><div class="memdoc">
  224. <p>Creates a new <a class="el" href="class_q_c_p_painter.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>
  225. <p>Like <a class="el" href="class_q_c_p_painter.html#a0a41146ccd619dceab6e25ec7b46b044">begin</a>, this method sets QPainter::NonCosmeticDefaultPen in Qt versions before Qt5. </p>
  226. </div>
  227. </div>
  228. <h2 class="groupheader">Member Function Documentation</h2>
  229. <a class="anchor" id="a0a41146ccd619dceab6e25ec7b46b044"></a>
  230. <div class="memitem">
  231. <div class="memproto">
  232. <table class="memname">
  233. <tr>
  234. <td class="memname">bool QCPPainter::begin </td>
  235. <td>(</td>
  236. <td class="paramtype">QPaintDevice *&#160;</td>
  237. <td class="paramname"><em>device</em></td><td>)</td>
  238. <td></td>
  239. </tr>
  240. </table>
  241. </div><div class="memdoc">
  242. <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>
  243. <p>The Constructor <a class="el" href="class_q_c_p_painter.html#ae58dbb1795ddc4351ab324dc9898aa22">QCPPainter(QPaintDevice *device)</a> which directly starts painting also sets the render hint as appropriate.</p>
  244. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation. </dd></dl>
  245. </div>
  246. </div>
  247. <a class="anchor" id="a0b4b1b9bd495e182c731774dc800e6e0"></a>
  248. <div class="memitem">
  249. <div class="memproto">
  250. <table class="memname">
  251. <tr>
  252. <td class="memname">void QCPPainter::drawLine </td>
  253. <td>(</td>
  254. <td class="paramtype">const QLineF &amp;&#160;</td>
  255. <td class="paramname"><em>line</em></td><td>)</td>
  256. <td></td>
  257. </tr>
  258. </table>
  259. </div><div class="memdoc">
  260. <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
  261. <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>
  262. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation. </dd></dl>
  263. </div>
  264. </div>
  265. <a class="anchor" id="a7e63fbcf47e35c6f2ecd11b8fef7c7d8"></a>
  266. <div class="memitem">
  267. <div class="memproto">
  268. <table class="memname">
  269. <tr>
  270. <td class="memname">void QCPPainter::makeNonCosmetic </td>
  271. <td>(</td>
  272. <td class="paramname"></td><td>)</td>
  273. <td></td>
  274. </tr>
  275. </table>
  276. </div><div class="memdoc">
  277. <p>Changes the pen width to 1 if it currently is 0. This function is called in the <a class="el" href="class_q_c_p_painter.html#af9c7a4cd1791403901f8c5b82a150195">setPen</a> overrides when the <a class="el" href="class_q_c_p_painter.html#a156cf16444ff5e0d81a73c615fdb156dac1e481bfaf408f2bd2eaad3ec341f36b">pmNonCosmetic</a> mode is set. </p>
  278. </div>
  279. </div>
  280. <a class="anchor" id="a64908e6298d5bbd83457dc987cc3a022"></a>
  281. <div class="memitem">
  282. <div class="memproto">
  283. <table class="memname">
  284. <tr>
  285. <td class="memname">void QCPPainter::restore </td>
  286. <td>(</td>
  287. <td class="paramname"></td><td>)</td>
  288. <td></td>
  289. </tr>
  290. </table>
  291. </div><div class="memdoc">
  292. <p>Restores the painter (see QPainter::restore). Since <a class="el" href="class_q_c_p_painter.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>
  293. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation.</dd></dl>
  294. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_q_c_p_painter.html#a8fd6821ee6fecbfa04444c9062912abd">save</a> </dd></dl>
  295. </div>
  296. </div>
  297. <a class="anchor" id="a8fd6821ee6fecbfa04444c9062912abd"></a>
  298. <div class="memitem">
  299. <div class="memproto">
  300. <table class="memname">
  301. <tr>
  302. <td class="memname">void QCPPainter::save </td>
  303. <td>(</td>
  304. <td class="paramname"></td><td>)</td>
  305. <td></td>
  306. </tr>
  307. </table>
  308. </div><div class="memdoc">
  309. <p>Saves the painter (see QPainter::save). Since <a class="el" href="class_q_c_p_painter.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>
  310. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation.</dd></dl>
  311. <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_q_c_p_painter.html#a64908e6298d5bbd83457dc987cc3a022">restore</a> </dd></dl>
  312. </div>
  313. </div>
  314. <a class="anchor" id="aaba1deb9188244d9ea65b035112b4d05"></a>
  315. <div class="memitem">
  316. <div class="memproto">
  317. <table class="memname">
  318. <tr>
  319. <td class="memname">void QCPPainter::setAntialiasing </td>
  320. <td>(</td>
  321. <td class="paramtype">bool&#160;</td>
  322. <td class="paramname"><em>enabled</em></td><td>)</td>
  323. <td></td>
  324. </tr>
  325. </table>
  326. </div><div class="memdoc">
  327. <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="class_q_c_p_painter.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>
  328. </div>
  329. </div>
  330. <a class="anchor" id="af6b1f7d2bbc548b10aa55d8b6ad49577"></a>
  331. <div class="memitem">
  332. <div class="memproto">
  333. <table class="memname">
  334. <tr>
  335. <td class="memname">void QCPPainter::setMode </td>
  336. <td>(</td>
  337. <td class="paramtype"><a class="el" href="class_q_c_p_painter.html#a156cf16444ff5e0d81a73c615fdb156d">QCPPainter::PainterMode</a>&#160;</td>
  338. <td class="paramname"><em>mode</em>, </td>
  339. </tr>
  340. <tr>
  341. <td class="paramkey"></td>
  342. <td></td>
  343. <td class="paramtype">bool&#160;</td>
  344. <td class="paramname"><em>enabled</em> = <code>true</code>&#160;</td>
  345. </tr>
  346. <tr>
  347. <td></td>
  348. <td>)</td>
  349. <td></td><td></td>
  350. </tr>
  351. </table>
  352. </div><div class="memdoc">
  353. <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
  354. <p>Sets the mode of the painter. This controls whether the painter shall adjust its fixes/workarounds optimized for certain output devices. </p>
  355. </div>
  356. </div>
  357. <a class="anchor" id="a5fac93adc29c7c4dea9f3e171e9e635e"></a>
  358. <div class="memitem">
  359. <div class="memproto">
  360. <table class="memname">
  361. <tr>
  362. <td class="memname">void QCPPainter::setModes </td>
  363. <td>(</td>
  364. <td class="paramtype">PainterModes&#160;</td>
  365. <td class="paramname"><em>modes</em></td><td>)</td>
  366. <td></td>
  367. </tr>
  368. </table>
  369. </div><div class="memdoc">
  370. <p>Sets the mode of the painter. This controls whether the painter shall adjust its fixes/workarounds optimized for certain output devices. </p>
  371. </div>
  372. </div>
  373. <a class="anchor" id="af9c7a4cd1791403901f8c5b82a150195"></a>
  374. <div class="memitem">
  375. <div class="memproto">
  376. <table class="memname">
  377. <tr>
  378. <td class="memname">void QCPPainter::setPen </td>
  379. <td>(</td>
  380. <td class="paramtype">const QPen &amp;&#160;</td>
  381. <td class="paramname"><em>pen</em></td><td>)</td>
  382. <td></td>
  383. </tr>
  384. </table>
  385. </div><div class="memdoc">
  386. <p>Sets the pen of the painter and applies certain fixes to it, depending on the mode of this <a class="el" href="class_q_c_p_painter.html" title="QPainter subclass used internally. ">QCPPainter</a>.</p>
  387. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation. </dd></dl>
  388. </div>
  389. </div>
  390. <a class="anchor" id="a5c4d88f21564e156e88ef807f7cf0003"></a>
  391. <div class="memitem">
  392. <div class="memproto">
  393. <table class="memname">
  394. <tr>
  395. <td class="memname">void QCPPainter::setPen </td>
  396. <td>(</td>
  397. <td class="paramtype">const QColor &amp;&#160;</td>
  398. <td class="paramname"><em>color</em></td><td>)</td>
  399. <td></td>
  400. </tr>
  401. </table>
  402. </div><div class="memdoc">
  403. <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
  404. <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="class_q_c_p_painter.html" title="QPainter subclass used internally. ">QCPPainter</a>.</p>
  405. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation. </dd></dl>
  406. </div>
  407. </div>
  408. <a class="anchor" id="a25e76095aae41da0d08035060e5f81ca"></a>
  409. <div class="memitem">
  410. <div class="memproto">
  411. <table class="memname">
  412. <tr>
  413. <td class="memname">void QCPPainter::setPen </td>
  414. <td>(</td>
  415. <td class="paramtype">Qt::PenStyle&#160;</td>
  416. <td class="paramname"><em>penStyle</em></td><td>)</td>
  417. <td></td>
  418. </tr>
  419. </table>
  420. </div><div class="memdoc">
  421. <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
  422. <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="class_q_c_p_painter.html" title="QPainter subclass used internally. ">QCPPainter</a>.</p>
  423. <dl class="section note"><dt>Note</dt><dd>this function hides the non-virtual base class implementation. </dd></dl>
  424. </div>
  425. </div>
  426. <hr/>The documentation for this class was generated from the following files:<ul>
  427. <li><a class="el" href="qcustomplot_8h_source.html">qcustomplot.h</a></li>
  428. <li><a class="el" href="qcustomplot_8cpp.html">qcustomplot.cpp</a></li>
  429. </ul>
  430. </div><!-- contents -->
  431. <!-- start footer part -->
  432. <hr class="footer"/><address class="footer"><small>
  433. Generated on Tue Aug 11 2015 13:04:53 for My Project by &#160;<a href="http://www.doxygen.org/index.html">
  434. <img class="footer" src="doxygen.png" alt="doxygen"/>
  435. </a> 1.8.9.1
  436. </small></address>
  437. </body>
  438. </html>