Skip to content

Commit 092ce81

Browse files
committed
Add roundedRect to examples
1 parent eb9d056 commit 092ce81

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

examples/basic.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,11 @@ <h2><a href="#">Draw example: rectangles / squares</a></h2>
279279
doc.setDrawColor(0);
280280
doc.setFillColor(255,0,0);
281281
doc.rect(120, 20, 10, 10, 'FD'); // filled red square with black borders
282-
282+
283+
284+
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // filled red square with black borders and rounded corners
285+
286+
283287
doc.save('Test.pdf');</pre>
284288
<a href="javascript:demoRectangles()" class="button">Run Code</a></p></div>
285289

examples/js/basic.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ function demoRectangles() {
137137
doc.setDrawColor(0);
138138
doc.setFillColor(255,0,0);
139139
doc.rect(120, 20, 10, 10, 'FD'); // filled red square with black borders
140-
140+
141+
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // filled red square with black borders and rounded corners
142+
141143
doc.save('Test.pdf');
142144
}
143145

0 commit comments

Comments
 (0)