forked from parallax/jsPDF
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
83 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
var doc = new jsPDF(); | ||
|
||
doc.rect(20, 20, 10, 10); // empty square | ||
// Empty square | ||
doc.rect(20, 20, 10, 10); | ||
|
||
doc.rect(40, 20, 10, 10, 'F'); // filled square | ||
// Filled square | ||
doc.rect(40, 20, 10, 10, 'F'); | ||
|
||
// Empty red square | ||
doc.setDrawColor(255,0,0); | ||
doc.rect(60, 20, 10, 10); // empty red square | ||
doc.rect(60, 20, 10, 10); | ||
|
||
// Filled square with red borders | ||
doc.setDrawColor(255,0,0); | ||
doc.rect(80, 20, 10, 10, 'FD'); // filled square with red borders | ||
doc.rect(80, 20, 10, 10, 'FD'); | ||
|
||
// Filled red square | ||
doc.setDrawColor(0); | ||
doc.setFillColor(255,0,0); | ||
doc.rect(100, 20, 10, 10, 'F'); // filled red square | ||
doc.rect(100, 20, 10, 10, 'F'); | ||
|
||
// Filled red square with black borders | ||
doc.setDrawColor(0); | ||
doc.setFillColor(255,0,0); | ||
doc.rect(120, 20, 10, 10, 'FD'); // filled red square with black borders | ||
doc.rect(120, 20, 10, 10, 'FD'); | ||
|
||
// Black sqaure with rounded corners | ||
doc.setDrawColor(0); | ||
doc.setFillColor(255, 255, 255); | ||
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); // Black sqaure with rounded corners | ||
doc.roundedRect(140, 20, 10, 10, 3, 3, 'FD'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters