示例#1
0
 /**
  * This will set the list of alternate color spaces. This should be a list of PDColorSpace
  * objects.
  *
  * @param list The list of colorspace objects.
  */
 public void setAlternateColorSpaces(List list) {
   COSArray altArray = null;
   if (list != null) {
     altArray = COSArrayList.converterToCOSArray(list);
   }
   stream.setItem(COSName.getPDFName("Alternate"), altArray);
 }
示例#2
0
 private COSArray getRangeArray(int n) {
   COSArray rangeArray = (COSArray) stream.getDictionaryObject(COSName.getPDFName("Range"));
   if (rangeArray == null) {
     rangeArray = new COSArray();
     stream.setItem(COSName.getPDFName("Range"), rangeArray);
     while (rangeArray.size() < n * 2) {
       rangeArray.add(new COSFloat(-100));
       rangeArray.add(new COSFloat(100));
     }
   }
   return rangeArray;
 }
示例#3
0
 /**
  * This will set the metadata stream that is associated with this color space.
  *
  * @param metadata The new metadata stream.
  */
 public void setMetadata(COSStream metadata) {
   stream.setItem(COSName.getPDFName("Metadata"), metadata);
 }
示例#4
0
 /**
  * This will set the number of color components.
  *
  * @param n The number of color components.
  */
 public void setNumberOfComponents(int n) {
   stream.setItem(COSName.getPDFName("N"), new COSInteger(n));
 }