]> git.parisson.com Git - pdf.js.git/commitdiff
[Cleanup] Rename Raw to IR
authorJulian Viereck <julian.viereck@gmail.com>
Wed, 7 Sep 2011 23:09:49 +0000 (16:09 -0700)
committerJulian Viereck <julian.viereck@gmail.com>
Thu, 15 Sep 2011 15:24:30 +0000 (08:24 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index 3b3fa33231e615872e50a6798e27205004e7cc45..d8e37a7b2074c60ba267b7c5be0ac4961280c303 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4267,7 +4267,7 @@ var PartialEvaluator = (function() {
                   var shading = xref.fetchIfRef(dict.get('Shading'));
                   var matrix = dict.get('Matrix');
                   var pattern = Pattern.parseShading(shading, matrix, xref, res, null /*ctx*/);
-                  args = pattern.getPatternRaw();
+                  args = pattern.getIR();
                 } else {
                   error("Unkown PatternType " + typeNum);
                 }
@@ -4391,7 +4391,7 @@ var PartialEvaluator = (function() {
           // Parse the ColorSpace data to a raw format.
           case "setFillColorSpace":
           case "setStrokeColorSpace":
-            args = [ ColorSpace.parseRaw(args[0], xref, resources) ];
+            args = [ ColorSpace.parseToIR(args[0], xref, resources) ];
             break;
           case "shadingFill":
             var shadingRes = xref.fetchIfRef(res.get('Shading'));
@@ -4403,7 +4403,7 @@ var PartialEvaluator = (function() {
               error('No shading object found');
 
             var shadingFill = Pattern.parseShading(shading, null, xref, res, /* ctx */ null);
-            var patternIR = shadingFill.getPatternRaw();
+            var patternIR = shadingFill.getIR();
 
             args = [ patternIR ];
             fn = "shadingFill";
@@ -5284,13 +5284,11 @@ var CanvasGraphics = (function() {
     // Color
     setStrokeColorSpace: function(raw) {
       this.current.strokeColorSpace =
-            ColorSpace.fromRaw(raw);
-      //    ColorSpace.parse(space, this.xref, this.res);
+            ColorSpace.fromIR(raw);
     },
     setFillColorSpace: function(raw) {
       this.current.fillColorSpace =
-            ColorSpace.fromRaw(raw);
-      //    ColorSpace.parse(space, this.xref, this.res);
+            ColorSpace.fromIR(raw);
     },
     setStrokeColor: function(/*...*/) {
       var cs = this.current.strokeColorSpace;
@@ -5316,7 +5314,7 @@ var CanvasGraphics = (function() {
         // Build the pattern based on the IR data.
         var pattern = new TilingPatternIR(IR, color, this.ctx);
       } else if (IR[0] == "RadialAxialShading") {
-        var pattern = Pattern.shadingFromRaw(this.ctx, IR); 
+        var pattern = Pattern.shadingFromIR(this.ctx, IR); 
       } else {
         throw "Unkown IR type";
       }
@@ -5376,7 +5374,7 @@ var CanvasGraphics = (function() {
       var ctx = this.ctx;
       
       this.save();
-      ctx.fillStyle = Pattern.shadingFromRaw(ctx, patternIR);
+      ctx.fillStyle = Pattern.shadingFromIR(ctx, patternIR);
 
       var inv = ctx.mozCurrentTransformInverse;
       if (inv) {
@@ -5715,7 +5713,7 @@ var ColorSpace = (function() {
     return null;
   };
   
-  constructor.fromRaw = function(raw) {
+  constructor.fromIR = function(raw) {
     var name;
     if (IsArray(raw)) {
       name = raw[0];
@@ -5737,7 +5735,7 @@ var ColorSpace = (function() {
     }
   }
   
-  constructor.parseRaw = function colorspace_parse(cs, xref, res) {
+  constructor.parseToIR = function colorspace_parse(cs, xref, res) {
     if (IsName(cs)) {
       var colorSpaces = res.get('ColorSpace');
       if (IsDict(colorSpaces)) {
@@ -6089,10 +6087,10 @@ var Pattern = (function() {
     }
   };
 
-  constructor.shadingFromRaw = function(ctx, raw) {
+  constructor.shadingFromIR = function(ctx, raw) {
     var obj = window[raw[0]];
 
-    return obj.fromRaw(ctx, raw);
+    return obj.fromIR(ctx, raw);
   }
 
   constructor.parse = function pattern_parse(args, cs, xref, res, ctx) {
@@ -6222,7 +6220,7 @@ var RadialAxialShading = (function() {
     this.colorStops = colorStops;
   }
 
-  constructor.fromRaw = function(ctx, raw) {
+  constructor.fromIR = function(ctx, raw) {
     var type = raw[1];
     var colorStops = raw[2];
     var p0 = raw[3];
@@ -6301,7 +6299,7 @@ var RadialAxialShading = (function() {
       return grad;
     },
 
-    getPatternRaw: function() {
+    getIR: function() {
       var coordsArr = this.coordsArr;
       var type = this.shadingType;
       if (type == 2) {