Skip to main content

SampledFunction Class

A sampled function (PDF Type 0 function) that computes output values from a table of sample values.

Declaration

public class SampledFunction extends CustomFunction

Remarks

PDF documents use sampled functions in operations such as color transformations, gradients, and shading patterns.

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject
CustomFunction
SampledFunction

SampledFunction(int[] size, int bitsPerSample, long[] samples)

Initializes a new instance of the SampledFunction class with the specified sample table.

Declaration

public SampledFunction(int[] size, int bitsPerSample, long[] samples)

Parameters

Name Type Description
size int[]

The number of sample values in each input dimension.

bitsPerSample int

The number of bits used to represent each sample value.

samples long[]

The sample values that define the function.

Methods

getBitsPerSample() Method

Returns the number of bits used to represent each sample value.

Declaration

public int getBitsPerSample()

Returns

Type Description
int

The number of bits per sample.

getDecode() Method

Returns ranges that map sampled values to output values.

Declaration

public Range[] getDecode()

Returns

Type Description
Range[]

An array of Range objects.

getEncode() Method

Returns ranges that map input values to the sample table.

Declaration

public Range[] getEncode()

Returns

Type Description
Range[]

An array of Range objects.

getSamples() Method

Returns sample values that define the function.

Declaration

public long[] getSamples()

Returns

Type Description
long[]

An array of sample values.

getSize() Method

Returns the number of sample values in each input dimension.

Declaration

public int[] getSize()

Returns

Type Description
int[]

An array of integers that specifies the sample table dimensions.

setBitsPerSample(int value) Method

Sets the number of bits used to represent each sample value.

Declaration

public void setBitsPerSample(int value)

Parameters

Name Type Description
value int

The number of bits per sample.

setDecode(Range[] value) Method

Sets ranges that map sampled values to output values.

Declaration

public void setDecode(Range[] value)

Parameters

Name Type Description
value Range[]

An array of Range objects.

setEncode(Range[] value) Method

Sets ranges that map input values to the sample table.

Declaration

public void setEncode(Range[] value)

Parameters

Name Type Description
value Range[]

An array of Range objects.

setSamples(long[] value) Method

Sets sample values that define the function.

Declaration

public void setSamples(long[] value)

Parameters

Name Type Description
value long[]

An array of sample values.

setSize(int[] value) Method

Sets the number of sample values in each input dimension.

Declaration

public void setSize(int[] value)

Parameters

Name Type Description
value int[]

An array of integers that specifies the sample table dimensions.