Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.pdmodel.common.function
Class PDFunctionType0

    java.lang.Object
      org.pdfbox.pdmodel.common.function.PDFunction
          org.pdfbox.pdmodel.common.function.PDStreamFunction
              org.pdfbox.pdmodel.common.function.PDFunctionType0

All Implemented Interfaces:
  COSObjectable

public class PDFunctionType0
extends PDStreamFunction

This class represents a type 0 function in a PDF document.

Version:
  $Revision: 1.2 $
Author:
  Ben Litchfield

Constructor Summary
`protected` | `PDFunctionType0(PDDocument doc)` Constructor to create a new blank type 0 function.
`` | `PDFunctionType0(PDStream functionDictionary)` Constructor.

Method Summary
`int` | `getBitsPerSample()` Get the number of bits that the output value will take up.
`PDRange` | `getDecodeForParameter(int paramNum)` Get the decode for the input parameter.
`PDRange` | `getEncodeForParameter(int paramNum)` Get the encode for the input parameter.
`List` | `getNumberOfSamples()` The "Size" entry, which is the number of samples in each input dimension of the sample table.
`void` | `setBitsPerSample(int bps)` Set the number of bits that the output value will take up.
`void` | `setDecodeForParameter(int paramNum, PDRange range)` Set the decode range for the param number.
`void` | `setEncodeForParameter(int paramNum, PDRange range)` Set the encode range for the param number.
`void` | `setNumberOfSamples(List samples)` Set the samples data, the "Size" entry in the type 0 function.

Methods inherited from class org.pdfbox.pdmodel.common.function.PDStreamFunction
`getCOSObject, getCOSStream, getDomainForInput, getNumberOfInputParameters, getNumberOfOutputParameters, getRangeForOutput, setDomainForInput, setRangeForOutput`

Methods inherited from class org.pdfbox.pdmodel.common.function.PDFunction
`create`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PDFunctionType0

    protected PDFunctionType0(PDDocument doc)

  Constructor to create a new blank type 0 function.

Parameters:
  `doc` - The document that the function will be part of.

### PDFunctionType0

    public PDFunctionType0(PDStream functionDictionary)

  Constructor.

Parameters:
  `functionDictionary` - The prepopulated function dictionary.

Method Detail

### getNumberOfSamples

    public List getNumberOfSamples()

  The "Size" entry, which is the number of samples in each input dimension of the sample table.

  Returns:
    A List of java.lang.Integer objects.

### setNumberOfSamples

    public void setNumberOfSamples(List samples)

  Set the samples data, the "Size" entry in the type 0 function.

  Parameters:
    `samples` - The samples data.

### getBitsPerSample

    public int getBitsPerSample()

  Get the number of bits that the output value will take up. Valid values are 1,2,4,8,12,16,24,32.

  Returns:
    Number of bits for each output value.

### setBitsPerSample

    public void setBitsPerSample(int bps)

  Set the number of bits that the output value will take up. Valid values are 1,2,4,8,12,16,24,32.

  Parameters:
    `bps` - The number of bits for each output value.

### getEncodeForParameter

    public PDRange getEncodeForParameter(int paramNum)

  Get the encode for the input parameter.

  Parameters:
    `paramNum` - The function parameter number.
  Returns:
    The encode parameter range or null if none is set.

### setEncodeForParameter

    public void setEncodeForParameter(int paramNum,
                                      PDRange range)

  Set the encode range for the param number.

  Parameters:
    `paramNum` - The parameter number to set then encode values.
    `range` - The range value to set.

### getDecodeForParameter

    public PDRange getDecodeForParameter(int paramNum)

  Get the decode for the input parameter.

  Parameters:
    `paramNum` - The function parameter number.
  Returns:
    The decode parameter range or null if none is set.

### setDecodeForParameter

    public void setDecodeForParameter(int paramNum,
                                      PDRange range)

  Set the decode range for the param number.

  Parameters:
    `paramNum` - The parameter number to set then decode values.
    `range` - The range value to set.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD