/** * Get the encode for the input parameter. * * @param n The function parameter number. * * @return The encode parameter range or null if none is set. */ private PDRange getEncodeForParameter(int n) { COSArray encodeValues = getEncode(); return new PDRange( encodeValues, n ); }
/** * This will get the range for a certain output parameters. This is will never * return null. If it is not present then the range 0 to 0 will * be returned. * * @param n The output parameter number to get the range for. * * @return The range for this component. */ public PDRange getRangeForOutput(int n) { COSArray rangeValues = getRangeValues(); return new PDRange( rangeValues, n ); }
/** * This will get the range for a certain input parameter. This is will never * return null. If it is not present then the range 0 to 0 will * be returned. * * @param n The parameter number to get the domain for. * * @return The domain range for this component. */ public PDRange getDomainForInput(int n) { COSArray domainValues = getDomainValues(); return new PDRange( domainValues, n ); }
/** * This will get the valid range for the "b" component. * If none is found then the default will be returned, which is -100..100. * @return the "b" range. */ public PDRange getBRange() { COSArray rangeArray = (COSArray) dictionary.getDictionaryObject(COSName.RANGE); if (rangeArray == null) { rangeArray = getDefaultRangeArray(); } return new PDRange(rangeArray, 1); }
/** * This will get the valid range for the "a" component. * If none is found then the default will be returned, which is -100..100. * @return the "a" range. */ public PDRange getARange() { COSArray rangeArray = (COSArray) dictionary.getDictionaryObject(COSName.RANGE); if (rangeArray == null) { rangeArray = getDefaultRangeArray(); } return new PDRange(rangeArray, 0); }
/** * Get the decode for the input parameter. * * @param paramNum the function parameter number * @return the decode parameter range or null if none is set */ public PDRange getDecodeForParameter(int paramNum) { PDRange retval = null; COSArray decodeValues = getDecodeValues(); if (decodeValues != null && decodeValues.size() >= paramNum * 2 + 1) { retval = new PDRange(decodeValues, paramNum); } return retval; }
/** * Returns the range for a certain component number. * This will never return null. * If it is not present then the range 0..1 will be returned. * @param n the component number to get the range for * @return the range for this component */ public PDRange getRangeForComponent(int n) { COSArray rangeArray = (COSArray) stream.getCOSObject().getDictionaryObject(COSName.RANGE); if (rangeArray == null || rangeArray.size() < getNumberOfComponents() * 2) { return new PDRange(); // 0..1 } return new PDRange(rangeArray, n); }
/** * Get the encode for the input parameter. * * @param paramNum The function parameter number. * * @return The encode parameter range or null if none is set. */ public PDRange getEncodeForParameter(int paramNum) { PDRange retval = null; COSArray encodeValues = getEncodeValues(); if (encodeValues != null && encodeValues.size() >= paramNum * 2 + 1) { retval = new PDRange(encodeValues, paramNum); } return retval; }
/** * Get the decode for the input parameter. * * @param paramNum The function parameter number. * * @return The decode parameter range or null if none is set. */ public PDRange getDecodeForParameter(int paramNum) { PDRange retval = null; COSArray decodeValues = getDecodeValues(); if (decodeValues != null && decodeValues.size() >= paramNum * 2 + 1) { retval = new PDRange(decodeValues, paramNum); } return retval; }
/** * This is guaranteed to never return null.<br> * * To quote the PDF Spec "An array of two numbers between 0.0 and 1.0 indicating the fraction of leftover space to * allocate at the left and bottom of the icon. A value of [0.0 0.0] positions the icon at the bottom-left corner of * the annotation rectangle; a value of [0.5 0.5] centers it within the rectangle. This entry is used only if the * icon is scaled proportionally. Default value: [0.5 0.5]." * * @return The fractional space to allocate. */ public PDRange getFractionalSpaceToAllocate() { PDRange retval = null; COSArray array = (COSArray) fit.getDictionaryObject(COSName.A); if (array == null) { retval = new PDRange(); retval.setMin(.5f); retval.setMax(.5f); setFractionalSpaceToAllocate(retval); } else { retval = new PDRange(array); } return retval; }
/** * Get the encode for the input parameter. * * @param n The function parameter number. * * @return The encode parameter range or null if none is set. */ private PDRange getEncodeForParameter(int n) { COSArray encodeValues = getEncode(); return new PDRange( encodeValues, n ); }
/** * Get the encode for the input parameter. * * @param n The function parameter number. * * @return The encode parameter range or null if none is set. */ private PDRange getEncodeForParameter(int n) { COSArray encodeValues = getEncode(); return new PDRange( encodeValues, n ); }
/** * This will get the range for a certain output parameters. This is will never * return null. If it is not present then the range 0 to 0 will * be returned. * * @param n The output parameter number to get the range for. * * @return The range for this component. */ public PDRange getRangeForOutput(int n) { COSArray rangeValues = getRangeValues(); return new PDRange( rangeValues, n ); }
/** * This will get the range for a certain input parameter. This is will never * return null. If it is not present then the range 0 to 0 will * be returned. * * @param n The parameter number to get the domain for. * * @return The domain range for this component. */ public PDRange getDomainForInput(int n) { COSArray domainValues = getDomainValues(); return new PDRange( domainValues, n ); }
/** * This will get the range for a certain output parameters. This is will never * return null. If it is not present then the range 0 to 0 will * be returned. * * @param n The output parameter number to get the range for. * * @return The range for this component. */ public PDRange getRangeForOutput(int n) { COSArray rangeValues = getRangeValues(); return new PDRange( rangeValues, n ); }
/** * This will get the range for a certain input parameter. This is will never * return null. If it is not present then the range 0 to 0 will * be returned. * * @param n The parameter number to get the domain for. * * @return The domain range for this component. */ public PDRange getDomainForInput(int n) { COSArray domainValues = getDomainValues(); return new PDRange( domainValues, n ); }
/** * This will get the valid range for the "b" component. * If none is found then the default will be returned, which is -100..100. * @return the "b" range. */ public PDRange getBRange() { COSArray rangeArray = (COSArray) dictionary.getDictionaryObject(COSName.RANGE); if (rangeArray == null) { rangeArray = getDefaultRangeArray(); } return new PDRange(rangeArray, 1); }
/** * This will get the valid range for the "a" component. * If none is found then the default will be returned, which is -100..100. * @return the "a" range. */ public PDRange getARange() { COSArray rangeArray = (COSArray) dictionary.getDictionaryObject(COSName.RANGE); if (rangeArray == null) { rangeArray = getDefaultRangeArray(); } return new PDRange(rangeArray, 0); }
/** * This will get the valid range for the "b" component. * If none is found then the default will be returned, which is -100..100. * @return the "b" range. */ public PDRange getBRange() { COSArray rangeArray = (COSArray) dictionary.getDictionaryObject(COSName.RANGE); if (rangeArray == null) { rangeArray = getDefaultRangeArray(); } return new PDRange(rangeArray, 1); }
/** * This will get the valid range for the "a" component. * If none is found then the default will be returned, which is -100..100. * @return the "a" range. */ public PDRange getARange() { COSArray rangeArray = (COSArray) dictionary.getDictionaryObject(COSName.RANGE); if (rangeArray == null) { rangeArray = getDefaultRangeArray(); } return new PDRange(rangeArray, 0); }