From: sbarman Date: Thu, 7 Jul 2011 18:01:14 +0000 (-0700) Subject: added comments X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=1007e279c6b86b85803304f41b506434ce588988;p=pdf.js.git added comments --- diff --git a/pdf.js b/pdf.js index 3829df9..c2760b5 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');