Skip to content

Commit aa09611

Browse files
committed
Merge in Daniel Dotsenko's changes
2 parents 00bf48e + c3974c9 commit aa09611

12 files changed

Lines changed: 1104 additions & 797 deletions

dist/jspdf.amd.min.js

Lines changed: 41 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jspdf.min.js

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/files.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ <h2><a href="symbols/src/c__work_jsPDF_jspdf.js.html">c:\work\jsPDF\jspdf.js</a>
216216
</div>
217217
<div class="fineprint" style="clear:both">
218218

219-
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Tue Aug 21 2012 13:09:28 GMT-0700 (PDT)
219+
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Mon Oct 15 2012 22:41:49 GMT-0700 (PDT)
220220
</div>
221221
</body>
222222
</html>

doc/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ <h2><a href="symbols/PubSub.html">PubSub</a></h2>
228228
</div>
229229
<div class="fineprint" style="clear:both">
230230

231-
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Tue Aug 21 2012 13:09:28 GMT-0700 (PDT)
231+
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Mon Oct 15 2012 22:41:49 GMT-0700 (PDT)
232232
</div>
233233
</body>
234234
</html>

doc/symbols/FontObject.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ <h1 class="classTitle">
424424
<!-- ============================== footer ================================= -->
425425
<div class="fineprint" style="clear:both">
426426

427-
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Tue Aug 21 2012 13:09:28 GMT-0700 (PDT)
427+
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Oct 15 2012 22:41:49 GMT-0700 (PDT)
428428
</div>
429429
</body>
430430
</html>

doc/symbols/PubSub.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ <h1 class="classTitle">
482482
<!-- ============================== footer ================================= -->
483483
<div class="fineprint" style="clear:both">
484484

485-
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Tue Aug 21 2012 13:09:28 GMT-0700 (PDT)
485+
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Oct 15 2012 22:41:49 GMT-0700 (PDT)
486486
</div>
487487
</body>
488488
</html>

doc/symbols/_global_.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ <h1 class="classTitle">
333333
<!-- ============================== footer ================================= -->
334334
<div class="fineprint" style="clear:both">
335335

336-
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Tue Aug 21 2012 13:09:28 GMT-0700 (PDT)
336+
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Oct 15 2012 22:41:49 GMT-0700 (PDT)
337337
</div>
338338
</body>
339339
</html>

doc/symbols/jsPDF.html

Lines changed: 77 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ <h1 class="classTitle">
369369
<tr>
370370
<td class="attributes">&nbsp;</td>
371371
<td class="nameDescription">
372-
<div class="fixedFont"><b><a href="../symbols/jsPDF.html#setDrawColor">setDrawColor</a></b>(r, g, b)
372+
<div class="fixedFont"><b><a href="../symbols/jsPDF.html#setDrawColor">setDrawColor</a></b>(ch1, ch2, ch3, ch4)
373373
</div>
374374
<div class="description">Sets the stroke color for upcoming elements.</div>
375375
</td>
@@ -378,7 +378,7 @@ <h1 class="classTitle">
378378
<tr>
379379
<td class="attributes">&nbsp;</td>
380380
<td class="nameDescription">
381-
<div class="fixedFont"><b><a href="../symbols/jsPDF.html#setFillColor">setFillColor</a></b>(r, g, b)
381+
<div class="fixedFont"><b><a href="../symbols/jsPDF.html#setFillColor">setFillColor</a></b>(ch1, ch2, ch3, ch4)
382382
</div>
383383
<div class="description">Sets the fill color for upcoming elements.</div>
384384
</td>
@@ -1011,13 +1011,35 @@ <h1 class="classTitle">
10111011
<div class="fixedFont">
10121012

10131013
<span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
1014-
<b>setDrawColor</b>(r, g, b)
1014+
<b>setDrawColor</b>(ch1, ch2, ch3, ch4)
10151015

10161016
</div>
10171017
<div class="description">
10181018
Sets the stroke color for upcoming elements.
1019-
If only one, first argument is given,
1020-
treats the value as gray-scale color value.
1019+
1020+
Depending on the number of arguments given, Gray, RGB, or CMYK
1021+
color space is implied.
1022+
1023+
When only ch1 is given, "Gray" color space is implied and it
1024+
must be a value in the range from 0.00 (solid black) to to 1.00 (white)
1025+
if values are communicated as String types, or in range from 0 (black)
1026+
to 255 (white) if communicated as Number type.
1027+
The RGB-like 0-255 range is provided for backward compatibility.
1028+
1029+
When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
1030+
value must be in the range from 0.00 (minimum intensity) to to 1.00
1031+
(max intensity) if values are communicated as String types, or
1032+
from 0 (min intensity) to to 255 (max intensity) if values are communicated
1033+
as Number types.
1034+
The RGB-like 0-255 range is provided for backward compatibility.
1035+
1036+
When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
1037+
value must be a in the range from 0.00 (0% concentration) to to
1038+
1.00 (100% concentration)
1039+
1040+
Because JavaScript treats fixed point numbers badly (rounds to
1041+
floating point nearest to binary representation) it is highly advised to
1042+
communicate the fractional numbers as String types, not JavaScript Number type.
10211043

10221044

10231045
</div>
@@ -1029,22 +1051,28 @@ <h1 class="classTitle">
10291051
<dt class="heading">Parameters:</dt>
10301052

10311053
<dt>
1032-
<span class="light fixedFont">{Number}</span> <b>r</b>
1054+
<span class="light fixedFont">{Number|String}</span> <b>ch1</b>
10331055

10341056
</dt>
1035-
<dd>Red channel color value in range 0-255</dd>
1057+
<dd>Color channel value</dd>
10361058

10371059
<dt>
1038-
<span class="light fixedFont">{Number}</span> <b>g</b>
1060+
<span class="light fixedFont">{Number|String}</span> <b>ch2</b>
10391061

10401062
</dt>
1041-
<dd>Green channel color value in range 0-255</dd>
1063+
<dd>Color channel value</dd>
10421064

10431065
<dt>
1044-
<span class="light fixedFont">{Number}</span> <b>b</b>
1066+
<span class="light fixedFont">{Number|String}</span> <b>ch3</b>
10451067

10461068
</dt>
1047-
<dd>Blue channel color value in range 0-255</dd>
1069+
<dd>Color channel value</dd>
1070+
1071+
<dt>
1072+
<span class="light fixedFont">{Number|String}</span> <b>ch4</b>
1073+
1074+
</dt>
1075+
<dd>Color channel value</dd>
10481076

10491077
</dl>
10501078

@@ -1068,13 +1096,35 @@ <h1 class="classTitle">
10681096
<div class="fixedFont">
10691097

10701098
<span class="light">{<a href="../symbols/jsPDF.html">jsPDF</a>}</span>
1071-
<b>setFillColor</b>(r, g, b)
1099+
<b>setFillColor</b>(ch1, ch2, ch3, ch4)
10721100

10731101
</div>
10741102
<div class="description">
10751103
Sets the fill color for upcoming elements.
1076-
If only one, first argument is given,
1077-
treats the value as gray-scale color value.
1104+
1105+
Depending on the number of arguments given, Gray, RGB, or CMYK
1106+
color space is implied.
1107+
1108+
When only ch1 is given, "Gray" color space is implied and it
1109+
must be a value in the range from 0.00 (solid black) to to 1.00 (white)
1110+
if values are communicated as String types, or in range from 0 (black)
1111+
to 255 (white) if communicated as Number type.
1112+
The RGB-like 0-255 range is provided for backward compatibility.
1113+
1114+
When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
1115+
value must be in the range from 0.00 (minimum intensity) to to 1.00
1116+
(max intensity) if values are communicated as String types, or
1117+
from 0 (min intensity) to to 255 (max intensity) if values are communicated
1118+
as Number types.
1119+
The RGB-like 0-255 range is provided for backward compatibility.
1120+
1121+
When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
1122+
value must be a in the range from 0.00 (0% concentration) to to
1123+
1.00 (100% concentration)
1124+
1125+
Because JavaScript treats fixed point numbers badly (rounds to
1126+
floating point nearest to binary representation) it is highly advised to
1127+
communicate the fractional numbers as String types, not JavaScript Number type.
10781128

10791129

10801130
</div>
@@ -1086,22 +1136,28 @@ <h1 class="classTitle">
10861136
<dt class="heading">Parameters:</dt>
10871137

10881138
<dt>
1089-
<span class="light fixedFont">{Number}</span> <b>r</b>
1139+
<span class="light fixedFont">{Number|String}</span> <b>ch1</b>
10901140

10911141
</dt>
1092-
<dd>Red channel color value in range 0-255</dd>
1142+
<dd>Color channel value</dd>
10931143

10941144
<dt>
1095-
<span class="light fixedFont">{Number}</span> <b>g</b>
1145+
<span class="light fixedFont">{Number|String}</span> <b>ch2</b>
10961146

10971147
</dt>
1098-
<dd>Green channel color value in range 0-255</dd>
1148+
<dd>Color channel value</dd>
10991149

11001150
<dt>
1101-
<span class="light fixedFont">{Number}</span> <b>b</b>
1151+
<span class="light fixedFont">{Number|String}</span> <b>ch3</b>
11021152

11031153
</dt>
1104-
<dd>Blue channel color value in range 0-255</dd>
1154+
<dd>Color channel value</dd>
1155+
1156+
<dt>
1157+
<span class="light fixedFont">{Number|String}</span> <b>ch4</b>
1158+
1159+
</dt>
1160+
<dd>Color channel value</dd>
11051161

11061162
</dl>
11071163

@@ -1642,7 +1698,7 @@ <h1 class="classTitle">
16421698
<!-- ============================== footer ================================= -->
16431699
<div class="fineprint" style="clear:both">
16441700

1645-
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Tue Aug 21 2012 13:09:28 GMT-0700 (PDT)
1701+
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Mon Oct 15 2012 22:41:49 GMT-0700 (PDT)
16461702
</div>
16471703
</body>
16481704
</html>

0 commit comments

Comments
 (0)