File: qpainterpath.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (764 lines) | stat: -rw-r--r-- 93,765 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qpainterpath.cpp -->
  <title>Qt 4.8: QPainterPath Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QPainterPath</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#composing-a-qpainterpath">Composing a QPainterPath</a></li>
<li class="level2"><a href="#qpainterpath-information">QPainterPath Information</a></li>
<li class="level2"><a href="#qpainterpath-conversion">QPainterPath Conversion</a></li>
<li class="level2"><a href="#examples">Examples</a></li>
</ul>
</div>
<h1 class="title">QPainterPath Class Reference</h1>
<!-- $$$QPainterPath-brief -->
<p>The QPainterPath class provides a container for painting operations, enabling graphical shapes to be constructed and reused. <a href="#details">More...</a></p>
<!-- @@@QPainterPath -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QPainterPath&gt;</span></pre><ul>
<li><a href="qpainterpath-members.html">List of all members, including inherited members</a></li>
<li><a href="qpainterpath-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath-element.html">Element</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#ElementType-enum">ElementType</a></b> { MoveToElement, LineToElement, CurveToElement, CurveToDataElement }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#QPainterPath">QPainterPath</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#QPainterPath-2">QPainterPath</a></b> ( const QPointF &amp; <i>startPoint</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#QPainterPath-3">QPainterPath</a></b> ( const QPainterPath &amp; <i>path</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#dtor.QPainterPath">~QPainterPath</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addEllipse">addEllipse</a></b> ( const QRectF &amp; <i>boundingRectangle</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addEllipse-2">addEllipse</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>width</i>, qreal <i>height</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addEllipse-3">addEllipse</a></b> ( const QPointF &amp; <i>center</i>, qreal <i>rx</i>, qreal <i>ry</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addPath">addPath</a></b> ( const QPainterPath &amp; <i>path</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addPolygon">addPolygon</a></b> ( const QPolygonF &amp; <i>polygon</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addRect">addRect</a></b> ( const QRectF &amp; <i>rectangle</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addRect-2">addRect</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>width</i>, qreal <i>height</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addRegion">addRegion</a></b> ( const QRegion &amp; <i>region</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addRoundedRect">addRoundedRect</a></b> ( const QRectF &amp; <i>rect</i>, qreal <i>xRadius</i>, qreal <i>yRadius</i>, Qt::SizeMode <i>mode</i> = Qt::AbsoluteSize )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addRoundedRect-2">addRoundedRect</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i>, qreal <i>xRadius</i>, qreal <i>yRadius</i>, Qt::SizeMode <i>mode</i> = Qt::AbsoluteSize )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addText">addText</a></b> ( const QPointF &amp; <i>point</i>, const QFont &amp; <i>font</i>, const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#addText-2">addText</a></b> ( qreal <i>x</i>, qreal <i>y</i>, const QFont &amp; <i>font</i>, const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#angleAtPercent">angleAtPercent</a></b> ( qreal <i>t</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#arcMoveTo">arcMoveTo</a></b> ( const QRectF &amp; <i>rectangle</i>, qreal <i>angle</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#arcMoveTo-2">arcMoveTo</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>width</i>, qreal <i>height</i>, qreal <i>angle</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#arcTo">arcTo</a></b> ( const QRectF &amp; <i>rectangle</i>, qreal <i>startAngle</i>, qreal <i>sweepLength</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#arcTo-2">arcTo</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>width</i>, qreal <i>height</i>, qreal <i>startAngle</i>, qreal <i>sweepLength</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#boundingRect">boundingRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#closeSubpath">closeSubpath</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#connectPath">connectPath</a></b> ( const QPainterPath &amp; <i>path</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#contains">contains</a></b> ( const QPointF &amp; <i>point</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#contains-2">contains</a></b> ( const QRectF &amp; <i>rectangle</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#contains-3">contains</a></b> ( const QPainterPath &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#controlPointRect">controlPointRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#cubicTo">cubicTo</a></b> ( const QPointF &amp; <i>c1</i>, const QPointF &amp; <i>c2</i>, const QPointF &amp; <i>endPoint</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#cubicTo-2">cubicTo</a></b> ( qreal <i>c1X</i>, qreal <i>c1Y</i>, qreal <i>c2X</i>, qreal <i>c2Y</i>, qreal <i>endPointX</i>, qreal <i>endPointY</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#currentPosition">currentPosition</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QPainterPath::Element &amp; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#elementAt">elementAt</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#elementCount">elementCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::FillRule </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#fillRule">fillRule</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#intersected">intersected</a></b> ( const QPainterPath &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#intersects">intersects</a></b> ( const QRectF &amp; <i>rectangle</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#intersects-2">intersects</a></b> ( const QPainterPath &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#isEmpty">isEmpty</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#length">length</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#lineTo">lineTo</a></b> ( const QPointF &amp; <i>endPoint</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#lineTo-2">lineTo</a></b> ( qreal <i>x</i>, qreal <i>y</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#moveTo">moveTo</a></b> ( const QPointF &amp; <i>point</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#moveTo-2">moveTo</a></b> ( qreal <i>x</i>, qreal <i>y</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#percentAtLength">percentAtLength</a></b> ( qreal <i>len</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#pointAtPercent">pointAtPercent</a></b> ( qreal <i>t</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#quadTo">quadTo</a></b> ( const QPointF &amp; <i>c</i>, const QPointF &amp; <i>endPoint</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#quadTo-2">quadTo</a></b> ( qreal <i>cx</i>, qreal <i>cy</i>, qreal <i>endPointX</i>, qreal <i>endPointY</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#setElementPositionAt">setElementPositionAt</a></b> ( int <i>index</i>, qreal <i>x</i>, qreal <i>y</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#setFillRule">setFillRule</a></b> ( Qt::FillRule <i>fillRule</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#simplified">simplified</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#slopeAtPercent">slopeAtPercent</a></b> ( qreal <i>t</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#subtracted">subtracted</a></b> ( const QPainterPath &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#swap">swap</a></b> ( QPainterPath &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPolygonF </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#toFillPolygon">toFillPolygon</a></b> ( const QTransform &amp; <i>matrix</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPolygonF </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#toFillPolygon-2">toFillPolygon</a></b> ( const QMatrix &amp; <i>matrix</i> = QMatrix() ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QPolygonF&gt; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#toFillPolygons">toFillPolygons</a></b> ( const QTransform &amp; <i>matrix</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QPolygonF&gt; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#toFillPolygons-2">toFillPolygons</a></b> ( const QMatrix &amp; <i>matrix</i> = QMatrix() ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#toReversed">toReversed</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QPolygonF&gt; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#toSubpathPolygons">toSubpathPolygons</a></b> ( const QTransform &amp; <i>matrix</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QPolygonF&gt; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#toSubpathPolygons-2">toSubpathPolygons</a></b> ( const QMatrix &amp; <i>matrix</i> = QMatrix() ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#translate">translate</a></b> ( qreal <i>dx</i>, qreal <i>dy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#translate-2">translate</a></b> ( const QPointF &amp; <i>offset</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#translated">translated</a></b> ( qreal <i>dx</i>, qreal <i>dy</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#translated-2">translated</a></b> ( const QPointF &amp; <i>offset</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#united">united</a></b> ( const QPainterPath &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-not-eq">operator!=</a></b> ( const QPainterPath &amp; <i>path</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-and">operator&amp;</a></b> ( const QPainterPath &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath &amp; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-and-eq">operator&amp;=</a></b> ( const QPainterPath &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-2b">operator+</a></b> ( const QPainterPath &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath &amp; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-2b-eq">operator+=</a></b> ( const QPainterPath &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-">operator-</a></b> ( const QPainterPath &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath &amp; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator--eq">operator-=</a></b> ( const QPainterPath &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath &amp; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-eq">operator=</a></b> ( const QPainterPath &amp; <i>path</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-eq-eq">operator==</a></b> ( const QPainterPath &amp; <i>path</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-7c">operator|</a></b> ( const QPainterPath &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPainterPath &amp; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-7c-eq">operator|=</a></b> ( const QPainterPath &amp; <i>other</i> )</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-lt-lt-25">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>stream</i>, const QPainterPath &amp; <i>path</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qpainterpath.html#operator-gt-gt-15">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>stream</i>, QPainterPath &amp; <i>path</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QPainterPath-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QPainterPath class provides a container for painting operations, enabling graphical shapes to be constructed and reused.</p>
<p>A painter path is an object composed of a number of graphical building blocks, such as rectangles, ellipses, lines, and curves. Building blocks can be joined in closed subpaths, for example as a rectangle or an ellipse. A closed path has coinciding start and end points. Or they can exist independently as unclosed subpaths, such as lines and curves.</p>
<p>A QPainterPath object can be used for filling, outlining, and clipping. To generate fillable outlines for a given painter path, use the <a href="qpainterpathstroker.html">QPainterPathStroker</a> class. The main advantage of painter paths over normal drawing operations is that complex shapes only need to be created once; then they can be drawn many times using only calls to the <a href="qpainter.html#drawPath">QPainter::drawPath</a>() function.</p>
<p>QPainterPath provides a collection of functions that can be used to obtain information about the path and its elements. In addition it is possible to reverse the order of the elements using the <a href="qpainterpath.html#toReversed">toReversed</a>() function. There are also several functions to convert this painter path object into a polygon representation.</p>
<a name="composing-a-qpainterpath"></a>
<h3>Composing a QPainterPath</h3>
<p>A QPainterPath object can be constructed as an empty path, with a given start point, or as a copy of another QPainterPath object. Once created, lines and curves can be added to the path using the <a href="qpainterpath.html#lineTo">lineTo</a>(), <a href="qpainterpath.html#arcTo">arcTo</a>(), <a href="qpainterpath.html#cubicTo">cubicTo</a>() and <a href="qpainterpath.html#quadTo">quadTo</a>() functions. The lines and curves stretch from the <a href="qpainterpath.html#currentPosition">currentPosition</a>() to the position passed as argument.</p>
<p>The <a href="qpainterpath.html#currentPosition">currentPosition</a>() of the QPainterPath object is always the end position of the last subpath that was added (or the initial start point). Use the <a href="qpainterpath.html#moveTo">moveTo</a>() function to move the <a href="qpainterpath.html#currentPosition">currentPosition</a>() without adding a component. The <a href="qpainterpath.html#moveTo">moveTo</a>() function implicitly starts a new subpath, and closes the previous one. Another way of starting a new subpath is to call the <a href="qpainterpath.html#closeSubpath">closeSubpath</a>() function which closes the current path by adding a line from the <a href="qpainterpath.html#currentPosition">currentPosition</a>() back to the path's start position. Note that the new path will have (0, 0) as its initial <a href="qpainterpath.html#currentPosition">currentPosition</a>().</p>
<p>QPainterPath class also provides several convenience functions to add closed subpaths to a painter path: <a href="qpainterpath.html#addEllipse">addEllipse</a>(), <a href="qpainterpath.html#addPath">addPath</a>(), <a href="qpainterpath.html#addRect">addRect</a>(), <a href="qpainterpath.html#addRegion">addRegion</a>() and <a href="qpainterpath.html#addText">addText</a>(). The <a href="qpainterpath.html#addPolygon">addPolygon</a>() function adds an <i>unclosed</i> subpath. In fact, these functions are all collections of <a href="qpainterpath.html#moveTo">moveTo</a>(), <a href="qpainterpath.html#lineTo">lineTo</a>() and <a href="qpainterpath.html#cubicTo">cubicTo</a>() operations.</p>
<p>In addition, a path can be added to the current path using the <a href="qpainterpath.html#connectPath">connectPath</a>() function. But note that this function will connect the last element of the current path to the first element of given one by adding a line.</p>
<p>Below is a code snippet that shows how a QPainterPath object can be used:</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/qpainterpath-construction.png" alt="" /></td><td ><pre class="cpp"> <span class="type">QPainterPath</span> path;
 path<span class="operator">.</span><a href="qpainterpath.html#addRect">addRect</a>(<span class="number">20</span><span class="operator">,</span> <span class="number">20</span><span class="operator">,</span> <span class="number">60</span><span class="operator">,</span> <span class="number">60</span>);

 path<span class="operator">.</span><a href="qpainterpath.html#moveTo">moveTo</a>(<span class="number">0</span><span class="operator">,</span> <span class="number">0</span>);
 path<span class="operator">.</span><a href="qpainterpath.html#cubicTo">cubicTo</a>(<span class="number">99</span><span class="operator">,</span> <span class="number">0</span><span class="operator">,</span>  <span class="number">50</span><span class="operator">,</span> <span class="number">50</span><span class="operator">,</span>  <span class="number">99</span><span class="operator">,</span> <span class="number">99</span>);
 path<span class="operator">.</span><a href="qpainterpath.html#cubicTo">cubicTo</a>(<span class="number">0</span><span class="operator">,</span> <span class="number">99</span><span class="operator">,</span>  <span class="number">50</span><span class="operator">,</span> <span class="number">50</span><span class="operator">,</span>  <span class="number">0</span><span class="operator">,</span> <span class="number">0</span>);

 <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
 painter<span class="operator">.</span>fillRect(<span class="number">0</span><span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">100</span><span class="operator">,</span> <span class="number">100</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>white);
 painter<span class="operator">.</span>setPen(<span class="type"><a href="qpen.html">QPen</a></span>(<span class="type"><a href="qcolor.html">QColor</a></span>(<span class="number">79</span><span class="operator">,</span> <span class="number">106</span><span class="operator">,</span> <span class="number">25</span>)<span class="operator">,</span> <span class="number">1</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>SolidLine<span class="operator">,</span>
                     <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>FlatCap<span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>MiterJoin));
 painter<span class="operator">.</span>setBrush(<span class="type"><a href="qcolor.html">QColor</a></span>(<span class="number">122</span><span class="operator">,</span> <span class="number">163</span><span class="operator">,</span> <span class="number">39</span>));

 painter<span class="operator">.</span>drawPath(path);</pre>
</td></tr>
</table>
<p>The painter path is initially empty when constructed. We first add a rectangle, which is a closed subpath. Then we add two bezier curves which together form a closed subpath even though they are not closed individually. Finally we draw the entire path. The path is filled using the default fill rule, <a href="qt.html#FillRule-enum">Qt::OddEvenFill</a>. Qt provides two methods for filling paths:</p>
<table class="generic">
<thead><tr class="qt-style"><th ><a href="qt.html#FillRule-enum">Qt::OddEvenFill</a></th><th ><a href="qt.html#FillRule-enum">Qt::WindingFill</a></th></tr></thead>
<tr valign="top" class="odd"><td ><img src="images/qt-fillrule-oddeven.png" alt="" /></td><td ><img src="images/qt-fillrule-winding.png" alt="" /></td></tr>
</table>
<p>See the <a href="qt.html#FillRule-enum">Qt::FillRule</a> documentation for the definition of the rules. A painter path's currently set fill rule can be retrieved using the <a href="qpainterpath.html#fillRule">fillRule</a>() function, and altered using the <a href="qpainterpath.html#setFillRule">setFillRule</a>() function.</p>
<a name="qpainterpath-information"></a>
<h3>QPainterPath Information</h3>
<p>The QPainterPath class provides a collection of functions that returns information about the path and its elements.</p>
<p>The <a href="qpainterpath.html#currentPosition">currentPosition</a>() function returns the end point of the last subpath that was added (or the initial start point). The <a href="qpainterpath.html#elementAt">elementAt</a>() function can be used to retrieve the various subpath elements, the <i>number</i> of elements can be retrieved using the <a href="qpainterpath.html#elementCount">elementCount</a>() function, and the <a href="qpainterpath.html#isEmpty">isEmpty</a>() function tells whether this QPainterPath object contains any elements at all.</p>
<p>The <a href="qpainterpath.html#controlPointRect">controlPointRect</a>() function returns the rectangle containing all the points and control points in this path. This function is significantly faster to compute than the exact <a href="qpainterpath.html#boundingRect">boundingRect</a>() which returns the bounding rectangle of this painter path with floating point precision.</p>
<p>Finally, QPainterPath provides the <a href="qpainterpath.html#contains">contains</a>() function which can be used to determine whether a given point or rectangle is inside the path, and the <a href="qpainterpath.html#intersects">intersects</a>() function which determines if any of the points inside a given rectangle also are inside this path.</p>
<a name="qpainterpath-conversion"></a>
<h3>QPainterPath Conversion</h3>
<p>For compatibility reasons, it might be required to simplify the representation of a painter path: QPainterPath provides the <a href="qpainterpath.html#toFillPolygon">toFillPolygon</a>(), <a href="qpainterpath.html#toFillPolygons">toFillPolygons</a>() and <a href="qpainterpath.html#toSubpathPolygons">toSubpathPolygons</a>() functions which convert the painter path into a polygon. The <a href="qpainterpath.html#toFillPolygon">toFillPolygon</a>() returns the painter path as one single polygon, while the two latter functions return a list of polygons.</p>
<p>The <a href="qpainterpath.html#toFillPolygons">toFillPolygons</a>() and <a href="qpainterpath.html#toSubpathPolygons">toSubpathPolygons</a>() functions are provided because it is usually faster to draw several small polygons than to draw one large polygon, even though the total number of points drawn is the same. The difference between the two is the <i>number</i> of polygons they return: The <a href="qpainterpath.html#toSubpathPolygons">toSubpathPolygons</a>() creates one polygon for each subpath regardless of intersecting subpaths (i.e&#x2e; overlapping bounding rectangles), while the <a href="qpainterpath.html#toFillPolygons">toFillPolygons</a>() functions creates only one polygon for overlapping subpaths.</p>
<p>The <a href="qpainterpath.html#toFillPolygon">toFillPolygon</a>() and <a href="qpainterpath.html#toFillPolygons">toFillPolygons</a>() functions first convert all the subpaths to polygons, then uses a rewinding technique to make sure that overlapping subpaths can be filled using the correct fill rule. Note that rewinding inserts additional lines in the polygon so the outline of the fill polygon does not match the outline of the path.</p>
<a name="examples"></a>
<h3>Examples</h3>
<p>Qt provides the <a href="painting-painterpaths.html">Painter Paths Example</a> and the <a href="demos-deform.html">Vector Deformation Demo</a> which are located in Qt's example and demo directories respectively.</p>
<p>The <a href="painting-painterpaths.html">Painter Paths Example</a> shows how painter paths can be used to build complex shapes for rendering and lets the user experiment with the filling and stroking. The <a href="demos-deform.html">Vector Deformation Demo</a> shows how to use QPainterPath to draw text.</p>
<table class="generic">
<thead><tr class="qt-style"><th ><a href="painting-painterpaths.html">Painter Paths Example</a></th><th ><a href="demos-deform.html">Vector Deformation Demo</a></th></tr></thead>
<tr valign="top" class="odd"><td ><img src="images/qpainterpath-example.png" alt="" /></td><td ><img src="images/qpainterpath-demo.png" alt="" /></td></tr>
</table>
</div>
<p><b>See also </b><a href="qpainterpathstroker.html">QPainterPathStroker</a>, <a href="qpainter.html">QPainter</a>, <a href="qregion.html">QRegion</a>, and <a href="painting-painterpaths.html">Painter Paths Example</a>.</p>
<!-- @@@QPainterPath -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ElementType$$$MoveToElement$$$LineToElement$$$CurveToElement$$$CurveToDataElement -->
<h3 class="fn"><a name="ElementType-enum"></a>enum QPainterPath::<span class="name">ElementType</span></h3>
<p>This enum describes the types of elements used to connect vertices in subpaths.</p>
<p>Note that elements added as closed subpaths using the <a href="qpainterpath.html#addEllipse">addEllipse</a>(), <a href="qpainterpath.html#addPath">addPath</a>(), <a href="qpainterpath.html#addPolygon">addPolygon</a>(), <a href="qpainterpath.html#addRect">addRect</a>(), <a href="qpainterpath.html#addRegion">addRegion</a>() and <a href="qpainterpath.html#addText">addText</a>() convenience functions, is actually added to the path as a collection of separate elements using the <a href="qpainterpath.html#moveTo">moveTo</a>(), <a href="qpainterpath.html#lineTo">lineTo</a>() and <a href="qpainterpath.html#cubicTo">cubicTo</a>() functions.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QPainterPath::MoveToElement</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">A new subpath. See also <a href="qpainterpath.html#moveTo">moveTo</a>().</td></tr>
<tr><td class="topAlign"><tt>QPainterPath::LineToElement</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">A line. See also <a href="qpainterpath.html#lineTo">lineTo</a>().</td></tr>
<tr><td class="topAlign"><tt>QPainterPath::CurveToElement</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">A curve. See also <a href="qpainterpath.html#cubicTo">cubicTo</a>() and <a href="qpainterpath.html#quadTo">quadTo</a>().</td></tr>
<tr><td class="topAlign"><tt>QPainterPath::CurveToDataElement</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The extra data required to describe a curve in a CurveToElement element.</td></tr>
</table>
<p><b>See also </b><a href="qpainterpath.html#elementAt">elementAt</a>() and <a href="qpainterpath.html#elementCount">elementCount</a>().</p>
<!-- @@@ElementType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QPainterPath[overload1]$$$QPainterPath -->
<h3 class="fn"><a name="QPainterPath"></a>QPainterPath::<span class="name">QPainterPath</span> ()</h3>
<p>Constructs an empty <a href="qpainterpath.html">QPainterPath</a> object.</p>
<!-- @@@QPainterPath -->
<!-- $$$QPainterPath$$$QPainterPathconstQPointF& -->
<h3 class="fn"><a name="QPainterPath-2"></a>QPainterPath::<span class="name">QPainterPath</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>startPoint</i> )</h3>
<p>Creates a <a href="qpainterpath.html">QPainterPath</a> object with the given <i>startPoint</i> as its current position.</p>
<!-- @@@QPainterPath -->
<!-- $$$QPainterPath$$$QPainterPathconstQPainterPath& -->
<h3 class="fn"><a name="QPainterPath-3"></a>QPainterPath::<span class="name">QPainterPath</span> ( const <span class="type">QPainterPath</span> &amp; <i>path</i> )</h3>
<p>Creates a <a href="qpainterpath.html">QPainterPath</a> object that is a copy of the given <i>path</i>.</p>
<p><b>See also </b><a href="qpainterpath.html#operator-eq">operator=</a>().</p>
<!-- @@@QPainterPath -->
<!-- $$$~QPainterPath[overload1]$$$~QPainterPath -->
<h3 class="fn"><a name="dtor.QPainterPath"></a>QPainterPath::<span class="name">~QPainterPath</span> ()</h3>
<p>Destroys this <a href="qpainterpath.html">QPainterPath</a> object.</p>
<!-- @@@~QPainterPath -->
<!-- $$$addEllipse[overload1]$$$addEllipseconstQRectF& -->
<h3 class="fn"><a name="addEllipse"></a><span class="type">void</span> QPainterPath::<span class="name">addEllipse</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>boundingRectangle</i> )</h3>
<p>Creates an ellipse within the specified <i>boundingRectangle</i> and adds it to the painter path as a closed subpath.</p>
<p>The ellipse is composed of a clockwise curve, starting and finishing at zero degrees (the 3 o'clock position).</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/qpainterpath-addellipse.png" alt="" /></td><td ><pre class="cpp"> <span class="type"><a href="qlineargradient.html">QLinearGradient</a></span> myGradient;
 <span class="type"><a href="qpen.html">QPen</a></span> myPen;
 <span class="type"><a href="qrectf.html">QRectF</a></span> boundingRectangle;

 <span class="type"><a href="qpainterpath.html">QPainterPath</a></span> myPath;
 myPath<span class="operator">.</span>addEllipse(boundingRectangle);

 <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
 painter<span class="operator">.</span>setBrush(myGradient);
 painter<span class="operator">.</span>setPen(myPen);
 painter<span class="operator">.</span>drawPath(myPath);</pre>
</td></tr>
</table>
<p><b>See also </b><a href="qpainterpath.html#arcTo">arcTo</a>(), <a href="qpainter.html#drawEllipse">QPainter::drawEllipse</a>(), and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@addEllipse -->
<!-- $$$addEllipse$$$addEllipseqrealqrealqrealqreal -->
<h3 class="fn"><a name="addEllipse-2"></a><span class="type">void</span> QPainterPath::<span class="name">addEllipse</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>height</i> )</h3>
<p>This is an overloaded function.</p>
<p>Creates an ellipse within the bounding rectangle defined by its top-left corner at (<i>x</i>, <i>y</i>), <i>width</i> and <i>height</i>, and adds it to the painter path as a closed subpath.</p>
<!-- @@@addEllipse -->
<!-- $$$addEllipse$$$addEllipseconstQPointF&qrealqreal -->
<h3 class="fn"><a name="addEllipse-3"></a><span class="type">void</span> QPainterPath::<span class="name">addEllipse</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>center</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>rx</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>ry</i> )</h3>
<p>This is an overloaded function.</p>
<p>Creates an ellipse positioned at <i>center</i> with radii <i>rx</i> and <i>ry</i>, and adds it to the painter path as a closed subpath.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@addEllipse -->
<!-- $$$addPath[overload1]$$$addPathconstQPainterPath& -->
<h3 class="fn"><a name="addPath"></a><span class="type">void</span> QPainterPath::<span class="name">addPath</span> ( const <span class="type">QPainterPath</span> &amp; <i>path</i> )</h3>
<p>Adds the given <i>path</i> to <i>this</i> path as a closed subpath.</p>
<p><b>See also </b><a href="qpainterpath.html#connectPath">connectPath</a>() and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@addPath -->
<!-- $$$addPolygon[overload1]$$$addPolygonconstQPolygonF& -->
<h3 class="fn"><a name="addPolygon"></a><span class="type">void</span> QPainterPath::<span class="name">addPolygon</span> ( const <span class="type"><a href="qpolygonf.html">QPolygonF</a></span> &amp; <i>polygon</i> )</h3>
<p>Adds the given <i>polygon</i> to the path as an (unclosed) subpath.</p>
<p>Note that the current position after the polygon has been added, is the last point in <i>polygon</i>. To draw a line back to the first point, use the <a href="qpainterpath.html#closeSubpath">closeSubpath</a>() function.</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/qpainterpath-addpolygon.png" alt="" /></td><td ><pre class="cpp"> <span class="type"><a href="qlineargradient.html">QLinearGradient</a></span> myGradient;
 <span class="type"><a href="qpen.html">QPen</a></span> myPen;
 <span class="type"><a href="qpolygonf.html">QPolygonF</a></span> myPolygon;

 <span class="type"><a href="qpainterpath.html">QPainterPath</a></span> myPath;
 myPath<span class="operator">.</span>addPolygon(myPolygon);

 <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
 painter<span class="operator">.</span>setBrush(myGradient);
 painter<span class="operator">.</span>setPen(myPen);
 painter<span class="operator">.</span>drawPath(myPath);</pre>
</td></tr>
</table>
<p><b>See also </b><a href="qpainterpath.html#lineTo">lineTo</a>() and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@addPolygon -->
<!-- $$$addRect[overload1]$$$addRectconstQRectF& -->
<h3 class="fn"><a name="addRect"></a><span class="type">void</span> QPainterPath::<span class="name">addRect</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>rectangle</i> )</h3>
<p>Adds the given <i>rectangle</i> to this path as a closed subpath.</p>
<p>The <i>rectangle</i> is added as a clockwise set of lines. The painter path's current position after the <i>rectangle</i> has been added is at the top-left corner of the rectangle.</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/qpainterpath-addrectangle.png" alt="" /></td><td ><pre class="cpp"> <span class="type"><a href="qlineargradient.html">QLinearGradient</a></span> myGradient;
 <span class="type"><a href="qpen.html">QPen</a></span> myPen;
 <span class="type"><a href="qrectf.html">QRectF</a></span> myRectangle;

 <span class="type"><a href="qpainterpath.html">QPainterPath</a></span> myPath;
 myPath<span class="operator">.</span>addRect(myRectangle);

 <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
 painter<span class="operator">.</span>setBrush(myGradient);
 painter<span class="operator">.</span>setPen(myPen);
 painter<span class="operator">.</span>drawPath(myPath);</pre>
</td></tr>
</table>
<p><b>See also </b><a href="qpainterpath.html#addRegion">addRegion</a>(), <a href="qpainterpath.html#lineTo">lineTo</a>(), and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@addRect -->
<!-- $$$addRect$$$addRectqrealqrealqrealqreal -->
<h3 class="fn"><a name="addRect-2"></a><span class="type">void</span> QPainterPath::<span class="name">addRect</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>height</i> )</h3>
<p>This is an overloaded function.</p>
<p>Adds a rectangle at position (<i>x</i>, <i>y</i>), with the given <i>width</i> and <i>height</i>, as a closed subpath.</p>
<!-- @@@addRect -->
<!-- $$$addRegion[overload1]$$$addRegionconstQRegion& -->
<h3 class="fn"><a name="addRegion"></a><span class="type">void</span> QPainterPath::<span class="name">addRegion</span> ( const <span class="type"><a href="qregion.html">QRegion</a></span> &amp; <i>region</i> )</h3>
<p>Adds the given <i>region</i> to the path by adding each rectangle in the region as a separate closed subpath.</p>
<p><b>See also </b><a href="qpainterpath.html#addRect">addRect</a>() and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@addRegion -->
<!-- $$$addRoundedRect[overload1]$$$addRoundedRectconstQRectF&qrealqrealQt::SizeMode -->
<h3 class="fn"><a name="addRoundedRect"></a><span class="type">void</span> QPainterPath::<span class="name">addRoundedRect</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>rect</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>xRadius</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>yRadius</i>, <span class="type"><a href="qt.html#SizeMode-enum">Qt::SizeMode</a></span> <i>mode</i> = Qt::AbsoluteSize )</h3>
<p>Adds the given rectangle <i>rect</i> with rounded corners to the path.</p>
<p>The <i>xRadius</i> and <i>yRadius</i> arguments specify the radii of the ellipses defining the corners of the rounded rectangle. When <i>mode</i> is <a href="qt.html#SizeMode-enum">Qt::RelativeSize</a>, <i>xRadius</i> and <i>yRadius</i> are specified in percentage of half the rectangle's width and height respectively, and should be in the range 0.0 to 100.0&#x2e;</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qpainterpath.html#addRect">addRect</a>().</p>
<!-- @@@addRoundedRect -->
<!-- $$$addRoundedRect$$$addRoundedRectqrealqrealqrealqrealqrealqrealQt::SizeMode -->
<h3 class="fn"><a name="addRoundedRect-2"></a><span class="type">void</span> QPainterPath::<span class="name">addRoundedRect</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>w</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>h</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>xRadius</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>yRadius</i>, <span class="type"><a href="qt.html#SizeMode-enum">Qt::SizeMode</a></span> <i>mode</i> = Qt::AbsoluteSize )</h3>
<p>This is an overloaded function.</p>
<p>Adds the given rectangle <i>x</i>, <i>y</i>, <i>w</i>, <i>h</i> with rounded corners to the path.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@addRoundedRect -->
<!-- $$$addText[overload1]$$$addTextconstQPointF&constQFont&constQString& -->
<h3 class="fn"><a name="addText"></a><span class="type">void</span> QPainterPath::<span class="name">addText</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>point</i>, const <span class="type"><a href="qfont.html">QFont</a></span> &amp; <i>font</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )</h3>
<p>Adds the given <i>text</i> to this path as a set of closed subpaths created from the <i>font</i> supplied. The subpaths are positioned so that the left end of the text's baseline lies at the specified <i>point</i>.</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/qpainterpath-addtext.png" alt="" /></td><td ><pre class="cpp"> <span class="type"><a href="qlineargradient.html">QLinearGradient</a></span> myGradient;
 <span class="type"><a href="qpen.html">QPen</a></span> myPen;
 <span class="type"><a href="qfont.html">QFont</a></span> myFont;
 <span class="type"><a href="qpointf.html">QPointF</a></span> baseline(x<span class="operator">,</span> y);

 <span class="type"><a href="qpainterpath.html">QPainterPath</a></span> myPath;
 myPath<span class="operator">.</span>addText(baseline<span class="operator">,</span> myFont<span class="operator">,</span> tr(<span class="string">&quot;Qt&quot;</span>));

 <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
 painter<span class="operator">.</span>setBrush(myGradient);
 painter<span class="operator">.</span>setPen(myPen);
 painter<span class="operator">.</span>drawPath(myPath);</pre>
</td></tr>
</table>
<p><b>See also </b><a href="qpainter.html#drawText">QPainter::drawText</a>() and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@addText -->
<!-- $$$addText$$$addTextqrealqrealconstQFont&constQString& -->
<h3 class="fn"><a name="addText-2"></a><span class="type">void</span> QPainterPath::<span class="name">addText</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, const <span class="type"><a href="qfont.html">QFont</a></span> &amp; <i>font</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )</h3>
<p>This is an overloaded function.</p>
<p>Adds the given <i>text</i> to this path as a set of closed subpaths created from the <i>font</i> supplied. The subpaths are positioned so that the left end of the text's baseline lies at the point specified by (<i>x</i>, <i>y</i>).</p>
<!-- @@@addText -->
<!-- $$$angleAtPercent[overload1]$$$angleAtPercentqreal -->
<h3 class="fn"><a name="angleAtPercent"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QPainterPath::<span class="name">angleAtPercent</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>t</i> ) const</h3>
<p>Returns the angle of the path tangent at the percentage <i>t</i>. The argument <i>t</i> has to be between 0 and 1.</p>
<p>Positive values for the angles mean counter-clockwise while negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position.</p>
<p>Note that similarly to the other percent methods, the percentage measurement is not linear with regards to the length if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations.</p>
<!-- @@@angleAtPercent -->
<!-- $$$arcMoveTo[overload1]$$$arcMoveToconstQRectF&qreal -->
<h3 class="fn"><a name="arcMoveTo"></a><span class="type">void</span> QPainterPath::<span class="name">arcMoveTo</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>rectangle</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i> )</h3>
<p>Creates a move to that lies on the arc that occupies the given <i>rectangle</i> at <i>angle</i>.</p>
<p>Angles are specified in degrees. Clockwise arcs can be specified using negative angles.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qpainterpath.html#moveTo">moveTo</a>() and <a href="qpainterpath.html#arcTo">arcTo</a>().</p>
<!-- @@@arcMoveTo -->
<!-- $$$arcMoveTo$$$arcMoveToqrealqrealqrealqrealqreal -->
<h3 class="fn"><a name="arcMoveTo-2"></a><span class="type">void</span> QPainterPath::<span class="name">arcMoveTo</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>height</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>angle</i> )</h3>
<p>This is an overloaded function.</p>
<p>Creates a move to that lies on the arc that occupies the <a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>width</i>, <i>height</i>) at <i>angle</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@arcMoveTo -->
<!-- $$$arcTo[overload1]$$$arcToconstQRectF&qrealqreal -->
<h3 class="fn"><a name="arcTo"></a><span class="type">void</span> QPainterPath::<span class="name">arcTo</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>rectangle</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>startAngle</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>sweepLength</i> )</h3>
<p>Creates an arc that occupies the given <i>rectangle</i>, beginning at the specified <i>startAngle</i> and extending <i>sweepLength</i> degrees counter-clockwise.</p>
<p>Angles are specified in degrees. Clockwise arcs can be specified using negative angles.</p>
<p>Note that this function connects the starting point of the arc to the current position if they are not already connected. After the arc has been added, the current position is the last point in arc. To draw a line back to the first point, use the <a href="qpainterpath.html#closeSubpath">closeSubpath</a>() function.</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/qpainterpath-arcto.png" alt="" /></td><td ><pre class="cpp"> <span class="type"><a href="qlineargradient.html">QLinearGradient</a></span> myGradient;
 <span class="type"><a href="qpen.html">QPen</a></span> myPen;

 <span class="type"><a href="qpointf.html">QPointF</a></span> center<span class="operator">,</span> startPoint;

 <span class="type"><a href="qpainterpath.html">QPainterPath</a></span> myPath;
 myPath<span class="operator">.</span><a href="qpainterpath.html#moveTo">moveTo</a>(center);
 myPath<span class="operator">.</span>arcTo(boundingRect<span class="operator">,</span> startAngle<span class="operator">,</span>
              sweepLength);

 <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
 painter<span class="operator">.</span>setBrush(myGradient);
 painter<span class="operator">.</span>setPen(myPen);
 painter<span class="operator">.</span>drawPath(myPath);</pre>
</td></tr>
</table>
<p><b>See also </b><a href="qpainterpath.html#arcMoveTo">arcMoveTo</a>(), <a href="qpainterpath.html#addEllipse">addEllipse</a>(), <a href="qpainter.html#drawArc">QPainter::drawArc</a>(), <a href="qpainter.html#drawPie">QPainter::drawPie</a>(), and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@arcTo -->
<!-- $$$arcTo$$$arcToqrealqrealqrealqrealqrealqreal -->
<h3 class="fn"><a name="arcTo-2"></a><span class="type">void</span> QPainterPath::<span class="name">arcTo</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>height</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>startAngle</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>sweepLength</i> )</h3>
<p>This is an overloaded function.</p>
<p>Creates an arc that occupies the rectangle <a href="qrectf.html">QRectF</a>(<i>x</i>, <i>y</i>, <i>width</i>, <i>height</i>), beginning at the specified <i>startAngle</i> and extending <i>sweepLength</i> degrees counter-clockwise.</p>
<!-- @@@arcTo -->
<!-- $$$boundingRect[overload1]$$$boundingRect -->
<h3 class="fn"><a name="boundingRect"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QPainterPath::<span class="name">boundingRect</span> () const</h3>
<p>Returns the bounding rectangle of this painter path as a rectangle with floating point precision.</p>
<p><b>See also </b><a href="qpainterpath.html#controlPointRect">controlPointRect</a>().</p>
<!-- @@@boundingRect -->
<!-- $$$closeSubpath[overload1]$$$closeSubpath -->
<h3 class="fn"><a name="closeSubpath"></a><span class="type">void</span> QPainterPath::<span class="name">closeSubpath</span> ()</h3>
<p>Closes the current subpath by drawing a line to the beginning of the subpath, automatically starting a new path. The current point of the new path is (0, 0).</p>
<p>If the subpath does not contain any elements, this function does nothing.</p>
<p><b>See also </b><a href="qpainterpath.html#moveTo">moveTo</a>() and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@closeSubpath -->
<!-- $$$connectPath[overload1]$$$connectPathconstQPainterPath& -->
<h3 class="fn"><a name="connectPath"></a><span class="type">void</span> QPainterPath::<span class="name">connectPath</span> ( const <span class="type">QPainterPath</span> &amp; <i>path</i> )</h3>
<p>Connects the given <i>path</i> to <i>this</i> path by adding a line from the last element of this path to the first element of the given path.</p>
<p><b>See also </b><a href="qpainterpath.html#addPath">addPath</a>() and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@connectPath -->
<!-- $$$contains[overload1]$$$containsconstQPointF& -->
<h3 class="fn"><a name="contains"></a><span class="type">bool</span> QPainterPath::<span class="name">contains</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>point</i> ) const</h3>
<p>Returns true if the given <i>point</i> is inside the path, otherwise returns false.</p>
<p><b>See also </b><a href="qpainterpath.html#intersects">intersects</a>().</p>
<!-- @@@contains -->
<!-- $$$contains$$$containsconstQRectF& -->
<h3 class="fn"><a name="contains-2"></a><span class="type">bool</span> QPainterPath::<span class="name">contains</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>rectangle</i> ) const</h3>
<p>Returns true if the given <i>rectangle</i> is inside the path, otherwise returns false.</p>
<!-- @@@contains -->
<!-- $$$contains$$$containsconstQPainterPath& -->
<h3 class="fn"><a name="contains-3"></a><span class="type">bool</span> QPainterPath::<span class="name">contains</span> ( const <span class="type">QPainterPath</span> &amp; <i>p</i> ) const</h3>
<p>Returns true if the given path <i>p</i> is contained within the current path. Returns false if any edges of the current path and <i>p</i> intersect.</p>
<p>Set operations on paths will treat the paths as areas. Non-closed paths will be treated as implicitly closed.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qpainterpath.html#intersects">intersects</a>().</p>
<!-- @@@contains -->
<!-- $$$controlPointRect[overload1]$$$controlPointRect -->
<h3 class="fn"><a name="controlPointRect"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QPainterPath::<span class="name">controlPointRect</span> () const</h3>
<p>Returns the rectangle containing all the points and control points in this path.</p>
<p>This function is significantly faster to compute than the exact <a href="qpainterpath.html#boundingRect">boundingRect</a>(), and the returned rectangle is always a superset of the rectangle returned by <a href="qpainterpath.html#boundingRect">boundingRect</a>().</p>
<p><b>See also </b><a href="qpainterpath.html#boundingRect">boundingRect</a>().</p>
<!-- @@@controlPointRect -->
<!-- $$$cubicTo[overload1]$$$cubicToconstQPointF&constQPointF&constQPointF& -->
<h3 class="fn"><a name="cubicTo"></a><span class="type">void</span> QPainterPath::<span class="name">cubicTo</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>c1</i>, const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>c2</i>, const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>endPoint</i> )</h3>
<p>Adds a cubic Bezier curve between the current position and the given <i>endPoint</i> using the control points specified by <i>c1</i>, and <i>c2</i>.</p>
<p>After the curve is added, the current position is updated to be at the end point of the curve.</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/qpainterpath-cubicto.png" alt="" /></td><td ><pre class="cpp"> <span class="type"><a href="qlineargradient.html">QLinearGradient</a></span> myGradient;
 <span class="type"><a href="qpen.html">QPen</a></span> myPen;

 <span class="type"><a href="qpainterpath.html">QPainterPath</a></span> myPath;
 myPath<span class="operator">.</span>cubicTo(c1<span class="operator">,</span> c2<span class="operator">,</span> endPoint);

 <span class="type"><a href="qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
 painter<span class="operator">.</span>setBrush(myGradient);
 painter<span class="operator">.</span>setPen(myPen);
 painter<span class="operator">.</span>drawPath(myPath);</pre>
</td></tr>
</table>
<p><b>See also </b><a href="qpainterpath.html#quadTo">quadTo</a>() and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@cubicTo -->
<!-- $$$cubicTo$$$cubicToqrealqrealqrealqrealqrealqreal -->
<h3 class="fn"><a name="cubicTo-2"></a><span class="type">void</span> QPainterPath::<span class="name">cubicTo</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>c1X</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>c1Y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>c2X</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>c2Y</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>endPointX</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>endPointY</i> )</h3>
<p>This is an overloaded function.</p>
<p>Adds a cubic Bezier curve between the current position and the end point (<i>endPointX</i>, <i>endPointY</i>) with control points specified by (<i>c1X</i>, <i>c1Y</i>) and (<i>c2X</i>, <i>c2Y</i>).</p>
<!-- @@@cubicTo -->
<!-- $$$currentPosition[overload1]$$$currentPosition -->
<h3 class="fn"><a name="currentPosition"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QPainterPath::<span class="name">currentPosition</span> () const</h3>
<p>Returns the current position of the path.</p>
<!-- @@@currentPosition -->
<!-- $$$elementAt[overload1]$$$elementAtint -->
<h3 class="fn"><a name="elementAt"></a>const <span class="type"><a href="qpainterpath-element.html">QPainterPath::Element</a></span> &amp; QPainterPath::<span class="name">elementAt</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns the element at the given <i>index</i> in the painter path.</p>
<p><b>See also </b><a href="qpainterpath.html#ElementType-enum">ElementType</a>, <a href="qpainterpath.html#elementCount">elementCount</a>(), and <a href="qpainterpath.html#isEmpty">isEmpty</a>().</p>
<!-- @@@elementAt -->
<!-- $$$elementCount[overload1]$$$elementCount -->
<h3 class="fn"><a name="elementCount"></a><span class="type">int</span> QPainterPath::<span class="name">elementCount</span> () const</h3>
<p>Returns the number of path elements in the painter path.</p>
<p><b>See also </b><a href="qpainterpath.html#ElementType-enum">ElementType</a>, <a href="qpainterpath.html#elementAt">elementAt</a>(), and <a href="qpainterpath.html#isEmpty">isEmpty</a>().</p>
<!-- @@@elementCount -->
<!-- $$$fillRule[overload1]$$$fillRule -->
<h3 class="fn"><a name="fillRule"></a><span class="type"><a href="qt.html#FillRule-enum">Qt::FillRule</a></span> QPainterPath::<span class="name">fillRule</span> () const</h3>
<p>Returns the painter path's currently set fill rule.</p>
<p><b>See also </b><a href="qpainterpath.html#setFillRule">setFillRule</a>().</p>
<!-- @@@fillRule -->
<!-- $$$intersected[overload1]$$$intersectedconstQPainterPath& -->
<h3 class="fn"><a name="intersected"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">intersected</span> ( const <span class="type">QPainterPath</span> &amp; <i>p</i> ) const</h3>
<p>Returns a path which is the intersection of this path's fill area and <i>p</i>'s fill area. Bezier curves may be flattened to line segments due to numerical instability of doing bezier curve intersections.</p>
<p>This function was introduced in Qt 4.3.</p>
<!-- @@@intersected -->
<!-- $$$intersects[overload1]$$$intersectsconstQRectF& -->
<h3 class="fn"><a name="intersects"></a><span class="type">bool</span> QPainterPath::<span class="name">intersects</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>rectangle</i> ) const</h3>
<p>Returns true if any point in the given <i>rectangle</i> intersects the path; otherwise returns false.</p>
<p>There is an intersection if any of the lines making up the rectangle crosses a part of the path or if any part of the rectangle overlaps with any area enclosed by the path. This function respects the current fillRule to determine what is considered inside the path.</p>
<p><b>See also </b><a href="qpainterpath.html#contains">contains</a>().</p>
<!-- @@@intersects -->
<!-- $$$intersects$$$intersectsconstQPainterPath& -->
<h3 class="fn"><a name="intersects-2"></a><span class="type">bool</span> QPainterPath::<span class="name">intersects</span> ( const <span class="type">QPainterPath</span> &amp; <i>p</i> ) const</h3>
<p>Returns true if the current path intersects at any point the given path <i>p</i>. Also returns true if the current path contains or is contained by any part of <i>p</i>.</p>
<p>Set operations on paths will treat the paths as areas. Non-closed paths will be treated as implicitly closed.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qpainterpath.html#contains">contains</a>().</p>
<!-- @@@intersects -->
<!-- $$$isEmpty[overload1]$$$isEmpty -->
<h3 class="fn"><a name="isEmpty"></a><span class="type">bool</span> QPainterPath::<span class="name">isEmpty</span> () const</h3>
<p>Returns true if either there are no elements in this path, or if the only element is a <a href="qpainterpath.html#ElementType-enum">MoveToElement</a>; otherwise returns false.</p>
<p><b>See also </b><a href="qpainterpath.html#elementCount">elementCount</a>().</p>
<!-- @@@isEmpty -->
<!-- $$$length[overload1]$$$length -->
<h3 class="fn"><a name="length"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QPainterPath::<span class="name">length</span> () const</h3>
<p>Returns the length of the current path.</p>
<!-- @@@length -->
<!-- $$$lineTo[overload1]$$$lineToconstQPointF& -->
<h3 class="fn"><a name="lineTo"></a><span class="type">void</span> QPainterPath::<span class="name">lineTo</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>endPoint</i> )</h3>
<p>Adds a straight line from the current position to the given <i>endPoint</i>. After the line is drawn, the current position is updated to be at the end point of the line.</p>
<p><b>See also </b><a href="qpainterpath.html#addPolygon">addPolygon</a>(), <a href="qpainterpath.html#addRect">addRect</a>(), and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@lineTo -->
<!-- $$$lineTo$$$lineToqrealqreal -->
<h3 class="fn"><a name="lineTo-2"></a><span class="type">void</span> QPainterPath::<span class="name">lineTo</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i> )</h3>
<p>This is an overloaded function.</p>
<p>Draws a line from the current position to the point (<i>x</i>, <i>y</i>).</p>
<!-- @@@lineTo -->
<!-- $$$moveTo[overload1]$$$moveToconstQPointF& -->
<h3 class="fn"><a name="moveTo"></a><span class="type">void</span> QPainterPath::<span class="name">moveTo</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>point</i> )</h3>
<p>Moves the current point to the given <i>point</i>, implicitly starting a new subpath and closing the previous one.</p>
<p><b>See also </b><a href="qpainterpath.html#closeSubpath">closeSubpath</a>() and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@moveTo -->
<!-- $$$moveTo$$$moveToqrealqreal -->
<h3 class="fn"><a name="moveTo-2"></a><span class="type">void</span> QPainterPath::<span class="name">moveTo</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i> )</h3>
<p>This is an overloaded function.</p>
<p>Moves the current position to (<i>x</i>, <i>y</i>) and starts a new subpath, implicitly closing the previous path.</p>
<!-- @@@moveTo -->
<!-- $$$percentAtLength[overload1]$$$percentAtLengthqreal -->
<h3 class="fn"><a name="percentAtLength"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QPainterPath::<span class="name">percentAtLength</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>len</i> ) const</h3>
<p>Returns percentage of the whole path at the specified length <i>len</i>.</p>
<p>Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations.</p>
<!-- @@@percentAtLength -->
<!-- $$$pointAtPercent[overload1]$$$pointAtPercentqreal -->
<h3 class="fn"><a name="pointAtPercent"></a><span class="type"><a href="qpointf.html">QPointF</a></span> QPainterPath::<span class="name">pointAtPercent</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>t</i> ) const</h3>
<p>Returns the point at at the percentage <i>t</i> of the current path. The argument <i>t</i> has to be between 0 and 1.</p>
<p>Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations.</p>
<!-- @@@pointAtPercent -->
<!-- $$$quadTo[overload1]$$$quadToconstQPointF&constQPointF& -->
<h3 class="fn"><a name="quadTo"></a><span class="type">void</span> QPainterPath::<span class="name">quadTo</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>c</i>, const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>endPoint</i> )</h3>
<p>Adds a quadratic Bezier curve between the current position and the given <i>endPoint</i> with the control point specified by <i>c</i>.</p>
<p>After the curve is added, the current point is updated to be at the end point of the curve.</p>
<p><b>See also </b><a href="qpainterpath.html#cubicTo">cubicTo</a>() and <a href="qpainterpath.html#composing-a-qpainterpath">Composing a QPainterPath</a>.</p>
<!-- @@@quadTo -->
<!-- $$$quadTo$$$quadToqrealqrealqrealqreal -->
<h3 class="fn"><a name="quadTo-2"></a><span class="type">void</span> QPainterPath::<span class="name">quadTo</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>cx</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>cy</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>endPointX</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>endPointY</i> )</h3>
<p>This is an overloaded function.</p>
<p>Adds a quadratic Bezier curve between the current point and the endpoint (<i>endPointX</i>, <i>endPointY</i>) with the control point specified by (<i>cx</i>, <i>cy</i>).</p>
<!-- @@@quadTo -->
<!-- $$$setElementPositionAt[overload1]$$$setElementPositionAtintqrealqreal -->
<h3 class="fn"><a name="setElementPositionAt"></a><span class="type">void</span> QPainterPath::<span class="name">setElementPositionAt</span> ( <span class="type">int</span> <i>index</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i> )</h3>
<p>Sets the x and y coordinate of the element at index <i>index</i> to <i>x</i> and <i>y</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@setElementPositionAt -->
<!-- $$$setFillRule[overload1]$$$setFillRuleQt::FillRule -->
<h3 class="fn"><a name="setFillRule"></a><span class="type">void</span> QPainterPath::<span class="name">setFillRule</span> ( <span class="type"><a href="qt.html#FillRule-enum">Qt::FillRule</a></span> <i>fillRule</i> )</h3>
<p>Sets the fill rule of the painter path to the given <i>fillRule</i>. Qt provides two methods for filling paths:</p>
<table class="generic">
<thead><tr class="qt-style"><th ><a href="qt.html#FillRule-enum">Qt::OddEvenFill</a> (default)</th><th ><a href="qt.html#FillRule-enum">Qt::WindingFill</a></th></tr></thead>
<tr valign="top" class="odd"><td ><img src="images/qt-fillrule-oddeven.png" alt="" /></td><td ><img src="images/qt-fillrule-winding.png" alt="" /></td></tr>
</table>
<p><b>See also </b><a href="qpainterpath.html#fillRule">fillRule</a>().</p>
<!-- @@@setFillRule -->
<!-- $$$simplified[overload1]$$$simplified -->
<h3 class="fn"><a name="simplified"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">simplified</span> () const</h3>
<p>Returns a simplified version of this path. This implies merging all subpaths that intersect, and returning a path containing no intersecting edges. Consecutive parallel lines will also be merged. The simplified path will always use the default fill rule, <a href="qt.html#FillRule-enum">Qt::OddEvenFill</a>. Bezier curves may be flattened to line segments due to numerical instability of doing bezier curve intersections.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@simplified -->
<!-- $$$slopeAtPercent[overload1]$$$slopeAtPercentqreal -->
<h3 class="fn"><a name="slopeAtPercent"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QPainterPath::<span class="name">slopeAtPercent</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>t</i> ) const</h3>
<p>Returns the slope of the path at the percentage <i>t</i>. The argument <i>t</i> has to be between 0 and 1.</p>
<p>Note that similarly to other percent methods, the percentage measurement is not linear with regards to the length, if curves are present in the path. When curves are present the percentage argument is mapped to the t parameter of the Bezier equations.</p>
<!-- @@@slopeAtPercent -->
<!-- $$$subtracted[overload1]$$$subtractedconstQPainterPath& -->
<h3 class="fn"><a name="subtracted"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">subtracted</span> ( const <span class="type">QPainterPath</span> &amp; <i>p</i> ) const</h3>
<p>Returns a path which is <i>p</i>'s fill area subtracted from this path's fill area.</p>
<p>Set operations on paths will treat the paths as areas. Non-closed paths will be treated as implicitly closed. Bezier curves may be flattened to line segments due to numerical instability of doing bezier curve intersections.</p>
<p>This function was introduced in Qt 4.3.</p>
<!-- @@@subtracted -->
<!-- $$$swap[overload1]$$$swapQPainterPath& -->
<h3 class="fn"><a name="swap"></a><span class="type">void</span> QPainterPath::<span class="name">swap</span> ( <span class="type">QPainterPath</span> &amp; <i>other</i> )</h3>
<p>Swaps painter path <i>other</i> with this painter path. This operation is very fast and never fails.</p>
<p>This function was introduced in Qt 4.8.</p>
<!-- @@@swap -->
<!-- $$$toFillPolygon[overload1]$$$toFillPolygonconstQTransform& -->
<h3 class="fn"><a name="toFillPolygon"></a><span class="type"><a href="qpolygonf.html">QPolygonF</a></span> QPainterPath::<span class="name">toFillPolygon</span> ( const <span class="type"><a href="qtransform.html">QTransform</a></span> &amp; <i>matrix</i> ) const</h3>
<p>Converts the path into a polygon using the <a href="qtransform.html">QTransform</a> <i>matrix</i>, and returns the polygon.</p>
<p>The polygon is created by first converting all subpaths to polygons, then using a rewinding technique to make sure that overlapping subpaths can be filled using the correct fill rule.</p>
<p>Note that rewinding inserts addition lines in the polygon so the outline of the fill polygon does not match the outline of the path.</p>
<p><b>See also </b><a href="qpainterpath.html#toSubpathPolygons">toSubpathPolygons</a>(), <a href="qpainterpath.html#toFillPolygons">toFillPolygons</a>(), and <a href="qpainterpath.html#qpainterpath-conversion">QPainterPath Conversion</a>.</p>
<!-- @@@toFillPolygon -->
<!-- $$$toFillPolygon$$$toFillPolygonconstQMatrix& -->
<h3 class="fn"><a name="toFillPolygon-2"></a><span class="type"><a href="qpolygonf.html">QPolygonF</a></span> QPainterPath::<span class="name">toFillPolygon</span> ( const <span class="type"><a href="qmatrix.html">QMatrix</a></span> &amp; <i>matrix</i> = QMatrix() ) const</h3>
<p>This is an overloaded function.</p>
<!-- @@@toFillPolygon -->
<!-- $$$toFillPolygons[overload1]$$$toFillPolygonsconstQTransform& -->
<h3 class="fn"><a name="toFillPolygons"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qpolygonf.html">QPolygonF</a></span>&gt; QPainterPath::<span class="name">toFillPolygons</span> ( const <span class="type"><a href="qtransform.html">QTransform</a></span> &amp; <i>matrix</i> ) const</h3>
<p>Converts the path into a list of polygons using the <a href="qtransform.html">QTransform</a> <i>matrix</i>, and returns the list.</p>
<p>The function differs from the <a href="qpainterpath.html#toFillPolygon">toFillPolygon</a>() function in that it creates several polygons. It is provided because it is usually faster to draw several small polygons than to draw one large polygon, even though the total number of points drawn is the same.</p>
<p>The toFillPolygons() function differs from the <a href="qpainterpath.html#toSubpathPolygons">toSubpathPolygons</a>() function in that it create only polygon for subpaths that have overlapping bounding rectangles.</p>
<p>Like the <a href="qpainterpath.html#toFillPolygon">toFillPolygon</a>() function, this function uses a rewinding technique to make sure that overlapping subpaths can be filled using the correct fill rule. Note that rewinding inserts addition lines in the polygons so the outline of the fill polygon does not match the outline of the path.</p>
<p><b>See also </b><a href="qpainterpath.html#toSubpathPolygons">toSubpathPolygons</a>(), <a href="qpainterpath.html#toFillPolygon">toFillPolygon</a>(), and <a href="qpainterpath.html#qpainterpath-conversion">QPainterPath Conversion</a>.</p>
<!-- @@@toFillPolygons -->
<!-- $$$toFillPolygons$$$toFillPolygonsconstQMatrix& -->
<h3 class="fn"><a name="toFillPolygons-2"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qpolygonf.html">QPolygonF</a></span>&gt; QPainterPath::<span class="name">toFillPolygons</span> ( const <span class="type"><a href="qmatrix.html">QMatrix</a></span> &amp; <i>matrix</i> = QMatrix() ) const</h3>
<p>This is an overloaded function.</p>
<!-- @@@toFillPolygons -->
<!-- $$$toReversed[overload1]$$$toReversed -->
<h3 class="fn"><a name="toReversed"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">toReversed</span> () const</h3>
<p>Creates and returns a reversed copy of the path.</p>
<p>It is the order of the elements that is reversed: If a <a href="qpainterpath.html">QPainterPath</a> is composed by calling the <a href="qpainterpath.html#moveTo">moveTo</a>(), <a href="qpainterpath.html#lineTo">lineTo</a>() and <a href="qpainterpath.html#cubicTo">cubicTo</a>() functions in the specified order, the reversed copy is composed by calling <a href="qpainterpath.html#cubicTo">cubicTo</a>(), <a href="qpainterpath.html#lineTo">lineTo</a>() and <a href="qpainterpath.html#moveTo">moveTo</a>().</p>
<!-- @@@toReversed -->
<!-- $$$toSubpathPolygons[overload1]$$$toSubpathPolygonsconstQTransform& -->
<h3 class="fn"><a name="toSubpathPolygons"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qpolygonf.html">QPolygonF</a></span>&gt; QPainterPath::<span class="name">toSubpathPolygons</span> ( const <span class="type"><a href="qtransform.html">QTransform</a></span> &amp; <i>matrix</i> ) const</h3>
<p>Converts the path into a list of polygons using the <a href="qtransform.html">QTransform</a> <i>matrix</i>, and returns the list.</p>
<p>This function creates one polygon for each subpath regardless of intersecting subpaths (i.e&#x2e; overlapping bounding rectangles). To make sure that such overlapping subpaths are filled correctly, use the <a href="qpainterpath.html#toFillPolygons">toFillPolygons</a>() function instead.</p>
<p><b>See also </b><a href="qpainterpath.html#toFillPolygons">toFillPolygons</a>(), <a href="qpainterpath.html#toFillPolygon">toFillPolygon</a>(), and <a href="qpainterpath.html#qpainterpath-conversion">QPainterPath Conversion</a>.</p>
<!-- @@@toSubpathPolygons -->
<!-- $$$toSubpathPolygons$$$toSubpathPolygonsconstQMatrix& -->
<h3 class="fn"><a name="toSubpathPolygons-2"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qpolygonf.html">QPolygonF</a></span>&gt; QPainterPath::<span class="name">toSubpathPolygons</span> ( const <span class="type"><a href="qmatrix.html">QMatrix</a></span> &amp; <i>matrix</i> = QMatrix() ) const</h3>
<p>This is an overloaded function.</p>
<!-- @@@toSubpathPolygons -->
<!-- $$$translate[overload1]$$$translateqrealqreal -->
<h3 class="fn"><a name="translate"></a><span class="type">void</span> QPainterPath::<span class="name">translate</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dx</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dy</i> )</h3>
<p>Translates all elements in the path by (<i>dx</i>, <i>dy</i>).</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qpainterpath.html#translated">translated</a>().</p>
<!-- @@@translate -->
<!-- $$$translate$$$translateconstQPointF& -->
<h3 class="fn"><a name="translate-2"></a><span class="type">void</span> QPainterPath::<span class="name">translate</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>offset</i> )</h3>
<p>This is an overloaded function.</p>
<p>Translates all elements in the path by the given <i>offset</i>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qpainterpath.html#translated">translated</a>().</p>
<!-- @@@translate -->
<!-- $$$translated[overload1]$$$translatedqrealqreal -->
<h3 class="fn"><a name="translated"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">translated</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dx</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>dy</i> ) const</h3>
<p>Returns a copy of the path that is translated by (<i>dx</i>, <i>dy</i>).</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qpainterpath.html#translate">translate</a>().</p>
<!-- @@@translated -->
<!-- $$$translated$$$translatedconstQPointF& -->
<h3 class="fn"><a name="translated-2"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">translated</span> ( const <span class="type"><a href="qpointf.html">QPointF</a></span> &amp; <i>offset</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns a copy of the path that is translated by the given <i>offset</i>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qpainterpath.html#translate">translate</a>().</p>
<!-- @@@translated -->
<!-- $$$united[overload1]$$$unitedconstQPainterPath& -->
<h3 class="fn"><a name="united"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">united</span> ( const <span class="type">QPainterPath</span> &amp; <i>p</i> ) const</h3>
<p>Returns a path which is the union of this path's fill area and <i>p</i>'s fill area.</p>
<p>Set operations on paths will treat the paths as areas. Non-closed paths will be treated as implicitly closed. Bezier curves may be flattened to line segments due to numerical instability of doing bezier curve intersections.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qpainterpath.html#intersected">intersected</a>() and <a href="qpainterpath.html#subtracted">subtracted</a>().</p>
<!-- @@@united -->
<!-- $$$operator!=[overload1]$$$operator!=constQPainterPath& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QPainterPath::<span class="name">operator!=</span> ( const <span class="type">QPainterPath</span> &amp; <i>path</i> ) const</h3>
<p>Returns true if this painter path differs from the given <i>path</i>.</p>
<p>Note that comparing paths may involve a per element comparison which can be slow for complex paths.</p>
<p><b>See also </b><a href="qpainterpath.html#operator-eq-eq">operator==</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator&[overload1]$$$operator&constQPainterPath& -->
<h3 class="fn"><a name="operator-and"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">operator&amp;</span> ( const <span class="type">QPainterPath</span> &amp; <i>other</i> ) const</h3>
<p>Returns the intersection of this path and the <i>other</i> path.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qpainterpath.html#intersected">intersected</a>(), <a href="qpainterpath.html#operator-and-eq">operator&amp;=</a>(), <a href="qpainterpath.html#united">united</a>(), and <a href="qpainterpath.html#operator-7c">operator|</a>().</p>
<!-- @@@operator& -->
<!-- $$$operator&=[overload1]$$$operator&=constQPainterPath& -->
<h3 class="fn"><a name="operator-and-eq"></a><span class="type">QPainterPath</span> &amp; QPainterPath::<span class="name">operator&amp;=</span> ( const <span class="type">QPainterPath</span> &amp; <i>other</i> )</h3>
<p>Intersects this path with <i>other</i> and returns a reference to this path.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qpainterpath.html#intersected">intersected</a>(), <a href="qpainterpath.html#operator-and">operator&amp;</a>(), and <a href="qpainterpath.html#operator-7c-eq">operator|=</a>().</p>
<!-- @@@operator&= -->
<!-- $$$operator+[overload1]$$$operator+constQPainterPath& -->
<h3 class="fn"><a name="operator-2b"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">operator+</span> ( const <span class="type">QPainterPath</span> &amp; <i>other</i> ) const</h3>
<p>Returns the union of this path and the <i>other</i> path. This function is equivalent to operator|().</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qpainterpath.html#united">united</a>(), <a href="qpainterpath.html#operator-2b-eq">operator+=</a>(), and <a href="qpainterpath.html#operator-">operator-</a>().</p>
<!-- @@@operator+ -->
<!-- $$$operator+=[overload1]$$$operator+=constQPainterPath& -->
<h3 class="fn"><a name="operator-2b-eq"></a><span class="type">QPainterPath</span> &amp; QPainterPath::<span class="name">operator+=</span> ( const <span class="type">QPainterPath</span> &amp; <i>other</i> )</h3>
<p>Unites this path with <i>other</i>, and returns a reference to this path. This is equivalent to operator|=().</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qpainterpath.html#united">united</a>(), <a href="qpainterpath.html#operator-2b">operator+</a>(), and <a href="qpainterpath.html#operator--eq">operator-=</a>().</p>
<!-- @@@operator+= -->
<!-- $$$operator-[overload1]$$$operator-constQPainterPath& -->
<h3 class="fn"><a name="operator-"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">operator-</span> ( const <span class="type">QPainterPath</span> &amp; <i>other</i> ) const</h3>
<p>Subtracts the <i>other</i> path from a copy of this path, and returns the copy.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qpainterpath.html#subtracted">subtracted</a>(), <a href="qpainterpath.html#operator--eq">operator-=</a>(), and <a href="qpainterpath.html#operator-2b">operator+</a>().</p>
<!-- @@@operator- -->
<!-- $$$operator-=[overload1]$$$operator-=constQPainterPath& -->
<h3 class="fn"><a name="operator--eq"></a><span class="type">QPainterPath</span> &amp; QPainterPath::<span class="name">operator-=</span> ( const <span class="type">QPainterPath</span> &amp; <i>other</i> )</h3>
<p>Subtracts <i>other</i> from this path, and returns a reference to this path.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qpainterpath.html#subtracted">subtracted</a>(), <a href="qpainterpath.html#operator-">operator-</a>(), and <a href="qpainterpath.html#operator-2b-eq">operator+=</a>().</p>
<!-- @@@operator-= -->
<!-- $$$operator=[overload1]$$$operator=constQPainterPath& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QPainterPath</span> &amp; QPainterPath::<span class="name">operator=</span> ( const <span class="type">QPainterPath</span> &amp; <i>path</i> )</h3>
<p>Assigns the given <i>path</i> to this painter path.</p>
<p><b>See also </b><a href="qpainterpath.html#QPainterPath">QPainterPath</a>().</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQPainterPath& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QPainterPath::<span class="name">operator==</span> ( const <span class="type">QPainterPath</span> &amp; <i>path</i> ) const</h3>
<p>Returns true if this painterpath is equal to the given <i>path</i>.</p>
<p>Note that comparing paths may involve a per element comparison which can be slow for complex paths.</p>
<p><b>See also </b><a href="qpainterpath.html#operator-not-eq">operator!=</a>().</p>
<!-- @@@operator== -->
<!-- $$$operator|[overload1]$$$operator|constQPainterPath& -->
<h3 class="fn"><a name="operator-7c"></a><span class="type">QPainterPath</span> QPainterPath::<span class="name">operator|</span> ( const <span class="type">QPainterPath</span> &amp; <i>other</i> ) const</h3>
<p>Returns the union of this path and the <i>other</i> path.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qpainterpath.html#united">united</a>(), <a href="qpainterpath.html#operator-7c-eq">operator|=</a>(), <a href="qpainterpath.html#intersected">intersected</a>(), and <a href="qpainterpath.html#operator-and">operator&amp;</a>().</p>
<!-- @@@operator| -->
<!-- $$$operator|=[overload1]$$$operator|=constQPainterPath& -->
<h3 class="fn"><a name="operator-7c-eq"></a><span class="type">QPainterPath</span> &amp; QPainterPath::<span class="name">operator|=</span> ( const <span class="type">QPainterPath</span> &amp; <i>other</i> )</h3>
<p>Unites this path with <i>other</i> and returns a reference to this path.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qpainterpath.html#united">united</a>(), <a href="qpainterpath.html#operator-7c">operator|</a>(), and <a href="qpainterpath.html#operator-and-eq">operator&amp;=</a>().</p>
<!-- @@@operator|= -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<<$$$operator<<QDataStream&constQPainterPath& -->
<h3 class="fn"><a name="operator-lt-lt-25"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&lt;&lt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>stream</i>, const <span class="type">QPainterPath</span> &amp; <i>path</i> )</h3>
<p>Writes the given painter <i>path</i> to the given <i>stream</i>, and returns a reference to the <i>stream</i>.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>$$$operator>>QDataStream&QPainterPath& -->
<h3 class="fn"><a name="operator-gt-gt-15"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&gt;&gt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>stream</i>, <span class="type">QPainterPath</span> &amp; <i>path</i> )</h3>
<p>Reads a painter path from the given <i>stream</i> into the specified <i>path</i>, and returns a reference to the <i>stream</i>.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator>> -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>