Java Doc for PSImageUtils.java in  » Graphic-Library » xmlgraphics-commons-1.2 » org » apache » xmlgraphics » ps » 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 » Graphic Library » xmlgraphics commons 1.2 » org.apache.xmlgraphics.ps 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xmlgraphics.ps.PSImageUtils

PSImageUtils
public class PSImageUtils (Code)
Utility code for rendering images in PostScript.




Method Summary
public static  int[]getRGB(RenderedImage img, int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)
     Extracts a packed RGB integer array of a RenderedImage.
public static  voidpaintForm(PSResource form, Rectangle2D targetRect, PSGenerator gen)
     Paints a reusable image (previously added as a PostScript form).
public static  voidpaintReusableImage(String formName, Rectangle2D targetRect, PSGenerator gen)
     Paints a reusable image (previously added as a PostScript form).
public static  voidrenderBitmapImage(RenderedImage img, float x, float y, float w, float h, PSGenerator gen)
     Renders a bitmap image to PostScript.
public static  voidrenderEPS(byte[] rawEPS, String name, float x, float y, float w, float h, float bboxx, float bboxy, float bboxw, float bboxh, PSGenerator gen)
     Places an EPS file in the PostScript stream.
public static  voidwriteImage(byte[] img, Dimension imgDim, String imgDescription, Rectangle2D targetRect, boolean isJPEG, ColorSpace colorSpace, PSGenerator gen)
     Writes a bitmap image to the PostScript stream.
public static  PSResourcewriteReusableImage(byte[] img, Dimension imgDim, String formName, String imageDescription, boolean isJPEG, ColorSpace colorSpace, PSGenerator gen)
     Writes a bitmap image as a PostScript form enclosed by DSC resource wrappers to the PostScript file.



Method Detail
getRGB
public static int[] getRGB(RenderedImage img, int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)(Code)
Extracts a packed RGB integer array of a RenderedImage.
Parameters:
  img - the image
Parameters:
  startX - the starting X coordinate
Parameters:
  startY - the starting Y coordinate
Parameters:
  w - the width of the cropped image
Parameters:
  h - the height of the cropped image
Parameters:
  rgbArray - the prepared integer array to write to
Parameters:
  offset - offset in the target array
Parameters:
  scansize - width of a row in the target array the populated integer array previously passed in as rgbArray parameter



paintForm
public static void paintForm(PSResource form, Rectangle2D targetRect, PSGenerator gen) throws IOException(Code)
Paints a reusable image (previously added as a PostScript form).
Parameters:
  form - the PostScript form resource implementing the image
Parameters:
  targetRect - the target rectangle to place the image in
Parameters:
  gen - the PostScript generator
throws:
  IOException - In case of an I/O exception



paintReusableImage
public static void paintReusableImage(String formName, Rectangle2D targetRect, PSGenerator gen) throws IOException(Code)
Paints a reusable image (previously added as a PostScript form).
Parameters:
  formName - the name of the PostScript form implementing the image
Parameters:
  targetRect - the target rectangle to place the image in
Parameters:
  gen - the PostScript generator
throws:
  IOException - In case of an I/O exception



renderBitmapImage
public static void renderBitmapImage(RenderedImage img, float x, float y, float w, float h, PSGenerator gen) throws IOException(Code)
Renders a bitmap image to PostScript.
Parameters:
  img - image to render
Parameters:
  x - x position
Parameters:
  y - y position
Parameters:
  w - width
Parameters:
  h - height
Parameters:
  gen - PS generator
throws:
  IOException - In case of an I/O problem while rendering the image



renderEPS
public static void renderEPS(byte[] rawEPS, String name, float x, float y, float w, float h, float bboxx, float bboxy, float bboxw, float bboxh, PSGenerator gen) throws IOException(Code)
Places an EPS file in the PostScript stream.
Parameters:
  rawEPS - byte array containing the raw EPS data
Parameters:
  name - name for the EPS document
Parameters:
  x - x-coordinate of viewport in millipoints
Parameters:
  y - y-coordinate of viewport in millipoints
Parameters:
  w - width of viewport in millipoints
Parameters:
  h - height of viewport in millipoints
Parameters:
  bboxx - x-coordinate of EPS bounding box in points
Parameters:
  bboxy - y-coordinate of EPS bounding box in points
Parameters:
  bboxw - width of EPS bounding box in points
Parameters:
  bboxh - height of EPS bounding box in points
Parameters:
  gen - the PS generator
throws:
  IOException - in case an I/O error happens during output



writeImage
public static void writeImage(byte[] img, Dimension imgDim, String imgDescription, Rectangle2D targetRect, boolean isJPEG, ColorSpace colorSpace, PSGenerator gen) throws IOException(Code)
Writes a bitmap image to the PostScript stream.
Parameters:
  img - the bitmap image as a byte array
Parameters:
  imgDim - the dimensions of the image
Parameters:
  imgDescription - the name of the image
Parameters:
  targetRect - the target rectangle to place the image in
Parameters:
  isJPEG - true if "img" contains a DCT-encoded images, false if "img" contains the decoded bitmap
Parameters:
  colorSpace - the color space of the image
Parameters:
  gen - the PostScript generator
throws:
  IOException - In case of an I/O exception



writeReusableImage
public static PSResource writeReusableImage(byte[] img, Dimension imgDim, String formName, String imageDescription, boolean isJPEG, ColorSpace colorSpace, PSGenerator gen) throws IOException(Code)
Writes a bitmap image as a PostScript form enclosed by DSC resource wrappers to the PostScript file.
Parameters:
  img - the raw bitmap data
Parameters:
  imgDim - the dimensions of the image
Parameters:
  formName - the name of the PostScript form to use
Parameters:
  imageDescription - a description of the image added as a DSC Title comment
Parameters:
  isJPEG - true if "img" contains a DCT-encoded images, false if "img" contains the decoded bitmap
Parameters:
  colorSpace - the color space of the image
Parameters:
  gen - the PostScript generator a PSResource representing the form for resource tracking
throws:
  IOException - In case of an I/O exception



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.