From 74004b23bba4daa4955476559abcf3a44acb54e3 Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Thu, 10 Nov 2011 14:23:58 -0800 Subject: [PATCH] Add comments, fix default color. --- src/colorspace.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/colorspace.js b/src/colorspace.js index 953bd1c2e..b369d0f88 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; }