From 27b5b411cd520f757764fcdf0bfa7694c5bf46ec Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Fri, 11 Jul 2014 17:46:00 +0000 Subject: Tightened access control to Function's fields git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP-2393_gradient-rendering@1609756 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/render/shading/Function.java | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/java/org/apache/fop/render') diff --git a/src/java/org/apache/fop/render/shading/Function.java b/src/java/org/apache/fop/render/shading/Function.java index cc9b2d0f7..2f12c581d 100644 --- a/src/java/org/apache/fop/render/shading/Function.java +++ b/src/java/org/apache/fop/render/shading/Function.java @@ -25,17 +25,17 @@ public class Function { /** * Required: The Type of function (0,2,3,4) default is 0. */ - protected int functionType = 0; // Default + private int functionType; /** * Required: 2 * m Array of Double numbers which are possible inputs to the function */ - protected List domain = null; + private List domain; /** * Required: 2 * n Array of Double numbers which are possible outputs to the function */ - protected List range = null; + private List range; /* ********************TYPE 0***************************** */ // FunctionType 0 specific function guts @@ -45,19 +45,19 @@ public class Function { * Note: This is really more like two seperate integers, sizeDomain, and sizeRange, * but since they're expressed as an array in PDF, my implementation reflects that. */ - protected List size = null; + protected List size; /** * Required for Type 0: Number of Bits used to represent each sample value. * Limited to 1,2,4,8,12,16,24, or 32 */ - protected int bitsPerSample = 1; + private int bitsPerSample = 1; /** * Optional for Type 0: order of interpolation between samples. * Limited to linear (1) or cubic (3). Default is 1 */ - protected int order = 1; + private int order = 1; /** * Optional for Type 0: A 2 * m array of Doubles which provides a @@ -69,13 +69,13 @@ public class Function { * Should be two values per function, usually (0,1), * as in [0 1 0 1] for 2 functions. */ - protected List encode = null; + private List encode; /** * Optional for Type 0: A 2 * n array of Doubles which provides * a linear mapping of sample values to the range. Defaults to Range. */ - protected List decode = null; + private List decode; /** * Optional For Type 0: A stream of sample values @@ -85,34 +85,34 @@ public class Function { * Required For Type 4: Postscript Calculator function * composed of arithmetic, boolean, and stack operators + boolean constants */ - protected StringBuffer functionDataStream = null; + private StringBuffer functionDataStream; /** * Required (possibly) For Type 0: A vector of Strings for the * various filters to be used to decode the stream. * These are how the string is compressed. Flate, LZW, etc. */ - protected List filter = null; + private List filter; /* *************************TYPE 2************************** */ /** * Required For Type 2: An Array of n Doubles defining * the function result when x=0. Default is [0]. */ - protected float[] cZero; + private float[] cZero; /** * Required For Type 2: An Array of n Doubles defining * the function result when x=1. Default is [1]. */ - protected float[] cOne; + private float[] cOne; /** * Required for Type 2: The interpolation exponent. * Each value x will return n results. * Must be greater than 0. */ - protected double interpolationExponentN = 1; + private double interpolationExponentN = 1; /* *************************TYPE 3************************** */ @@ -121,7 +121,7 @@ public class Function { * form an array of k single input functions making up * the stitching function. */ - protected List functions = null; + private List functions; /** * Optional for Type 3: An array of (k-1) Doubles that, @@ -134,7 +134,7 @@ public class Function { * This makes each function responsible for an equal amount of the stitching function. * It makes the gradient even. */ - protected List bounds = null; + private List bounds; /** * create an complete Function object of Type 2, an Exponential Interpolation function. -- cgit v1.2.3