aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/user/api/SkRRect_Reference.md
blob: 3c4decfbba93f0c62c9a52dcf0d28b31f90efb6d (plain)
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
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
SkRRect Reference
===

# <a name='RRect'>RRect</a>

# <a name='SkRRect'>Class SkRRect</a>

## <a name='Constant'>Constant</a>


SkRRect related constants are defined by <code>enum</code>, <code>enum class</code>,  <code>#define</code>, <code>const</code>, and <code>constexpr</code>.
<table style='border-collapse: collapse; width: 62.5em'>
  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Topic</th>
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_Corner'>Corner</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>corner radii order</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_Type'>Type</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>specialization of <a href='#RRect'>Round Rect</a> geometry</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kComplex_Type'>kComplex Type</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>non-zero width and height with arbitrary radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kEmpty_Type'>kEmpty Type</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>zero width or height</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kLastType'>kLastType</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>largest <a href='#SkRRect_Type'>Type</a> value</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kLowerLeft_Corner'>kLowerLeft Corner</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>index of bottom-left corner radii</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kLowerRight_Corner'>kLowerRight Corner</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>index of bottom-right corner radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>non-zero width and height with axis-aligned radii</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kOval_Type'>kOval Type</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>non-zero width and height filled with radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kRect_Type'>kRect Type</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>non-zero width and height, and zeroed radii</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kSimple_Type'>kSimple Type</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>non-zero width and height with equal radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kSizeInMemory'>kSizeInMemory</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kUpperLeft_Corner'>kUpperLeft Corner</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>index of top-left corner radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kUpperRight_Corner'>kUpperRight Corner</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>index of top-right corner radii</td>
  </tr>
</table>

## <a name='Related_Function'>Related_Function</a>


SkRRect global, <code>struct</code>, and <code>class</code> related member functions share a topic.
<table style='border-collapse: collapse; width: 62.5em'>
  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Topic</th>
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_Type'>Type</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>specialization of <a href='#RRect'>Round Rect</a> geometry</td>
  </tr>
</table>

The <a href='#SkRRect'>SkRRect</a> class represents a rounded rect with a potentially different
radii for each corner. It does not have a constructor so must be
initialized with one of the initialization functions (e.g., <a href='#SkRRect_setEmpty'>setEmpty</a>,
<a href='#SkRRect_setRectRadii'>setRectRadii</a>, etc.)

This class allows implementing CSS properties that describe rounded corners.
A rectangle may have up to eight radii, one for each axis on each of its four
corners.

If either corner's radii are zero, the corner is square.
Negative radii are treated as zero.
If corner curves overlap, they are proportionally reduced to fit.

## Overview

<table style='border-collapse: collapse; width: 62.5em'>
  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Topic</th>
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Constant'>Constants</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>enum and enum class, and their const values</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Constructor'>Constructors</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>functions that construct <a href='#SkRRect'>SkRRect</a></td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Member_Function'>Functions</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>global and class member functions</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Operator'>Operators</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>operator overloading methods</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Related_Function'>Related Functions</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>similar member functions grouped together</td>
  </tr>
</table>


## <a name='Constructor'>Constructor</a>


SkRRect can be constructed or initialized by these functions, including C++ class constructors.
<table style='border-collapse: collapse; width: 62.5em'>
  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Topic</th>
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeEmpty'>MakeEmpty</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates with zeroed bounds and corner radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeOval'>MakeOval</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates <a href='undocumented#Oval'>Oval</a> to fit bounds</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeRect'>MakeRect</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>copies bounds and zeroes corner radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeRectXY'>MakeRectXY</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates rounded rectangle</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_empty_constructor'>SkRRect()</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates with zeroed bounds and corner radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_copy_const_SkRRect'>SkRRect(const SkRRect& rrect)</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>copies bounds and corner radii</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_makeOffset'>makeOffset</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>offsets bounds and radii</td>
  </tr>
</table>

## <a name='Operator'>Operator</a>


SkRRect operators inline class member functions with arithmetic equivalents.
<table style='border-collapse: collapse; width: 62.5em'>
  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Topic</th>
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_notequal_operator'>operator!=(const SkRRect& a, const SkRRect& b)</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if members are unequal</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_copy_operator'>operator=(const SkRRect& rrect)</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>copies bounds and corner radii</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_equal_operator'>operator==(const SkRRect& a, const SkRRect& b)</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if members are equal</td>
  </tr>
</table>

## <a name='Member_Function'>Member Function</a>


SkRRect member functions read and modify the structure properties.
<table style='border-collapse: collapse; width: 62.5em'>
  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Topic</th>
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeEmpty'>MakeEmpty</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates with zeroed bounds and corner radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeOval'>MakeOval</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates <a href='undocumented#Oval'>Oval</a> to fit bounds</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeRect'>MakeRect</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>copies bounds and zeroes corner radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeRectXY'>MakeRectXY</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates rounded rectangle</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_contains'>contains</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='SkRect_Reference#Rect'>Rect</a> is inside</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_dump_2'>dump</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sends text representation to standard output</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_dumpHex'>dumpHex</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sends text representation using hexadecimal to standard output</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_getBounds'>getBounds</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns bounds</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_getSimpleRadii'>getSimpleRadii</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns corner radii for simple types</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_getType'>getType</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#SkRRect_Type'>Type</a></td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_height'>height</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns span in y</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_inset'>inset</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>insets bounds and radii</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_isComplex'>isComplex</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if not empty, rect, oval, simple, or nine-patch</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_isEmpty'>isEmpty</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if width or height are zero</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_isNinePatch'>isNinePatch</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if not empty, rect, oval or simple; and radii are axis-aligned</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_isOval'>isOval</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if not empty, axes radii are equal, radii fill bounds</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_isRect'>isRect</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if not empty, and one radius at each corner is zero</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_isSimple'>isSimple</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if not empty, rect or oval; and axes radii are equal</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_isValid'>isValid</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_makeOffset'>makeOffset</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>offsets bounds and radii</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_offset'>offset</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>offsets bounds and radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_outset'>outset</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>outsets bounds and radii</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_radii'>radii</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns x-axis and y-axis radii for one corner</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_readFromMemory'>readFromMemory</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_rect'>rect</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns bounds</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setEmpty'>setEmpty</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>zeroes width, height, and corner radii</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setNinePatch'>setNinePatch</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>replaces with rounded rectangle</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setOval'>setOval</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>replaces with <a href='undocumented#Oval'>Oval</a> to fit bounds</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setRect'>setRect</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets rect bounds with zeroed corners</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setRectRadii'>setRectRadii</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>replaces with rounded rectangle</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setRectXY'>setRectXY</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>replaces with rounded rectangle</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_transform'>transform</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>scales and offsets into copy</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_type'>type</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#SkRRect_Type'>Type</a></td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_width'>width</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns span in x</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_writeToMemory'>writeToMemory</a></td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
  </tr>
</table>

<a name='SkRRect_empty_constructor'></a>
## SkRRect

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='#SkRRect'>SkRRect</a>()
</pre>

Initializes bounds at (0, 0), the origin, with zero width and height.
Initializes corner radii to (0, 0), and sets type of <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.

### Return Value

empty <a href='#RRect'>Round Rect</a>

### Example

<div><fiddle-embed name="471e7aad0feaf9ec3a21757a317a64f5"></fiddle-embed></div>

### See Also

<a href='#SkRRect_setEmpty'>setEmpty</a> <a href='#SkRRect_isEmpty'>isEmpty</a>

---

<a name='SkRRect_copy_const_SkRRect'></a>
## SkRRect

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='#SkRRect'>SkRRect</a>(const <a href='#SkRRect'>SkRRect</a>& rrect)
</pre>

Initializes to copy of <a href='#SkRRect_copy_const_SkRRect_rrect'>rrect</a> bounds and corner radii.

### Parameters

<table>  <tr>    <td><a name='SkRRect_copy_const_SkRRect_rrect'><code><strong>rrect</strong></code></a></td>
    <td>bounds and corner to copy</td>
  </tr>
</table>

### Return Value

copy of <a href='#SkRRect_copy_const_SkRRect_rrect'>rrect</a>

### Example

<div><fiddle-embed name="9be9adb06c26dac75a5a5a7c1ceca681"></fiddle-embed></div>

### See Also

<a href='#SkRRect_copy_operator'>operator=(const SkRRect& rrect)</a> <a href='#SkRRect_MakeRect'>MakeRect</a>

---

<a name='SkRRect_copy_operator'></a>
## operator=

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='#SkRRect'>SkRRect</a>& <a href='#SkRRect_copy_operator'>operator=(const SkRRect& rrect)</a>
</pre>

Copies <a href='#SkRRect_copy_operator_rrect'>rrect</a> bounds and corner radii.

### Parameters

<table>  <tr>    <td><a name='SkRRect_copy_operator_rrect'><code><strong>rrect</strong></code></a></td>
    <td>bounds and corner to copy</td>
  </tr>
</table>

### Return Value

copy of <a href='#SkRRect_copy_operator_rrect'>rrect</a>

### Example

<div><fiddle-embed name="94c298c404fff922ec53a3d7567852a2"></fiddle-embed></div>

### See Also

<a href='#SkRRect_copy_const_SkRRect'>SkRRect(const SkRRect& rrect)</a> <a href='#SkRRect_MakeRect'>MakeRect</a>

---

## <a name='Type'>Type</a>

## <a name='SkRRect_Type'>Enum SkRRect::Type</a>

<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
    enum <a href='#SkRRect_Type'>Type</a> {
        <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>,
        <a href='#SkRRect_kRect_Type'>kRect Type</a>,
        <a href='#SkRRect_kOval_Type'>kOval Type</a>,
        <a href='#SkRRect_kSimple_Type'>kSimple Type</a>,
        <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a>,
        <a href='#SkRRect_kComplex_Type'>kComplex Type</a>,
        <a href='#SkRRect_kLastType'>kLastType</a> = <a href='#SkRRect_kComplex_Type'>kComplex Type</a>,
    };
</pre>

<a href='#SkRRect_Type'>Type</a> describes possible specializations of <a href='#RRect'>Round Rect</a>. Each <a href='#SkRRect_Type'>Type</a> is
exclusive; a <a href='#RRect'>Round Rect</a> may only have one type.

The enum members become progressively less restrictive; larger values of
<a href='#SkRRect_Type'>Type</a> have more degrees of freedom than smaller values.

### Constants

<table style='border-collapse: collapse; width: 62.5em'>
  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Const</th>
<th style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>Value</th>
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kEmpty_Type'><code>SkRRect::kEmpty_Type</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # zero width or height ##</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
<a href='#RRect'>Round Rect</a> has zero width or height. All radii are zero.
</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kRect_Type'><code>SkRRect::kRect_Type</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # non-zero width and height, and zeroed radii ##</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
<a href='#RRect'>Round Rect</a> has width and height. All radii are zero.
</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kOval_Type'><code>SkRRect::kOval_Type</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # non-zero width and height filled with radii ##</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
<a href='#RRect'>Round Rect</a> has width and height. All four x-radii are equal,
and at least half the width. All four y-radii are equal,
and at least half the height.
</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kSimple_Type'><code>SkRRect::kSimple_Type</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # non-zero width and height with equal radii ##</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
<a href='#RRect'>Round Rect</a> has width and height. All four x-radii are equal and
greater than zero, and all four y-radii are equal and greater than
zero. Either x-radii are less than half the width, or y-radii is
less than half the height, or both.
</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kNinePatch_Type'><code>SkRRect::kNinePatch_Type</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # non-zero width and height with axis-aligned radii ##</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
<a href='#RRect'>Round Rect</a> has width and height. Left x-radii are equal, top
y-radii are equal, right x-radii are equal, and bottom y-radii
are equal. The radii do not describe a rect, oval, or simple type.

The centers of the corner ellipses form an axis-aligned rectangle
that divides the <a href='#RRect'>Round Rect</a> into nine rectangular patches; an
interior rectangle, four edges, and four corners.
</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kComplex_Type'><code>SkRRect::kComplex_Type</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # non-zero width and height with arbitrary radii ##</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
both radii are non-zero.
</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kLastType'><code>SkRRect::kLastType</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>= kComplex_Type</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
largest Type value</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="38a559936ea7c8d482098c189ee5c9b8"></fiddle-embed></div>

### See Also

<a href='SkRect_Reference#Rect'>Rect</a> <a href='SkPath_Reference#Path'>Path</a>

<a name='SkRRect_getType'></a>
## getType

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='#SkRRect_Type'>Type</a> <a href='#SkRRect_getType'>getType</a>() const
</pre>

Returns <a href='#SkRRect_Type'>Type</a>, one of: <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>, <a href='#SkRRect_kRect_Type'>kRect Type</a>, <a href='#SkRRect_kOval_Type'>kOval Type</a>, <a href='#SkRRect_kSimple_Type'>kSimple Type</a>, <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a>,
<a href='#SkRRect_kComplex_Type'>kComplex Type</a>.

### Return Value

<a href='#SkRRect_Type'>Type</a>

### Example

<div><fiddle-embed name="53634cc0794c0fa6c0c2b3ac4cc69490"><div>rrect2 is not a <a href='SkRect_Reference#Rect'>Rect</a>; <a href='#SkRRect_inset'>inset</a> has made it empty.
</div></fiddle-embed></div>

### See Also

<a href='#SkRRect_Type'>Type</a> <a href='#SkRRect_type'>type</a>

---

<a name='SkRRect_type'></a>
## type

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='#SkRRect_Type'>Type</a> <a href='#SkRRect_type'>type</a>() const
</pre>

Returns <a href='#SkRRect_Type'>Type</a>, one of: <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>, <a href='#SkRRect_kRect_Type'>kRect Type</a>, <a href='#SkRRect_kOval_Type'>kOval Type</a>, <a href='#SkRRect_kSimple_Type'>kSimple Type</a>, <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a>,
<a href='#SkRRect_kComplex_Type'>kComplex Type</a>.

### Return Value

<a href='#SkRRect_Type'>Type</a>

### Example

<div><fiddle-embed name="02b03d651c4b5d18018c6f75fa88b8ce"><div><a href='#SkRRect_inset'>inset</a> has made rrect2 empty.
</div></fiddle-embed></div>

### See Also

<a href='#SkRRect_Type'>Type</a> <a href='#SkRRect_getType'>getType</a>

---

<a name='SkRRect_isEmpty'></a>
## isEmpty

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
inline bool <a href='#SkRRect_isEmpty'>isEmpty</a>() const
</pre>

Returns true if <a href='#SkRRect_rect'>rect</a>.fLeft is equal to <a href='#SkRRect_rect'>rect</a>.fRight, or if <a href='#SkRRect_rect'>rect</a>.fTop is equal
to <a href='#SkRRect_rect'>rect</a>.fBottom.

### Return Value

true if <a href='#SkRRect_width'>width</a> or <a href='#SkRRect_height'>height</a> are zero

### Example

<div><fiddle-embed name="3afe4ea247923e06326aeb2b165c7485"></fiddle-embed></div>

### See Also

<a href='SkRect_Reference#SkRect_isEmpty'>SkRect::isEmpty</a> <a href='#SkRRect_height'>height</a> <a href='#SkRRect_width'>width</a>

---

<a name='SkRRect_isRect'></a>
## isRect

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
inline bool <a href='#SkRRect_isRect'>isRect</a>() const
</pre>

Returns true if not empty, and if either x or y radius at each corner is zero.

### Return Value

true if not empty, and one radius at each corner is zero

### Example

<div><fiddle-embed name="e2dcdad0e9cb7ba3e78a9871e9229753"></fiddle-embed></div>

### See Also

<a href='#SkRRect_isEmpty'>isEmpty</a> <a href='#SkRRect_radii'>radii</a>

---

<a name='SkRRect_isOval'></a>
## isOval

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
inline bool <a href='#SkRRect_isOval'>isOval</a>() const
</pre>

Returns true if not empty, if all x-axis radii are equal, if all y-axis radii
are equal, x-axis radii are at least half the width, and y-axis radii are at
least half the height.

### Return Value

true if has identical geometry to <a href='undocumented#Oval'>Oval</a>

### Example

<div><fiddle-embed name="6ac569e40fb68c758319e85428b9ae95"><div>The first radii are scaled down proportionately until both x-axis and y-axis fit
within the bounds. After scaling, x-axis radius is smaller than half the width;
left round rect is not an oval. The second radii are equal to half the
dimensions; right round rect is an oval.
</div></fiddle-embed></div>

### See Also

<a href='#SkRRect_isEmpty'>isEmpty</a> <a href='#SkRRect_isSimple'>isSimple</a> <a href='SkCanvas_Reference#SkCanvas_drawOval'>SkCanvas::drawOval</a>

---

<a name='SkRRect_isSimple'></a>
## isSimple

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
inline bool <a href='#SkRRect_isSimple'>isSimple</a>() const
</pre>

Returns true if not empty, if all x-axis radii are equal but not zero,
if all y-axis radii are equal but not zero; and x-axis radius is less than half
<a href='#SkRRect_width'>width</a>, or y-axis radius is less than half <a href='#SkRRect_height'>height</a>.

### Return Value

true if not empty, rect or oval; and axes radii are equal

### Example

<div><fiddle-embed name="65bbb109483ed79edb32027cf71851eb"></fiddle-embed></div>

### See Also

<a href='#SkRRect_isEmpty'>isEmpty</a> <a href='#SkRRect_isRect'>isRect</a> <a href='#SkRRect_isOval'>isOval</a> <a href='#SkRRect_isNinePatch'>isNinePatch</a>

---

<a name='SkRRect_isNinePatch'></a>
## isNinePatch

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
inline bool <a href='#SkRRect_isNinePatch'>isNinePatch</a>() const
</pre>

Returns true if <a href='#SkRRect_isEmpty'>isEmpty</a>, <a href='#SkRRect_isRect'>isRect</a>, <a href='#SkRRect_isOval'>isOval</a>, and <a href='#SkRRect_isSimple'>isSimple</a> return false; and if
left x-axis radii are equal, right x-axis radii are equal, top y-axis radii are
equal, and bottom y-axis radii are equal.

### Return Value

true if not empty, rect, oval or simple; and radii are axis-aligned

### Example

<div><fiddle-embed name="568cb730e66d0df09a7d9bd9d6142c9e"></fiddle-embed></div>

### See Also

<a href='#SkRRect_isEmpty'>isEmpty</a> <a href='#SkRRect_isRect'>isRect</a> <a href='#SkRRect_isOval'>isOval</a> <a href='#SkRRect_isSimple'>isSimple</a> <a href='#SkRRect_isComplex'>isComplex</a>

---

<a name='SkRRect_isComplex'></a>
## isComplex

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
inline bool <a href='#SkRRect_isComplex'>isComplex</a>() const
</pre>

Returns true if <a href='#SkRRect_isEmpty'>isEmpty</a>, <a href='#SkRRect_isRect'>isRect</a>, <a href='#SkRRect_isOval'>isOval</a>, <a href='#SkRRect_isSimple'>isSimple</a>, and <a href='#SkRRect_isNinePatch'>isNinePatch</a> return false.
If true: width and height are greater than zero, at least one corner radii are
both greater than zero; left x-axis radii are not equal, or right x-axis radii
are not equal, or top y-axis radii are not equal, or bottom y-axis radii are not
equal.

### Return Value

true if not empty, rect, oval, simple, or nine-patch

### Example

<div><fiddle-embed name="75db3f4e4757478bca641bccf89b9398"></fiddle-embed></div>

### See Also

<a href='#SkRRect_isEmpty'>isEmpty</a> <a href='#SkRRect_isRect'>isRect</a> <a href='#SkRRect_isOval'>isOval</a> <a href='#SkRRect_isSimple'>isSimple</a> <a href='#SkRRect_isNinePatch'>isNinePatch</a>

---

<a name='SkRRect_width'></a>
## width

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkRRect_width'>width</a>() const
</pre>

Returns span on the x-axis. This does not check if result fits in 32-bit float;
result may be infinity.

### Return Value

bounds().fRight minus bounds().fLeft

### Example

<div><fiddle-embed name="c675a480b41dee157f84fa2550a2a53c"><div><a href='#SkRRect_MakeRect'>SkRRect::MakeRect</a> sorts its input, so <a href='#SkRRect_width'>width</a> is always zero or larger.
</div>

#### Example Output

~~~~
unsorted width: 5
large width: inf
~~~~

</fiddle-embed></div>

### See Also

<a href='SkRect_Reference#SkRect_width'>SkRect::width</a> <a href='#SkRRect_height'>height</a> <a href='#SkRRect_getBounds'>getBounds</a>

---

<a name='SkRRect_height'></a>
## height

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkRRect_height'>height</a>() const
</pre>

Returns span on the y-axis. This does not check if result fits in 32-bit float;
result may be infinity.

### Return Value

bounds().fBottom minus bounds().fTop

### Example

<div><fiddle-embed name="5a3eb1755164a7becec33cec6e6eca31"><div><a href='#SkRRect_MakeRect'>SkRRect::MakeRect</a> sorts its input, so <a href='#SkRRect_height'>height</a> is always zero or larger.
</div>

#### Example Output

~~~~
unsorted height: 5
large height: inf
~~~~

</fiddle-embed></div>

### See Also

<a href='SkRect_Reference#SkRect'>SkRect</a>.<a href='#SkRRect_height'>height</a> <a href='#SkRRect_width'>width</a> <a href='#SkRRect_getBounds'>getBounds</a>

---

<a name='SkRRect_getSimpleRadii'></a>
## getSimpleRadii

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='SkPoint_Reference#SkVector'>SkVector</a> <a href='#SkRRect_getSimpleRadii'>getSimpleRadii</a>() const
</pre>

Returns top-left corner x-radii. If <a href='#SkRRect_type'>type</a> returns <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>, <a href='#SkRRect_kRect_Type'>kRect Type</a>,
<a href='#SkRRect_kOval_Type'>kOval Type</a>, or <a href='#SkRRect_kSimple_Type'>kSimple Type</a>, returns a value representative of all corner radii.
If <a href='#SkRRect_type'>type</a> returns <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a> or <a href='#SkRRect_kComplex_Type'>kComplex Type</a>, at least one of the
remaining three corners has a different value.

### Return Value

corner radii for simple types

### Example

<div><fiddle-embed name="f0e02101ecbdb5a2963ec82e7832afb1"></fiddle-embed></div>

### See Also

<a href='#SkRRect_radii'>radii</a> <a href='#SkRRect_getBounds'>getBounds</a> <a href='#SkRRect_getType'>getType</a> <a href='#SkRRect_isSimple'>isSimple</a>

---

<a name='SkRRect_setEmpty'></a>
## setEmpty

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_setEmpty'>setEmpty</a>()
</pre>

Sets bounds to zero width and height at (0, 0), the origin. Sets
corner radii to zero and sets type to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.

### Example

<div><fiddle-embed name="59c1025b8116ec1d3b55f4f6306d1e37"><div>Nothing blue is drawn because rrect is set to empty.
</div></fiddle-embed></div>

### See Also

<a href='#SkRRect_MakeEmpty'>MakeEmpty</a> <a href='#SkRRect_setRect'>setRect</a>

---

<a name='SkRRect_setRect'></a>
## setRect

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_setRect'>setRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& rect)
</pre>

Sets bounds to sorted rect, and sets corner radii to zero.
If set bounds has width and height, and sets type to <a href='#SkRRect_kRect_Type'>kRect Type</a>;
otherwise, sets type to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.

### Parameters

<table>  <tr>    <td><a name='SkRRect_setRect_rect'><code><strong>rect</strong></code></a></td>
    <td>bounds to set</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="3afc3ac9bebd1d7387822cc608571e82"></fiddle-embed></div>

### See Also

<a href='#SkRRect_MakeRect'>MakeRect</a> <a href='#SkRRect_setRectXY'>setRectXY</a>

---

<a name='SkRRect_MakeEmpty'></a>
## MakeEmpty

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
static <a href='#SkRRect'>SkRRect</a> <a href='#SkRRect_MakeEmpty'>MakeEmpty</a>()
</pre>

Initializes bounds at (0, 0), the origin, with zero width and height.
Initializes corner radii to (0, 0), and sets type of <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.

### Return Value

empty <a href='#RRect'>Round Rect</a>

### Example

<div><fiddle-embed name="c6c6be3b3c137226adbb5b5af9203d27"></fiddle-embed></div>

### See Also

<a href='#SkRRect_empty_constructor'>SkRRect()</a> <a href='SkRect_Reference#SkRect_MakeEmpty'>SkRect::MakeEmpty</a>

---

<a name='SkRRect_MakeRect'></a>
## MakeRect

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
static <a href='#SkRRect'>SkRRect</a> <a href='#SkRRect_MakeRect'>MakeRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& r)
</pre>

Initializes to copy of <a href='#SkRRect_MakeRect_r'>r</a> bounds and zeroes corner radii.

### Parameters

<table>  <tr>    <td><a name='SkRRect_MakeRect_r'><code><strong>r</strong></code></a></td>
    <td>bounds to copy</td>
  </tr>
</table>

### Return Value

copy of <a href='#SkRRect_MakeRect_r'>r</a>

### Example

<div><fiddle-embed name="5295b07fe4d2cdcd077979a9e19854d9"></fiddle-embed></div>

### See Also

<a href='#SkRRect_setRect'>setRect</a> <a href='#SkRRect_MakeOval'>MakeOval</a> <a href='#SkRRect_MakeRectXY'>MakeRectXY</a>

---

<a name='SkRRect_MakeOval'></a>
## MakeOval

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
static <a href='#SkRRect'>SkRRect</a> <a href='#SkRRect_MakeOval'>MakeOval</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& oval)
</pre>

Sets bounds to <a href='#SkRRect_MakeOval_oval'>oval</a>, x-axis radii to half <a href='#SkRRect_MakeOval_oval'>oval</a>.<a href='#SkRRect_width'>width</a>, and all y-axis radii
to half <a href='#SkRRect_MakeOval_oval'>oval</a>.<a href='#SkRRect_height'>height</a>. If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
Otherwise, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.

### Parameters

<table>  <tr>    <td><a name='SkRRect_MakeOval_oval'><code><strong>oval</strong></code></a></td>
    <td>bounds of <a href='undocumented#Oval'>Oval</a></td>
  </tr>
</table>

### Return Value

<a href='undocumented#Oval'>Oval</a>

### Example

<div><fiddle-embed name="0b99ee38fd154f769f6031242e02fa7a"></fiddle-embed></div>

### See Also

<a href='#SkRRect_setOval'>setOval</a> <a href='#SkRRect_MakeRect'>MakeRect</a> <a href='#SkRRect_MakeRectXY'>MakeRectXY</a>

---

<a name='SkRRect_MakeRectXY'></a>
## MakeRectXY

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
static <a href='#SkRRect'>SkRRect</a> <a href='#SkRRect_MakeRectXY'>MakeRectXY</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& rect, <a href='undocumented#SkScalar'>SkScalar</a> xRad, <a href='undocumented#SkScalar'>SkScalar</a> yRad)
</pre>

Sets to rounded rectangle with the same radii for all four corners.
If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
Otherwise, if <a href='#SkRRect_MakeRectXY_xRad'>xRad</a> and <a href='#SkRRect_MakeRectXY_yRad'>yRad</a> are zero, sets to <a href='#SkRRect_kRect_Type'>kRect Type</a>.
Otherwise, if <a href='#SkRRect_MakeRectXY_xRad'>xRad</a> is at least half rect.<a href='#SkRRect_width'>width</a> and <a href='#SkRRect_MakeRectXY_yRad'>yRad</a> is at least half
rect.<a href='#SkRRect_height'>height</a>, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.
Otherwise, sets to <a href='#SkRRect_kSimple_Type'>kSimple Type</a>.

### Parameters

<table>  <tr>    <td><a name='SkRRect_MakeRectXY_rect'><code><strong>rect</strong></code></a></td>
    <td>bounds of rounded rectangle</td>
  </tr>
  <tr>    <td><a name='SkRRect_MakeRectXY_xRad'><code><strong>xRad</strong></code></a></td>
    <td>x-axis radius of corners</td>
  </tr>
  <tr>    <td><a name='SkRRect_MakeRectXY_yRad'><code><strong>yRad</strong></code></a></td>
    <td>y-axis radius of corners</td>
  </tr>
</table>

### Return Value

rounded rectangle

### Example

<div><fiddle-embed name="2b24a1247637cbc94f8b3c77d37ed3e2"></fiddle-embed></div>

### See Also

<a href='#SkRRect_setRectXY'>setRectXY</a>

---

<a name='SkRRect_setOval'></a>
## setOval

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_setOval'>setOval</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& oval)
</pre>

Sets bounds to <a href='#SkRRect_setOval_oval'>oval</a>, x-axis radii to half <a href='#SkRRect_setOval_oval'>oval</a>.<a href='#SkRRect_width'>width</a>, and all y-axis radii
to half <a href='#SkRRect_setOval_oval'>oval</a>.<a href='#SkRRect_height'>height</a>. If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
Otherwise, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.

### Parameters

<table>  <tr>    <td><a name='SkRRect_setOval_oval'><code><strong>oval</strong></code></a></td>
    <td>bounds of <a href='undocumented#Oval'>Oval</a></td>
  </tr>
</table>

### Example

<div><fiddle-embed name="cf418af29cbab6243ac16aacd1217ffe"></fiddle-embed></div>

### See Also

<a href='#SkRRect_MakeOval'>MakeOval</a>

---

<a name='SkRRect_setRectXY'></a>
## setRectXY

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_setRectXY'>setRectXY</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& rect, <a href='undocumented#SkScalar'>SkScalar</a> xRad, <a href='undocumented#SkScalar'>SkScalar</a> yRad)
</pre>

Sets to rounded rectangle with the same radii for all four corners.
If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
Otherwise, if <a href='#SkRRect_setRectXY_xRad'>xRad</a> or <a href='#SkRRect_setRectXY_yRad'>yRad</a> is zero, sets to <a href='#SkRRect_kRect_Type'>kRect Type</a>.
Otherwise, if <a href='#SkRRect_setRectXY_xRad'>xRad</a> is at least half rect.<a href='#SkRRect_width'>width</a> and <a href='#SkRRect_setRectXY_yRad'>yRad</a> is at least half
rect.<a href='#SkRRect_height'>height</a>, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.
Otherwise, sets to <a href='#SkRRect_kSimple_Type'>kSimple Type</a>.

### Parameters

<table>  <tr>    <td><a name='SkRRect_setRectXY_rect'><code><strong>rect</strong></code></a></td>
    <td>bounds of rounded rectangle</td>
  </tr>
  <tr>    <td><a name='SkRRect_setRectXY_xRad'><code><strong>xRad</strong></code></a></td>
    <td>x-axis radius of corners</td>
  </tr>
  <tr>    <td><a name='SkRRect_setRectXY_yRad'><code><strong>yRad</strong></code></a></td>
    <td>y-axis radius of corners</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="a7958a4e0668f5cf805a8e78eb57f51d"></fiddle-embed></div>

### See Also

<a href='#SkRRect_MakeRectXY'>MakeRectXY</a> <a href='SkPath_Reference#SkPath_addRoundRect'>SkPath::addRoundRect</a><sup><a href='SkPath_Reference#SkPath_addRoundRect_2'>[2]</a></sup>

---

<a name='SkRRect_setNinePatch'></a>
## setNinePatch

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_setNinePatch'>setNinePatch</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& rect, <a href='undocumented#SkScalar'>SkScalar</a> leftRad, <a href='undocumented#SkScalar'>SkScalar</a> topRad, <a href='undocumented#SkScalar'>SkScalar</a> rightRad,
                  <a href='undocumented#SkScalar'>SkScalar</a> bottomRad)
</pre>

Sets bounds to rect. Sets radii to (<a href='#SkRRect_setNinePatch_leftRad'>leftRad</a>, <a href='#SkRRect_setNinePatch_topRad'>topRad</a>), (<a href='#SkRRect_setNinePatch_rightRad'>rightRad</a>, <a href='#SkRRect_setNinePatch_topRad'>topRad</a>),
(<a href='#SkRRect_setNinePatch_rightRad'>rightRad</a>, <a href='#SkRRect_setNinePatch_bottomRad'>bottomRad</a>), (<a href='#SkRRect_setNinePatch_leftRad'>leftRad</a>, <a href='#SkRRect_setNinePatch_bottomRad'>bottomRad</a>).

If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
Otherwise, if <a href='#SkRRect_setNinePatch_leftRad'>leftRad</a> and <a href='#SkRRect_setNinePatch_rightRad'>rightRad</a> are zero, sets to <a href='#SkRRect_kRect_Type'>kRect Type</a>.
Otherwise, if <a href='#SkRRect_setNinePatch_topRad'>topRad</a> and <a href='#SkRRect_setNinePatch_bottomRad'>bottomRad</a> are zero, sets to <a href='#SkRRect_kRect_Type'>kRect Type</a>.
Otherwise, if <a href='#SkRRect_setNinePatch_leftRad'>leftRad</a> and <a href='#SkRRect_setNinePatch_rightRad'>rightRad</a> are equal and at least half rect.<a href='#SkRRect_width'>width</a>, and
<a href='#SkRRect_setNinePatch_topRad'>topRad</a> and <a href='#SkRRect_setNinePatch_bottomRad'>bottomRad</a> are equal at least half rect.<a href='#SkRRect_height'>height</a>, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.
Otherwise, if <a href='#SkRRect_setNinePatch_leftRad'>leftRad</a> and <a href='#SkRRect_setNinePatch_rightRad'>rightRad</a> are equal, and <a href='#SkRRect_setNinePatch_topRad'>topRad</a> and <a href='#SkRRect_setNinePatch_bottomRad'>bottomRad</a> are equal,
sets to <a href='#SkRRect_kSimple_Type'>kSimple Type</a>. Otherwise, sets to <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a>.

Nine patch refers to the nine parts defined by the radii: one center rectangle,
four edge patches, and four corner patches.

### Parameters

<table>  <tr>    <td><a name='SkRRect_setNinePatch_rect'><code><strong>rect</strong></code></a></td>
    <td>bounds of rounded rectangle</td>
  </tr>
  <tr>    <td><a name='SkRRect_setNinePatch_leftRad'><code><strong>leftRad</strong></code></a></td>
    <td>left-top and left-bottom x-axis radius</td>
  </tr>
  <tr>    <td><a name='SkRRect_setNinePatch_topRad'><code><strong>topRad</strong></code></a></td>
    <td>left-top and right-top y-axis radius</td>
  </tr>
  <tr>    <td><a name='SkRRect_setNinePatch_rightRad'><code><strong>rightRad</strong></code></a></td>
    <td>right-top and right-bottom x-axis radius</td>
  </tr>
  <tr>    <td><a name='SkRRect_setNinePatch_bottomRad'><code><strong>bottomRad</strong></code></a></td>
    <td>left-bottom and right-bottom y-axis radius</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="c4620df2eaba447b581688d3100053b1"></fiddle-embed></div>

### See Also

<a href='#SkRRect_setRectRadii'>setRectRadii</a>

---

<a name='SkRRect_setRectRadii'></a>
## setRectRadii

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_setRectRadii'>setRectRadii</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& rect, const <a href='SkPoint_Reference#SkVector'>SkVector</a> radii[4])
</pre>

Sets bounds to rect. Sets radii array for individual control of all for corners.

If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
Otherwise, if one of each corner radii are zero, sets to <a href='#SkRRect_kRect_Type'>kRect Type</a>.
Otherwise, if all x-axis radii are equal and at least half rect.<a href='#SkRRect_width'>width</a>, and
all y-axis radii are equal at least half rect.<a href='#SkRRect_height'>height</a>, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.
Otherwise, if all x-axis radii are equal, and all y-axis radii are equal,
sets to <a href='#SkRRect_kSimple_Type'>kSimple Type</a>. Otherwise, sets to <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a>.

### Parameters

<table>  <tr>    <td><a name='SkRRect_setRectRadii_rect'><code><strong>rect</strong></code></a></td>
    <td>bounds of rounded rectangle</td>
  </tr>
  <tr>    <td><a name='SkRRect_setRectRadii_radii'><code><strong>radii</strong></code></a></td>
    <td>corner x-axis and y-axis radii</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="4589dd49da291f8cd414db96c12851c7"></fiddle-embed></div>

### See Also

<a href='#SkRRect_setNinePatch'>setNinePatch</a> <a href='SkPath_Reference#SkPath_addRoundRect'>SkPath::addRoundRect</a><sup><a href='SkPath_Reference#SkPath_addRoundRect_2'>[2]</a></sup>

---

## <a name='SkRRect_Corner'>Enum SkRRect::Corner</a>

<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
    enum <a href='#SkRRect_Corner'>Corner</a> {
        <a href='#SkRRect_kUpperLeft_Corner'>kUpperLeft Corner</a>,
        <a href='#SkRRect_kUpperRight_Corner'>kUpperRight Corner</a>,
        <a href='#SkRRect_kLowerRight_Corner'>kLowerRight Corner</a>,
        <a href='#SkRRect_kLowerLeft_Corner'>kLowerLeft Corner</a>,
    };
</pre>

The radii are stored: top-left, top-right, bottom-right, bottom-left.

### Constants

<table style='border-collapse: collapse; width: 62.5em'>
  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Const</th>
<th style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>Value</th>
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kUpperLeft_Corner'><code>SkRRect::kUpperLeft_Corner</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>0</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
index of top-left corner radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kUpperRight_Corner'><code>SkRRect::kUpperRight_Corner</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>1</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
index of top-right corner radii</td>
  </tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kLowerRight_Corner'><code>SkRRect::kLowerRight_Corner</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>2</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
index of bottom-right corner radii</td>
  </tr>
  <tr>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kLowerLeft_Corner'><code>SkRRect::kLowerLeft_Corner</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>3</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
index of bottom-left corner radii</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="9205393f30b156e1507e88aa27f1dd91"></fiddle-embed></div>

### See Also

<a href='#SkRRect_radii'>radii</a>

<a name='SkRRect_rect'></a>
## rect

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='#SkRRect_rect'>rect</a>() const
</pre>

Returns bounds. Bounds may have zero width or zero height. Bounds right is
greater than or equal to left; bounds bottom is greater than or equal to top.
Result is identical to <a href='#SkRRect_getBounds'>getBounds</a>.

### Return Value

bounding box

### Example

<div><fiddle-embed name="6831adf4c536047f4709c686feb10c48">

#### Example Output

~~~~
left bounds: (nan) 0
left bounds: (inf) 0
left bounds: (100) 60
left bounds: (50) 50
left bounds: (25) 25
~~~~

</fiddle-embed></div>

### See Also

<a href='#SkRRect_getBounds'>getBounds</a>

---

<a name='SkRRect_radii'></a>
## radii

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='SkPoint_Reference#SkVector'>SkVector</a> <a href='#SkRRect_radii'>radii</a>(<a href='#SkRRect_Corner'>Corner</a> corner) const
</pre>

Returns <a href='undocumented#Scalar'>Scalar</a> pair for radius of curve on x-axis and y-axis for one <a href='#SkRRect_radii_corner'>corner</a>.
Both radii may be zero. If not zero, both are positive and finite.

### Parameters

<table>  <tr>    <td><a name='SkRRect_radii_corner'><code><strong>corner</strong></code></a></td>
    <td>one of: <a href='#SkRRect_kUpperLeft_Corner'>kUpperLeft Corner</a>, <a href='#SkRRect_kUpperRight_Corner'>kUpperRight Corner</a>,
<a href='#SkRRect_kLowerRight_Corner'>kLowerRight Corner</a>, <a href='#SkRRect_kLowerLeft_Corner'>kLowerLeft Corner</a></td>
  </tr>
</table>

### Return Value

x-axis and y-axis radii for one <a href='#SkRRect_radii_corner'>corner</a>

### Example

<div><fiddle-embed name="8d5c88478528584913867ada423e0d59"><div>Finite values are scaled proportionately to fit; other values are set to zero.
Scaled values cannot be larger than 25, half the bounding rect width.
Small scaled values are halved to scale in proportion to the y-axis <a href='#SkRRect_radii_corner'>corner</a>
radius, which is twice the bounds height.
</div>

#### Example Output

~~~~
left corner: (nan) 0
left corner: (inf) 0
left corner: (100) 25
left corner: (50) 25
left corner: (25) 12.5
~~~~

</fiddle-embed></div>

### See Also

<a href='#SkRRect_Corner'>Corner</a>

---

<a name='SkRRect_getBounds'></a>
## getBounds

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='#SkRRect_getBounds'>getBounds</a>() const
</pre>

Returns bounds. Bounds may have zero width or zero height. Bounds right is
greater than or equal to left; bounds bottom is greater than or equal to top.
Result is identical to <a href='#SkRRect_rect'>rect</a>.

### Return Value

bounding box

### Example

<div><fiddle-embed name="a7958a4e0668f5cf805a8e78eb57f51d"></fiddle-embed></div>

### See Also

<a href='#SkRRect_rect'>rect</a>

---

<a name='SkRRect_equal_operator'></a>
## operator==

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
bool <a href='#SkRRect_equal_operator'>operator==(const SkRRect& a, const SkRRect& b)</a>
</pre>

Returns true if bounds and radii in <a href='#SkRRect_equal_operator_a'>a</a> are equal to bounds and radii in <a href='#SkRRect_equal_operator_b'>b</a>.

<a href='#SkRRect_equal_operator_a'>a</a> and <a href='#SkRRect_equal_operator_b'>b</a> are not equal if either contain NaN. <a href='#SkRRect_equal_operator_a'>a</a> and <a href='#SkRRect_equal_operator_b'>b</a> are equal if members
contain zeroes width different signs.

### Parameters

<table>  <tr>    <td><a name='SkRRect_equal_operator_a'><code><strong>a</strong></code></a></td>
    <td><a href='SkRect_Reference#Rect'>Rect</a> bounds and radii to compare</td>
  </tr>
  <tr>    <td><a name='SkRRect_equal_operator_b'><code><strong>b</strong></code></a></td>
    <td><a href='SkRect_Reference#Rect'>Rect</a> bounds and radii to compare</td>
  </tr>
</table>

### Return Value

true if members are equal

### Example

<div><fiddle-embed name="df181af37f1d2b06f0f45af73df7b47d"></fiddle-embed></div>

### See Also

<a href='#SkRRect_notequal_operator'>operator!=(const SkRRect& a, const SkRRect& b)</a>

---

<a name='SkRRect_notequal_operator'></a>
## operator!=

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
bool <a href='#SkRRect_notequal_operator'>operator!=(const SkRRect& a, const SkRRect& b)</a>
</pre>

Returns true if bounds and radii in <a href='#SkRRect_notequal_operator_a'>a</a> are not equal to bounds and radii in <a href='#SkRRect_notequal_operator_b'>b</a>.

<a href='#SkRRect_notequal_operator_a'>a</a> and <a href='#SkRRect_notequal_operator_b'>b</a> are not equal if either contain NaN. <a href='#SkRRect_notequal_operator_a'>a</a> and <a href='#SkRRect_notequal_operator_b'>b</a> are equal if members
contain zeroes width different signs.

### Parameters

<table>  <tr>    <td><a name='SkRRect_notequal_operator_a'><code><strong>a</strong></code></a></td>
    <td><a href='SkRect_Reference#Rect'>Rect</a> bounds and radii to compare</td>
  </tr>
  <tr>    <td><a name='SkRRect_notequal_operator_b'><code><strong>b</strong></code></a></td>
    <td><a href='SkRect_Reference#Rect'>Rect</a> bounds and radii to compare</td>
  </tr>
</table>

### Return Value

true if members are not equal

### Example

<div><fiddle-embed name="505e47b3e6474ebdecdc04c3c2af2c34"></fiddle-embed></div>

### See Also

<a href='#SkRRect_equal_operator'>operator==(const SkRRect& a, const SkRRect& b)</a>

---

<a name='SkRRect_inset'></a>
## inset

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_inset'>inset</a>(<a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy, <a href='#SkRRect'>SkRRect</a>* dst) const
</pre>

Calls inset on the bounds, and adjust the radii to reflect what happens.
If the corner is sharp (no curvature), leave it alone,
otherwise we grow/shrink the radii by the amount of the inset. If a
given radius becomes negative, it is pinned to 0.
If the inset amount is larger than the width/height then the rrect collapses to
a degenerate line or point.
If the inset is sufficiently negative to cause the bounds to become infinite then
the result is a default initialized rrect.
It is valid for <a href='#SkRRect_inset_dst'>dst</a> == this.

### Parameters

<table>  <tr>    <td><a name='SkRRect_inset_dx'><code><strong>dx</strong></code></a></td>
    <td>added to <a href='#SkRRect_rect'>rect</a>.fLeft, and subtracted from <a href='#SkRRect_rect'>rect</a>.fRight</td>
  </tr>
  <tr>    <td><a name='SkRRect_inset_dy'><code><strong>dy</strong></code></a></td>
    <td>added to <a href='#SkRRect_rect'>rect</a>.fTop, and subtracted from <a href='#SkRRect_rect'>rect</a>.fBottom</td>
  </tr>
  <tr>    <td><a name='SkRRect_inset_dst'><code><strong>dst</strong></code></a></td>
    <td>insets bounds and radii</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="f02f0110d5605dac6d14dcb8d1d8cb6e"></fiddle-embed></div>

### See Also

<a href='#SkRRect_outset'>outset</a><sup><a href='#SkRRect_outset_2'>[2]</a></sup> <a href='#SkRRect_offset'>offset</a> <a href='#SkRRect_makeOffset'>makeOffset</a>

---

<a name='SkRRect_inset_2'></a>

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_inset'>inset</a>(<a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy)
</pre>

### Parameters

<table>  <tr>    <td><a name='SkRRect_inset_2_dx'><code><strong>dx</strong></code></a></td>
    <td>added to <a href='#SkRRect_rect'>rect</a>.fLeft, and subtracted from <a href='#SkRRect_rect'>rect</a>.fRight</td>
  </tr>
  <tr>    <td><a name='SkRRect_inset_2_dy'><code><strong>dy</strong></code></a></td>
    <td>added to <a href='#SkRRect_rect'>rect</a>.fTop, and subtracted from <a href='#SkRRect_rect'>rect</a>.fBottom</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="da61054322550a2d5ac15114da23bd23"></fiddle-embed></div>

### See Also

<a href='#SkRRect_outset'>outset</a><sup><a href='#SkRRect_outset_2'>[2]</a></sup> <a href='#SkRRect_offset'>offset</a> <a href='#SkRRect_makeOffset'>makeOffset</a>

---

<a name='SkRRect_outset'></a>
## outset

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_outset'>outset</a>(<a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy, <a href='#SkRRect'>SkRRect</a>* dst) const
</pre>

Call outset on the bounds, and adjust the radii to reflect what happens
in stroking. If the corner is sharp (no curvature), leave it alone,
otherwise we grow/shrink the radii by the amount of the inset. If a
given radius becomes negative, it is pinned to 0.
It is valid for <a href='#SkRRect_outset_dst'>dst</a> == this.

### Parameters

<table>  <tr>    <td><a name='SkRRect_outset_dx'><code><strong>dx</strong></code></a></td>
    <td>subtracted from <a href='#SkRRect_rect'>rect</a>.fLeft, and added to <a href='#SkRRect_rect'>rect</a>.fRight</td>
  </tr>
  <tr>    <td><a name='SkRRect_outset_dy'><code><strong>dy</strong></code></a></td>
    <td>subtracted from <a href='#SkRRect_rect'>rect</a>.fTop, and added to <a href='#SkRRect_rect'>rect</a>.fBottom</td>
  </tr>
  <tr>    <td><a name='SkRRect_outset_dst'><code><strong>dst</strong></code></a></td>
    <td>outset bounds and radii</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="4d69b6d9c7726c47c42827d79fc7899c"></fiddle-embed></div>

### See Also

<a href='#SkRRect_inset'>inset</a><sup><a href='#SkRRect_inset_2'>[2]</a></sup> <a href='#SkRRect_offset'>offset</a> <a href='#SkRRect_makeOffset'>makeOffset</a>

---

<a name='SkRRect_outset_2'></a>

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_outset'>outset</a>(<a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy)
</pre>

### Parameters

<table>  <tr>    <td><a name='SkRRect_outset_2_dx'><code><strong>dx</strong></code></a></td>
    <td>subtracted from <a href='#SkRRect_rect'>rect</a>.fLeft, and added to <a href='#SkRRect_rect'>rect</a>.fRight</td>
  </tr>
  <tr>    <td><a name='SkRRect_outset_2_dy'><code><strong>dy</strong></code></a></td>
    <td>subtracted from <a href='#SkRRect_rect'>rect</a>.fTop, and added to <a href='#SkRRect_rect'>rect</a>.fBottom</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="4391cced86653dcd0f84439a5c0bb3f2"></fiddle-embed></div>

### See Also

<a href='#SkRRect_inset'>inset</a><sup><a href='#SkRRect_inset_2'>[2]</a></sup> <a href='#SkRRect_offset'>offset</a> <a href='#SkRRect_makeOffset'>makeOffset</a>

---

<a name='SkRRect_offset'></a>
## offset

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_offset'>offset</a>(<a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy)
</pre>

Translates the rrect by (<a href='#SkRRect_offset_dx'>dx</a>, <a href='#SkRRect_offset_dy'>dy</a>).

### Parameters

<table>  <tr>    <td><a name='SkRRect_offset_dx'><code><strong>dx</strong></code></a></td>
    <td>offset added to <a href='#SkRRect_rect'>rect</a>.fLeft and <a href='#SkRRect_rect'>rect</a>.fRight</td>
  </tr>
  <tr>    <td><a name='SkRRect_offset_dy'><code><strong>dy</strong></code></a></td>
    <td>offset added to <a href='#SkRRect_rect'>rect</a>.fTop and <a href='#SkRRect_rect'>rect</a>.fBottom</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="a45cdd46ef2fe0df62d84d41713e82e2"></fiddle-embed></div>

### See Also

<a href='#SkRRect_makeOffset'>makeOffset</a> <a href='#SkRRect_inset'>inset</a><sup><a href='#SkRRect_inset_2'>[2]</a></sup> <a href='#SkRRect_outset'>outset</a><sup><a href='#SkRRect_outset_2'>[2]</a></sup>

---

<a name='SkRRect_makeOffset'></a>
## makeOffset

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='#SkRRect'>SkRRect</a> SK_WARN_UNUSED_RESULT <a href='#SkRRect_makeOffset'>makeOffset</a>(<a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy) const
</pre>

### Parameters

<table>  <tr>    <td><a name='SkRRect_makeOffset_dx'><code><strong>dx</strong></code></a></td>
    <td>offset added to <a href='#SkRRect_rect'>rect</a>.fLeft and <a href='#SkRRect_rect'>rect</a>.fRight</td>
  </tr>
  <tr>    <td><a name='SkRRect_makeOffset_dy'><code><strong>dy</strong></code></a></td>
    <td>offset added to <a href='#SkRRect_rect'>rect</a>.fTop and <a href='#SkRRect_rect'>rect</a>.fBottom</td>
  </tr>
</table>

### Return Value

<a href='#RRect'>Round Rect</a> bounds offset by (<a href='#SkRRect_makeOffset_dx'>dx</a>, <a href='#SkRRect_makeOffset_dy'>dy</a>), with unchanged corner radii

### Example

<div><fiddle-embed name="c433aa41eaf5e419e3349fb970a08151"></fiddle-embed></div>

### See Also

<a href='#SkRRect_offset'>offset</a> <a href='#SkRRect_inset'>inset</a><sup><a href='#SkRRect_inset_2'>[2]</a></sup> <a href='#SkRRect_outset'>outset</a><sup><a href='#SkRRect_outset_2'>[2]</a></sup>

---

<a name='SkRRect_contains'></a>
## contains

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
bool <a href='#SkRRect_contains'>contains</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& rect) const
</pre>

Returns true if rect is inside the bounds and corner radii, and if
<a href='#RRect'>Round Rect</a> and rect are not empty.

### Parameters

<table>  <tr>    <td><a name='SkRRect_contains_rect'><code><strong>rect</strong></code></a></td>
    <td>area tested for containment</td>
  </tr>
</table>

### Return Value

true if <a href='#RRect'>Round Rect</a> contains rect

### Example

<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>

### See Also

<a href='SkRect_Reference#SkRect_contains'>SkRect::contains</a><sup><a href='SkRect_Reference#SkRect_contains_2'>[2]</a></sup><sup><a href='SkRect_Reference#SkRect_contains_3'>[3]</a></sup>

---

<a name='SkRRect_isValid'></a>
## isValid

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
bool <a href='#SkRRect_isValid'>isValid</a>() const
</pre>

### Return Value

incomplete

### Example

<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>

### See Also

incomplete

---

### Constants

<table style='border-collapse: collapse; width: 62.5em'>
  <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Const</th>
<th style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>Value</th>
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
  <tr style='background-color: #f0f0f0; '>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kSizeInMemory'><code>SkRRect::kSizeInMemory</code></a></td>
    <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>48</td>
    <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>


### Example

<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>incomplete

</td>
  </tr>
</table>

<a name='SkRRect_writeToMemory'></a>
## writeToMemory

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
size_t <a href='#SkRRect_writeToMemory'>writeToMemory</a>(void* buffer) const
</pre>

Write the rrect into the specified <a href='#SkRRect_writeToMemory_buffer'>buffer</a>. This is guaranteed to always
write <a href='#SkRRect_kSizeInMemory'>kSizeInMemory</a> bytes, and that value is guaranteed to always be
a multiple of 4. Return <a href='#SkRRect_kSizeInMemory'>kSizeInMemory</a>.

### Parameters

<table>  <tr>    <td><a name='SkRRect_writeToMemory_buffer'><code><strong>buffer</strong></code></a></td>
    <td>incomplete</td>
  </tr>
</table>

### Return Value

incomplete

### Example

<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>

### See Also

incomplete

---

<a name='SkRRect_readFromMemory'></a>
## readFromMemory

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
size_t <a href='#SkRRect_readFromMemory'>readFromMemory</a>(const void* buffer, size_t length)
</pre>

Reads the rrect from the specified <a href='#SkRRect_readFromMemory_buffer'>buffer</a>.
If the specified <a href='#SkRRect_readFromMemory_buffer'>buffer</a> is large enough, this will read <a href='#SkRRect_kSizeInMemory'>kSizeInMemory</a> bytes,
and that value is guaranteed to always be a multiple of 4.

### Parameters

<table>  <tr>    <td><a name='SkRRect_readFromMemory_buffer'><code><strong>buffer</strong></code></a></td>
    <td>memory to read from</td>
  </tr>
  <tr>    <td><a name='SkRRect_readFromMemory_length'><code><strong>length</strong></code></a></td>
    <td>amount of memory available in the <a href='#SkRRect_readFromMemory_buffer'>buffer</a></td>
  </tr>
</table>

### Return Value

number of bytes read (must be a multiple of 4) or
0 if there was not enough memory available

### Example

<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>

### See Also

incomplete

---

<a name='SkRRect_transform'></a>
## transform

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
bool <a href='#SkRRect_transform'>transform</a>(const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>& matrix, <a href='#SkRRect'>SkRRect</a>* dst) const
</pre>

Transforms by <a href='#RRect'>Round Rect</a> by <a href='#SkRRect_transform_matrix'>matrix</a>, storing result in <a href='#SkRRect_transform_dst'>dst</a>.
Returns true if <a href='#RRect'>Round Rect</a> transformed can be represented by another <a href='#RRect'>Round Rect</a>.
Returns false if <a href='#SkRRect_transform_matrix'>matrix</a> contains transformations other than scale and translate.

Asserts in debug builds if <a href='#RRect'>Round Rect</a> equals <a href='#SkRRect_transform_dst'>dst</a>.

### Parameters

<table>  <tr>    <td><a name='SkRRect_transform_matrix'><code><strong>matrix</strong></code></a></td>
    <td><a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a> specifying the transform</td>
  </tr>
  <tr>    <td><a name='SkRRect_transform_dst'><code><strong>dst</strong></code></a></td>
    <td><a href='#SkRRect'>SkRRect</a> to store the result</td>
  </tr>
</table>

### Return Value

true if transformation succeeded.

### Example

<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>

### See Also

incomplete

---

<a name='SkRRect_dump'></a>
## dump

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_dump'>dump</a>(bool asHex) const
</pre>

Writes text representation of <a href='#RRect'>Round Rect</a> to standard output.
Set <a href='#SkRRect_dump_asHex'>asHex</a> true to generate exact binary representations
of floating point numbers.

### Parameters

<table>  <tr>    <td><a name='SkRRect_dump_asHex'><code><strong>asHex</strong></code></a></td>
    <td>true if <a href='undocumented#SkScalar'>SkScalar</a> values are written as hexadecimal</td>
  </tr>
</table>

### Example

<div><fiddle-embed name="265b8d23288dc8026ff788e809360af7">

#### Example Output

~~~~
SkRect::MakeLTRB(0.857143f, 0.666667f, 0.857143f, 0.666667f);
const SkPoint corners[] = {
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
};
SkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */
SkBits2Float(0x3f2aaaab), /* 0.666667 */
SkBits2Float(0x3f5b6db7), /* 0.857143 */
SkBits2Float(0x3f2aaaab)  /* 0.666667 */);
const SkPoint corners[] = {
{ SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
{ SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
{ SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
{ SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
};
~~~~

</fiddle-embed></div>

### See Also

<a href='#SkRRect_dumpHex'>dumpHex</a> <a href='SkRect_Reference#SkRect_dump'>SkRect::dump</a><sup><a href='SkRect_Reference#SkRect_dump_2'>[2]</a></sup> <a href='SkPath_Reference#SkPath_dump'>SkPath::dump</a><sup><a href='SkPath_Reference#SkPath_dump_2'>[2]</a></sup> <a href='undocumented#SkPathMeasure_dump'>SkPathMeasure::dump</a>

---

<a name='SkRRect_dump_2'></a>

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_dump'>dump</a>() const
</pre>

Writes text representation of <a href='#RRect'>Round Rect</a> to standard output. The representation
may be directly compiled as C++ code. Floating point values are written
with limited precision; it may not be possible to reconstruct original
<a href='#RRect'>Round Rect</a> from output.

### Example

<div><fiddle-embed name="f850423c7c0c4f803d479ecd92221059">

#### Example Output

~~~~
SkRect::MakeLTRB(0.857143f, 0.666667f, 0.857143f, 0.666667f);
const SkPoint corners[] = {
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
};
rrect is not equal to copy
~~~~

</fiddle-embed></div>

### See Also

<a href='#SkRRect_dumpHex'>dumpHex</a> <a href='SkRect_Reference#SkRect_dump'>SkRect::dump</a><sup><a href='SkRect_Reference#SkRect_dump_2'>[2]</a></sup> <a href='SkPath_Reference#SkPath_dump'>SkPath::dump</a><sup><a href='SkPath_Reference#SkPath_dump_2'>[2]</a></sup> <a href='undocumented#SkPathMeasure_dump'>SkPathMeasure::dump</a>

---

<a name='SkRRect_dumpHex'></a>
## dumpHex

<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
void <a href='#SkRRect_dumpHex'>dumpHex</a>() const
</pre>

Writes text representation of <a href='#RRect'>Round Rect</a> to standard output. The representation
may be directly compiled as C++ code. Floating point values are written
in hexadecimal to preserve their exact bit pattern. The output reconstructs the
original <a href='#RRect'>Round Rect</a>.

### Example

<div><fiddle-embed name="c73f5e2644d949b859f05bd367883454">

#### Example Output

~~~~
SkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */
SkBits2Float(0x3f2aaaab), /* 0.666667 */
SkBits2Float(0x3f5b6db7), /* 0.857143 */
SkBits2Float(0x3f2aaaab)  /* 0.666667 */);
const SkPoint corners[] = {
{ SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
{ SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
{ SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
{ SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
};
rrect is equal to copy
~~~~

</fiddle-embed></div>

### See Also

<a href='#SkRRect_dump'>dump</a><sup><a href='#SkRRect_dump_2'>[2]</a></sup> <a href='SkRect_Reference#SkRect_dumpHex'>SkRect::dumpHex</a> <a href='SkPath_Reference#SkPath_dumpHex'>SkPath::dumpHex</a>

---