QwtGraphic.3 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693
  1. .TH "QwtGraphic" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtGraphic \- A paint device for scalable graphics\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_graphic\&.h>\fP
  11. .PP
  12. Inherits \fBQwtNullPaintDevice\fP\&.
  13. .SS "Public Types"
  14. .in +1c
  15. .ti -1c
  16. .RI "enum \fBRenderHint\fP { \fBRenderPensUnscaled\fP = 0x1 }"
  17. .br
  18. .ti -1c
  19. .RI "typedef QFlags< \fBRenderHint\fP > \fBRenderHints\fP"
  20. .br
  21. .RI "Render hints\&. "
  22. .in -1c
  23. .SS "Public Member Functions"
  24. .in +1c
  25. .ti -1c
  26. .RI "\fBQwtGraphic\fP ()"
  27. .br
  28. .RI "Constructor\&. "
  29. .ti -1c
  30. .RI "\fBQwtGraphic\fP (const \fBQwtGraphic\fP &)"
  31. .br
  32. .RI "Copy constructor\&. "
  33. .ti -1c
  34. .RI "virtual \fB~QwtGraphic\fP ()"
  35. .br
  36. .RI "Destructor\&. "
  37. .ti -1c
  38. .RI "\fBQwtGraphic\fP & \fBoperator=\fP (const \fBQwtGraphic\fP &)"
  39. .br
  40. .RI "Assignment operator\&. "
  41. .ti -1c
  42. .RI "void \fBreset\fP ()"
  43. .br
  44. .RI "Clear all stored commands\&. "
  45. .ti -1c
  46. .RI "bool \fBisNull\fP () const"
  47. .br
  48. .ti -1c
  49. .RI "bool \fBisEmpty\fP () const"
  50. .br
  51. .ti -1c
  52. .RI "void \fBrender\fP (QPainter *) const"
  53. .br
  54. .RI "Replay all recorded painter commands\&. "
  55. .ti -1c
  56. .RI "void \fBrender\fP (QPainter *, const QSizeF &, Qt::AspectRatioMode=Qt::IgnoreAspectRatio) const"
  57. .br
  58. .RI "Replay all recorded painter commands\&. "
  59. .ti -1c
  60. .RI "void \fBrender\fP (QPainter *, const QRectF &, Qt::AspectRatioMode=Qt::IgnoreAspectRatio) const"
  61. .br
  62. .RI "Replay all recorded painter commands\&. "
  63. .ti -1c
  64. .RI "void \fBrender\fP (QPainter *, const QPointF &, Qt::Alignment=Qt::AlignTop|Qt::AlignLeft) const"
  65. .br
  66. .RI "Replay all recorded painter commands\&. "
  67. .ti -1c
  68. .RI "QPixmap \fBtoPixmap\fP () const"
  69. .br
  70. .RI "Convert the graphic to a QPixmap\&. "
  71. .ti -1c
  72. .RI "QPixmap \fBtoPixmap\fP (const QSize &, Qt::AspectRatioMode=Qt::IgnoreAspectRatio) const"
  73. .br
  74. .RI "Convert the graphic to a QPixmap\&. "
  75. .ti -1c
  76. .RI "QImage \fBtoImage\fP () const"
  77. .br
  78. .RI "Convert the graphic to a QImage\&. "
  79. .ti -1c
  80. .RI "QImage \fBtoImage\fP (const QSize &, Qt::AspectRatioMode=Qt::IgnoreAspectRatio) const"
  81. .br
  82. .RI "Convert the graphic to a QImage\&. "
  83. .ti -1c
  84. .RI "QRectF \fBscaledBoundingRect\fP (double sx, double sy) const"
  85. .br
  86. .RI "Calculate the target rectangle for scaling the graphic\&. "
  87. .ti -1c
  88. .RI "QRectF \fBboundingRect\fP () const"
  89. .br
  90. .ti -1c
  91. .RI "QRectF \fBcontrolPointRect\fP () const"
  92. .br
  93. .ti -1c
  94. .RI "const QVector< \fBQwtPainterCommand\fP > & \fBcommands\fP () const"
  95. .br
  96. .ti -1c
  97. .RI "void \fBsetCommands\fP (QVector< \fBQwtPainterCommand\fP > &)"
  98. .br
  99. .RI "Append paint commands\&. "
  100. .ti -1c
  101. .RI "void \fBsetDefaultSize\fP (const QSizeF &)"
  102. .br
  103. .RI "Set a default size\&. "
  104. .ti -1c
  105. .RI "QSizeF \fBdefaultSize\fP () const"
  106. .br
  107. .RI "Default size\&. "
  108. .ti -1c
  109. .RI "void \fBsetRenderHint\fP (\fBRenderHint\fP, bool on=true)"
  110. .br
  111. .ti -1c
  112. .RI "bool \fBtestRenderHint\fP (\fBRenderHint\fP) const"
  113. .br
  114. .in -1c
  115. .SS "Protected Member Functions"
  116. .in +1c
  117. .ti -1c
  118. .RI "virtual QSize \fBsizeMetrics\fP () const"
  119. .br
  120. .ti -1c
  121. .RI "virtual void \fBdrawPath\fP (const QPainterPath &)"
  122. .br
  123. .ti -1c
  124. .RI "virtual void \fBdrawPixmap\fP (const QRectF &, const QPixmap &, const QRectF &)"
  125. .br
  126. .RI "Store a pixmap command in the command list\&. "
  127. .ti -1c
  128. .RI "virtual void \fBdrawImage\fP (const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags)"
  129. .br
  130. .RI "Store a image command in the command list\&. "
  131. .ti -1c
  132. .RI "virtual void \fBupdateState\fP (const QPaintEngineState &state)"
  133. .br
  134. .RI "Store a state command in the command list\&. "
  135. .in -1c
  136. .SH "Detailed Description"
  137. .PP
  138. A paint device for scalable graphics\&.
  139. \fBQwtGraphic\fP is the representation of a graphic that is tailored for scalability\&. Like QPicture it will be initialized by QPainter operations and can be replayed later to any target paint device\&.
  140. .PP
  141. While the usual image representations QImage and QPixmap are not scalable Qt offers two paint devices, that might be candidates for representing a vector graphic:
  142. .PP
  143. .IP "\(bu" 2
  144. QPicture
  145. .br
  146. Unfortunately QPicture had been forgotten, when Qt4 introduced floating point based render engines\&. Its API is still on integers, what make it unusable for proper scaling\&.
  147. .IP "\(bu" 2
  148. QSvgRenderer/QSvgGenerator
  149. .br
  150. Unfortunately QSvgRenderer hides to much information about its nodes in internal APIs, that are necessary for proper layout calculations\&. Also it is derived from QObject and can't be copied like QImage/QPixmap\&.
  151. .PP
  152. .PP
  153. \fBQwtGraphic\fP maps all scalable drawing primitives to a QPainterPath and stores them together with the painter state changes ( pen, brush, transformation \&.\&.\&. ) in a list of QwtPaintCommands\&. For being a complete QPaintDevice it also stores pixmaps or images, what is somehow against the idea of the class, because these objects can't be scaled without a loss in quality\&.
  154. .PP
  155. The main issue about scaling a \fBQwtGraphic\fP object are the pens used for drawing the outlines of the painter paths\&. While non cosmetic pens ( QPen::isCosmetic() ) are scaled with the same ratio as the path, cosmetic pens have a fixed width\&. A graphic might have paths with different pens - cosmetic and non-cosmetic\&.
  156. .PP
  157. \fBQwtGraphic\fP caches 2 different rectangles:
  158. .PP
  159. .IP "\(bu" 2
  160. control point rectangle
  161. .br
  162. The control point rectangle is the bounding rectangle of all control point rectangles of the painter paths, or the target rectangle of the pixmaps/images\&.
  163. .IP "\(bu" 2
  164. bounding rectangle
  165. .br
  166. The bounding rectangle extends the control point rectangle by what is needed for rendering the outline with an unscaled pen\&.
  167. .PP
  168. .PP
  169. Because the offset for drawing the outline depends on the shape of the painter path ( the peak of a triangle is different than the flat side ) scaling with a fixed aspect ratio always needs to be calculated from the control point rectangle\&.
  170. .PP
  171. \fBSee also\fP
  172. .RS 4
  173. \fBQwtPainterCommand\fP
  174. .RE
  175. .PP
  176. .SH "Member Typedef Documentation"
  177. .PP
  178. .SS "typedef QFlags<\fBRenderHint\fP> \fBQwtGraphic::RenderHints\fP"
  179. .PP
  180. Render hints\&. The default setting is to disable all hints
  181. .SH "Member Enumeration Documentation"
  182. .PP
  183. .SS "enum \fBQwtGraphic::RenderHint\fP"
  184. Hint how to render a graphic
  185. .PP
  186. \fBSee also\fP
  187. .RS 4
  188. \fBsetRenderHint()\fP, \fBtestRenderHint()\fP
  189. .RE
  190. .PP
  191. .PP
  192. \fBEnumerator\fP
  193. .in +1c
  194. .TP
  195. \fB\fIRenderPensUnscaled \fP\fP
  196. When rendering a \fBQwtGraphic\fP a specific scaling between the \fBcontrolPointRect()\fP and the coordinates of the target rectangle is set up internally in \fBrender()\fP\&.
  197. .PP
  198. When RenderPensUnscaled is set this specific scaling is applied for the control points only, but not for the pens\&. All other painter transformations ( set up by application code ) are supposed to work like usual\&.
  199. .PP
  200. \fBSee also\fP
  201. .RS 4
  202. \fBrender()\fP;
  203. .RE
  204. .PP
  205. .SH "Constructor & Destructor Documentation"
  206. .PP
  207. .SS "QwtGraphic::QwtGraphic ()"
  208. .PP
  209. Constructor\&. Initializes a null graphic
  210. .PP
  211. \fBSee also\fP
  212. .RS 4
  213. \fBisNull()\fP
  214. .RE
  215. .PP
  216. .SS "QwtGraphic::QwtGraphic (const \fBQwtGraphic\fP & other)"
  217. .PP
  218. Copy constructor\&.
  219. .PP
  220. \fBParameters\fP
  221. .RS 4
  222. \fIother\fP Source
  223. .RE
  224. .PP
  225. \fBSee also\fP
  226. .RS 4
  227. \fBoperator=()\fP
  228. .RE
  229. .PP
  230. .SH "Member Function Documentation"
  231. .PP
  232. .SS "QRectF QwtGraphic::boundingRect () const"
  233. The bounding rectangle is the \fBcontrolPointRect()\fP extended by the areas needed for rendering the outlines with unscaled pens\&.
  234. .PP
  235. \fBReturns\fP
  236. .RS 4
  237. Bounding rectangle of the graphic
  238. .RE
  239. .PP
  240. \fBSee also\fP
  241. .RS 4
  242. \fBcontrolPointRect()\fP, \fBscaledBoundingRect()\fP
  243. .RE
  244. .PP
  245. .SS "const QVector< \fBQwtPainterCommand\fP > & QwtGraphic::commands () const"
  246. .PP
  247. \fBReturns\fP
  248. .RS 4
  249. List of recorded paint commands
  250. .RE
  251. .PP
  252. \fBSee also\fP
  253. .RS 4
  254. \fBsetCommands()\fP
  255. .RE
  256. .PP
  257. .SS "QRectF QwtGraphic::controlPointRect () const"
  258. The control point rectangle is the bounding rectangle of all control points of the paths and the target rectangles of the images/pixmaps\&.
  259. .PP
  260. \fBReturns\fP
  261. .RS 4
  262. Control point rectangle
  263. .RE
  264. .PP
  265. \fBSee also\fP
  266. .RS 4
  267. \fBboundingRect()\fP, \fBscaledBoundingRect()\fP
  268. .RE
  269. .PP
  270. .SS "QSizeF QwtGraphic::defaultSize () const"
  271. .PP
  272. Default size\&. When a non empty size has been assigned by \fBsetDefaultSize()\fP this size will be returned\&. Otherwise the default size is the size of the bounding rectangle\&.
  273. .PP
  274. The default size is used in all methods rendering the graphic, where no size is explicitly specified\&.
  275. .PP
  276. \fBReturns\fP
  277. .RS 4
  278. Default size
  279. .RE
  280. .PP
  281. \fBSee also\fP
  282. .RS 4
  283. \fBsetDefaultSize()\fP, \fBboundingRect()\fP
  284. .RE
  285. .PP
  286. .SS "void QwtGraphic::drawImage (const QRectF & rect, const QImage & image, const QRectF & subRect, Qt::ImageConversionFlags flags)\fC [protected]\fP, \fC [virtual]\fP"
  287. .PP
  288. Store a image command in the command list\&.
  289. .PP
  290. \fBParameters\fP
  291. .RS 4
  292. \fIrect\fP traget rectangle
  293. .br
  294. \fIimage\fP Image to be painted
  295. .br
  296. \fIsubRect\fP Reactangle of the pixmap to be painted
  297. .br
  298. \fIflags\fP Image conversion flags
  299. .RE
  300. .PP
  301. \fBSee also\fP
  302. .RS 4
  303. QPaintEngine::drawImage()
  304. .RE
  305. .PP
  306. .PP
  307. Reimplemented from \fBQwtNullPaintDevice\fP\&.
  308. .SS "void QwtGraphic::drawPath (const QPainterPath & path)\fC [protected]\fP, \fC [virtual]\fP"
  309. Store a path command in the command list
  310. .PP
  311. \fBParameters\fP
  312. .RS 4
  313. \fIpath\fP Painter path
  314. .RE
  315. .PP
  316. \fBSee also\fP
  317. .RS 4
  318. QPaintEngine::drawPath()
  319. .RE
  320. .PP
  321. .PP
  322. Reimplemented from \fBQwtNullPaintDevice\fP\&.
  323. .SS "void QwtGraphic::drawPixmap (const QRectF & rect, const QPixmap & pixmap, const QRectF & subRect)\fC [protected]\fP, \fC [virtual]\fP"
  324. .PP
  325. Store a pixmap command in the command list\&.
  326. .PP
  327. \fBParameters\fP
  328. .RS 4
  329. \fIrect\fP target rectangle
  330. .br
  331. \fIpixmap\fP Pixmap to be painted
  332. .br
  333. \fIsubRect\fP Reactangle of the pixmap to be painted
  334. .RE
  335. .PP
  336. \fBSee also\fP
  337. .RS 4
  338. QPaintEngine::drawPixmap()
  339. .RE
  340. .PP
  341. .PP
  342. Reimplemented from \fBQwtNullPaintDevice\fP\&.
  343. .SS "bool QwtGraphic::isEmpty () const"
  344. .PP
  345. \fBReturns\fP
  346. .RS 4
  347. True, when the bounding rectangle is empty
  348. .RE
  349. .PP
  350. \fBSee also\fP
  351. .RS 4
  352. \fBboundingRect()\fP, \fBisNull()\fP
  353. .RE
  354. .PP
  355. .SS "bool QwtGraphic::isNull () const"
  356. .PP
  357. \fBReturns\fP
  358. .RS 4
  359. True, when no painter commands have been stored
  360. .RE
  361. .PP
  362. \fBSee also\fP
  363. .RS 4
  364. \fBisEmpty()\fP, \fBcommands()\fP
  365. .RE
  366. .PP
  367. .SS "\fBQwtGraphic\fP & QwtGraphic::operator= (const \fBQwtGraphic\fP & other)"
  368. .PP
  369. Assignment operator\&.
  370. .PP
  371. \fBParameters\fP
  372. .RS 4
  373. \fIother\fP Source
  374. .RE
  375. .PP
  376. \fBReturns\fP
  377. .RS 4
  378. A reference of this object
  379. .RE
  380. .PP
  381. .SS "void QwtGraphic::render (QPainter * painter) const"
  382. .PP
  383. Replay all recorded painter commands\&.
  384. .PP
  385. \fBParameters\fP
  386. .RS 4
  387. \fIpainter\fP Qt painter
  388. .RE
  389. .PP
  390. .SS "void QwtGraphic::render (QPainter * painter, const QPointF & pos, Qt::Alignment alignment = \fCQt::AlignTop | Qt::AlignLeft\fP) const"
  391. .PP
  392. Replay all recorded painter commands\&. The graphic is scaled to the \fBdefaultSize()\fP and aligned to a position\&.
  393. .PP
  394. \fBParameters\fP
  395. .RS 4
  396. \fIpainter\fP Qt painter
  397. .br
  398. \fIpos\fP Reference point, where to render
  399. .br
  400. \fIalignment\fP Flags how to align the target rectangle to pos\&.
  401. .RE
  402. .PP
  403. .SS "void QwtGraphic::render (QPainter * painter, const QRectF & rect, Qt::AspectRatioMode aspectRatioMode = \fCQt::IgnoreAspectRatio\fP) const"
  404. .PP
  405. Replay all recorded painter commands\&. The graphic is scaled to fit into the given rectangle
  406. .PP
  407. \fBParameters\fP
  408. .RS 4
  409. \fIpainter\fP Qt painter
  410. .br
  411. \fIrect\fP Rectangle for the scaled graphic
  412. .br
  413. \fIaspectRatioMode\fP Mode how to scale - See Qt::AspectRatioMode
  414. .RE
  415. .PP
  416. .SS "void QwtGraphic::render (QPainter * painter, const QSizeF & size, Qt::AspectRatioMode aspectRatioMode = \fCQt::IgnoreAspectRatio\fP) const"
  417. .PP
  418. Replay all recorded painter commands\&. The graphic is scaled to fit into the rectangle of the given size starting at ( 0, 0 )\&.
  419. .PP
  420. \fBParameters\fP
  421. .RS 4
  422. \fIpainter\fP Qt painter
  423. .br
  424. \fIsize\fP Size for the scaled graphic
  425. .br
  426. \fIaspectRatioMode\fP Mode how to scale - See Qt::AspectRatioMode
  427. .RE
  428. .PP
  429. .SS "void QwtGraphic::reset ()"
  430. .PP
  431. Clear all stored commands\&.
  432. .PP
  433. \fBSee also\fP
  434. .RS 4
  435. \fBisNull()\fP
  436. .RE
  437. .PP
  438. .SS "QRectF QwtGraphic::scaledBoundingRect (double sx, double sy) const"
  439. .PP
  440. Calculate the target rectangle for scaling the graphic\&.
  441. .PP
  442. \fBParameters\fP
  443. .RS 4
  444. \fIsx\fP Horizontal scaling factor
  445. .br
  446. \fIsy\fP Vertical scaling factor
  447. .RE
  448. .PP
  449. \fBNote\fP
  450. .RS 4
  451. In case of paths that are painted with a cosmetic pen ( see QPen::isCosmetic() ) the target rectangle is different to multiplying the bounding rectangle\&.
  452. .RE
  453. .PP
  454. \fBReturns\fP
  455. .RS 4
  456. Scaled bounding rectangle
  457. .RE
  458. .PP
  459. \fBSee also\fP
  460. .RS 4
  461. \fBboundingRect()\fP, \fBcontrolPointRect()\fP
  462. .RE
  463. .PP
  464. .SS "void QwtGraphic::setCommands (QVector< \fBQwtPainterCommand\fP > & commands)"
  465. .PP
  466. Append paint commands\&.
  467. .PP
  468. \fBParameters\fP
  469. .RS 4
  470. \fIcommands\fP Paint commands
  471. .RE
  472. .PP
  473. \fBSee also\fP
  474. .RS 4
  475. \fBcommands()\fP
  476. .RE
  477. .PP
  478. .SS "void QwtGraphic::setDefaultSize (const QSizeF & size)"
  479. .PP
  480. Set a default size\&. The default size is used in all methods rendering the graphic, where no size is explicitly specified\&. Assigning an empty size means, that the default size will be calculated from the bounding rectangle\&.
  481. .PP
  482. The default setting is an empty size\&.
  483. .PP
  484. \fBParameters\fP
  485. .RS 4
  486. \fIsize\fP Default size
  487. .RE
  488. .PP
  489. \fBSee also\fP
  490. .RS 4
  491. \fBdefaultSize()\fP, \fBboundingRect()\fP
  492. .RE
  493. .PP
  494. .SS "void QwtGraphic::setRenderHint (\fBRenderHint\fP hint, bool on = \fCtrue\fP)"
  495. Toggle an render hint
  496. .PP
  497. \fBParameters\fP
  498. .RS 4
  499. \fIhint\fP Render hint
  500. .br
  501. \fIon\fP true/false
  502. .RE
  503. .PP
  504. \fBSee also\fP
  505. .RS 4
  506. \fBtestRenderHint()\fP, \fBRenderHint\fP
  507. .RE
  508. .PP
  509. .SS "QSize QwtGraphic::sizeMetrics () const\fC [protected]\fP, \fC [virtual]\fP"
  510. .PP
  511. \fBReturns\fP
  512. .RS 4
  513. Ceiled \fBdefaultSize()\fP
  514. .RE
  515. .PP
  516. .PP
  517. Implements \fBQwtNullPaintDevice\fP\&.
  518. .SS "bool QwtGraphic::testRenderHint (\fBRenderHint\fP hint) const"
  519. Test a render hint
  520. .PP
  521. \fBParameters\fP
  522. .RS 4
  523. \fIhint\fP Render hint
  524. .RE
  525. .PP
  526. \fBReturns\fP
  527. .RS 4
  528. true/false
  529. .RE
  530. .PP
  531. \fBSee also\fP
  532. .RS 4
  533. \fBsetRenderHint()\fP, \fBRenderHint\fP
  534. .RE
  535. .PP
  536. .SS "QImage QwtGraphic::toImage () const"
  537. .PP
  538. Convert the graphic to a QImage\&. All pixels of the image get initialized by 0 ( transparent ) before the graphic is scaled and rendered on it\&.
  539. .PP
  540. The format of the image is QImage::Format_ARGB32_Premultiplied\&.
  541. .PP
  542. The size of the image is the default size ( ceiled to integers ) of the graphic\&.
  543. .PP
  544. \fBReturns\fP
  545. .RS 4
  546. The graphic as image in default size
  547. .RE
  548. .PP
  549. \fBSee also\fP
  550. .RS 4
  551. \fBdefaultSize()\fP, \fBtoPixmap()\fP, \fBrender()\fP
  552. .RE
  553. .PP
  554. .SS "QImage QwtGraphic::toImage (const QSize & size, Qt::AspectRatioMode aspectRatioMode = \fCQt::IgnoreAspectRatio\fP) const"
  555. .PP
  556. Convert the graphic to a QImage\&. All pixels of the image get initialized by 0 ( transparent ) before the graphic is scaled and rendered on it\&.
  557. .PP
  558. The format of the image is QImage::Format_ARGB32_Premultiplied\&.
  559. .PP
  560. \fBParameters\fP
  561. .RS 4
  562. \fIsize\fP Size of the image
  563. .br
  564. \fIaspectRatioMode\fP Aspect ratio how to scale the graphic
  565. .RE
  566. .PP
  567. \fBReturns\fP
  568. .RS 4
  569. The graphic as image
  570. .RE
  571. .PP
  572. \fBSee also\fP
  573. .RS 4
  574. \fBtoPixmap()\fP, \fBrender()\fP
  575. .RE
  576. .PP
  577. .SS "QPixmap QwtGraphic::toPixmap () const"
  578. .PP
  579. Convert the graphic to a QPixmap\&. All pixels of the pixmap get initialized by Qt::transparent before the graphic is scaled and rendered on it\&.
  580. .PP
  581. The size of the pixmap is the default size ( ceiled to integers ) of the graphic\&.
  582. .PP
  583. \fBReturns\fP
  584. .RS 4
  585. The graphic as pixmap in default size
  586. .RE
  587. .PP
  588. \fBSee also\fP
  589. .RS 4
  590. \fBdefaultSize()\fP, \fBtoImage()\fP, \fBrender()\fP
  591. .RE
  592. .PP
  593. .SS "QPixmap QwtGraphic::toPixmap (const QSize & size, Qt::AspectRatioMode aspectRatioMode = \fCQt::IgnoreAspectRatio\fP) const"
  594. .PP
  595. Convert the graphic to a QPixmap\&. All pixels of the pixmap get initialized by Qt::transparent before the graphic is scaled and rendered on it\&.
  596. .PP
  597. \fBParameters\fP
  598. .RS 4
  599. \fIsize\fP Size of the image
  600. .br
  601. \fIaspectRatioMode\fP Aspect ratio how to scale the graphic
  602. .RE
  603. .PP
  604. \fBReturns\fP
  605. .RS 4
  606. The graphic as pixmap
  607. .RE
  608. .PP
  609. \fBSee also\fP
  610. .RS 4
  611. \fBtoImage()\fP, \fBrender()\fP
  612. .RE
  613. .PP
  614. .SS "void QwtGraphic::updateState (const QPaintEngineState & state)\fC [protected]\fP, \fC [virtual]\fP"
  615. .PP
  616. Store a state command in the command list\&.
  617. .PP
  618. \fBParameters\fP
  619. .RS 4
  620. \fIstate\fP State to be stored
  621. .RE
  622. .PP
  623. \fBSee also\fP
  624. .RS 4
  625. QPaintEngine::updateState()
  626. .RE
  627. .PP
  628. .PP
  629. Reimplemented from \fBQwtNullPaintDevice\fP\&.
  630. .SH "Author"
  631. .PP
  632. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.