From: Brendan Dahl Date: Thu, 10 Nov 2011 22:23:58 +0000 (-0800) Subject: Add comments, fix default color. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=74004b23bba4daa4955476559abcf3a44acb54e3;p=pdf.js.git Add comments, fix default color. --- diff --git a/src/colorspace.js b/src/colorspace.js index 953bd1c..b369d0f 100644 --- a/src/colorspace.js +++ b/src/colorspace.js @@ -158,11 +158,19 @@ var ColorSpace = (function colorSpaceColorSpace() { return constructor; })(); +/** + * Alternate color space handles both Separation and DeviceN color spaces. A + * Separation color space is actually just a DeviceN with one color component. + * Both color spaces use a tinting function to convert colors to a base color + * space. + */ var AlternateCS = (function alternateCS() { function constructor(numComps, base, tintFn) { this.name = 'Alternate'; this.numComps = numComps; - this.defaultColor = [1]; + this.defaultColor = []; + for (var i = 0; i < numComps; ++i) + this.defaultColor.push(1); this.base = base; this.tintFn = tintFn; }