From 1007e279c6b86b85803304f41b506434ce588988 Mon Sep 17 00:00:00 2001 From: sbarman Date: Thu, 7 Jul 2011 11:01:14 -0700 Subject: [PATCH] added comments --- pdf.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pdf.js b/pdf.js index 3829df975..c2760b546 100644 --- a/pdf.js +++ b/pdf.js @@ -4520,10 +4520,24 @@ var CanvasGraphics = (function() { })(); var ColorSpace = (function() { + // Constructor should define this.numComps, this.defaultColor, this.name function constructor() { error('should not call ColorSpace constructor'); }; + constructor.prototype = { + // Input: array of size numComps representing color component values + // Output: array of rgb values, each value ranging from [0.1] + getRgb: function cs_getRgb(color) { + error('Should not call ColorSpace.getRgb'); + }, + // Input: Uint8Array of component values, each value scaled to [0,255] + // Output: Uint8Array of rgb values, each value scaled to [0,255] + getRgbBuffer: function cs_getRgbBuffer(input) { + error('Should not call ColorSpace.getRgbBuffer'); + } + }; + constructor.parse = function colorspace_parse(cs, xref, res) { if (IsName(cs)) { var colorSpaces = res.get('ColorSpace');