Java Doc for PDFFunction.java in  » PDF » PDF-Renderer » com » sun » pdfview » function » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » PDF Renderer » com.sun.pdfview.function 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.pdfview.function.PDFFunction

All known Subclasses:   com.sun.pdfview.function.FunctionType2,  com.sun.pdfview.function.FunctionType0,
PDFFunction
abstract public class PDFFunction (Code)

PDF Functions are defined in the reference as Section 3.9.

A PDF function maps some set of m inputs into some set of n outputs. There are 4 types of functions:

  • Type 0: Sampled functions. (PDF 1.2)
    A sampled function (type 0) uses a table of sample values to define the function. Various techniques are used to interpolate values between the sample values (see Section 3.9.1, “Type 0 (Sampled) Functions�).
  • Type 2: Exponential Interpolation. (PDF 1.3)
    An exponential interpolation function (type 2) defines a set of coefficients for an exponential function (see Section 3.9.2, “Type 2 (Exponential Interpolation) Functions�).
  • Type 3: Stitching functions. (PDF 1.3)
    A stitching function (type 3) is a combination of other functions, partitioned across a domain (see Section 3.9.3, “Type 3 (Stitching) Functions�).
  • Type 4: Postscript calculations. (PDF 1.3)
    A PostScript calculator function (type 4) uses operators from the PostScript language to describe an arithmetic expression (see Section 3.9.4, “Type 4 (PostScript Calculator) Functions�).

The function interface contains a single method, calculate which takes an array of m floats an interprets them into an array of n floats.

PDFFunctions do not have accessible constructors. Instead, use the static getFunction() method to read a functions from a PDF Object.



Field Summary
final public static  intTYPE_0
    
final public static  intTYPE_2
    
final public static  intTYPE_3
    
final public static  intTYPE_4
    

Constructor Summary
protected  PDFFunction(int type)
    

Method Summary
public  float[]calculate(float[] inputs)
     Map from m input values to n output values. The number of inputs m must be exactly one half the size of the domain.
public  float[]calculate(float[] inputs, int inputOffset, float[] outputs, int outputOffset)
     Map from m input values to n output values. The number of inputs m must be exactly one half the size of the domain.
abstract protected  voiddoFunction(float[] inputs, int inputOffset, float[] outputs, int outputOffset)
     Subclasses must implement this method to perform the actual function on the given set of data.
protected  floatgetDomain(int i)
    
public static  PDFFunctiongetFunction(PDFObject obj)
    
public  intgetNumInputs()
    
public  intgetNumOutputs()
    
protected  floatgetRange(int i)
    
public  intgetType()
    
abstract protected  voidparse(PDFObject obj)
    
protected  voidsetDomain(float[] domain)
    
protected  voidsetRange(float[] range)
    

Field Detail
TYPE_0
final public static int TYPE_0(Code)
The known function types



TYPE_2
final public static int TYPE_2(Code)



TYPE_3
final public static int TYPE_3(Code)



TYPE_4
final public static int TYPE_4(Code)




Constructor Detail
PDFFunction
protected PDFFunction(int type)(Code)
Creates a new instance of PDFFunction




Method Detail
calculate
public float[] calculate(float[] inputs)(Code)
Map from m input values to n output values. The number of inputs m must be exactly one half the size of the domain. The number of outputs should match one half the size of the range.
Parameters:
  inputs - an array of >= m input values the array of n output values



calculate
public float[] calculate(float[] inputs, int inputOffset, float[] outputs, int outputOffset)(Code)
Map from m input values to n output values. The number of inputs m must be exactly one half the size of the domain. The number of outputs should match one half the size of the range.
Parameters:
  inputs - an array of >= m input values
Parameters:
  inputOffset - the offset into the input array to read from
Parameters:
  outputs - an array of size >= n which will be filledwith the output values
Parameters:
  outputOffset - the offset into the output array to write to the array of n output values



doFunction
abstract protected void doFunction(float[] inputs, int inputOffset, float[] outputs, int outputOffset)(Code)
Subclasses must implement this method to perform the actual function on the given set of data. Note that the inputs are guaranteed to be clipped to the domain, while the outputs will be automatically clipped to the range after being returned from this function.
Parameters:
  inputs - guaranteed to be at least as big as getNumInputs() and all values within range
Parameters:
  inputOffset - the offset into the inputs array to read from
Parameters:
  outputs - guaranteed to be at least as big asgetNumOutputs(), but not yet clipped to domain
Parameters:
  outputOffset - the offset into the output array to write to



getDomain
protected float getDomain(int i)(Code)
Get a component of the domain of this function
Parameters:
  i - the index into the domain array, which has size 2 * m.the ith entry in the array has index 2i, 2i + 1 the ith entry in the domain array



getFunction
public static PDFFunction getFunction(PDFObject obj) throws IOException(Code)
Get a PDFFunction from a PDFObject



getNumInputs
public int getNumInputs()(Code)
Get the number of inputs, m, required by this function the number of input values expected by this function



getNumOutputs
public int getNumOutputs()(Code)
Get the number of outputs, n, returned by this function the number of output values this function will return



getRange
protected float getRange(int i)(Code)
Get a component of the range of this function
Parameters:
  i - the index into the range array, which has size 2 * n.the ith entry in the array has index 2i, 2i + 1 the ith entry in the range array



getType
public int getType()(Code)
Get the type of this function one of the types of function (0-4)



parse
abstract protected void parse(PDFObject obj) throws IOException(Code)
Read the function information from a PDF Object



setDomain
protected void setDomain(float[] domain)(Code)
Set the domain of this function



setRange
protected void setRange(float[] range)(Code)
Set the range of this function



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.