Java Doc for PixelAccessor.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » 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 » 6.0 JDK Modules » Java Advanced Imaging » javax.media.jai 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.jai.PixelAccessor

PixelAccessor
final public class PixelAccessor (Code)
This is a utility class that may be used to access the pixel data stored in a RenderedImage's Rasters, as well as performing pixel-to-color data translation based on the image's SampleModel and ColorModel. It also provides several static methods to determine information about the image data.

This class is intended to help classes that need to access the pixel and/or color data of a RenderedImage, such as an OpImage, in an optimized fashion. Most of the variables defined in this class are public so that other classes may use them directly. However, the variables are also declared final so that other classes can not modify their values.

In general, the pixel data of a RenderedImage may be obtained by calling the getPixels() method. By definition, the pixel data of an image are the data described by the image's SampleModel and stored in the image's Rasters. No consideration of any kind is given to the image's ColorModel. If no error is found, the pixel data are returned in the primitive arrays of the type specified by the caller in an unpacked format, along with access information. Therefore, the specified data type must be one of the valid types defined in DataBuffer and large enough (in bit depth) to hold the pixel data of the image.

The pixel data of a binary image may be obtained in a packed format by calling the getPackedPixels() method. It returns the data in a packed byte array, with 8 pixels packed into 1 byte. The format of the data in the array is similar to the format described by the MultiPixelPackedSampleModel, where the end of each scanline is padded to the end of the byte if necessary. Note that this method returns a valid result only if and only if the image is a single-band bit image, that is, each pixel has only 1 sample with a sample size of 1 bit.

Two corresponding "set" methods are also provided for setting the computed pixel data back into the Raster's DataBuffer: setPixels() for unpacked data, and setPackedPixels() for packed data. It is very important that the caller uses the correct "set" method that matches the "get" method used to obtain the data, or errors will occur.

The color/alpha data of the RenderedImage may be obtained by calling the getComponents() method which returns the unnormalized data in the ColorSpace specified in the ColorModel, or the getComponentsRGB() method which returns the data scaled from 0 to 255 in the default sRGB ColorSpace. These methods retrieve the pixel data from the Raster, and perform the pixel-to-color translation. Therefore, in order for these two methods to return a valid result, the image must have a valid ColorModel.

Similarly, two "set" methods may be used to perform the color-to-pixel translation, and set the pixel data back to the Raster's DataBuffer. Again, it is important that the "get" and "set" methods are matched up correctly.

In addition, several static methods are included in this class for the convenience of OpImage developers, who may use them to help determine the appropriate destination SampleModel type.
since:
   JAI 1.1



Field Summary
final public static  intTYPE_BIT
     Tag for single-bit data type.
final public  intbufferType
     The type of the DataBuffer's data array used to store the pixel data by the image's SampleModel.
final public  ColorModelcolorModel
     The image's ColorModel.
final public  int[]componentSize
     The size, in number of bits, of all the color/alpha components.
final public  intcomponentType
     The type of the color/alpha components, determined based on the component size.
final public  booleanhasCompatibleCM
     Set to true if the image has a non-null ColorModel which is compatible with the image's SampleModel; false otherwise.
final public  booleanisComponentCM
     Set to true if the image has a ComponentColorModel; false otherwise.
final public  booleanisComponentSM
     true if the image has a ComponentSampleModel; false otherwise.
final public  booleanisIndexCM
     Set to true if the image has an IndexColorModel; false otherwise.
final public  booleanisMultiPixelPackedSM
     true if the image has a MultiPixelPackedSampleModel; false otherwise.
final public  booleanisPacked
     Set to true if the pixel data of this image may be packed into a byte array.
final public  booleanisPackedCM
     Set to true if the image has a PackedColorModel; false otherwise.
final public  booleanisSinglePixelPackedSM
     true if the image has a SinglePixelPackedSampleModel; false otherwise.
final public  intnumBands
     The number of bands (samples) per pixel.
final public  intnumComponents
     The total number of color/alpha components in the image's ColorModel.
final public  SampleModelsampleModel
     The image's SampleModel.
final public  int[]sampleSize
     The size, in number of bits, of all the pixel samples.
final public  intsampleType
     The data type of the pixel samples, determined based on the sample size.
final public  inttransferType
     The type of the primitive array used to transfer the pixel data by the image's SampleModel.

Constructor Summary
public  PixelAccessor(RenderedImage image)
     Constructs a PixelAccessor from a RenderedImage.
public  PixelAccessor(SampleModel sm, ColorModel cm)
     Constructs a PixelAccessor given a valid SampleModel and a (possibly null) ColorModel.

Method Summary
public  UnpackedImageDatagetComponents(Raster raster, Rectangle rect, int type)
     Returns an array of unnormalized color/alpha components in the ColorSpace defined in the image's ColorModel.
public  UnpackedImageDatagetComponentsRGB(Raster raster, Rectangle rect)
     Returns an array of color/alpha components scaled from 0 to 255 in the default sRGB ColorSpace.
public static  intgetDestNumBands(Vector sources)
     Returns the smallest number of bands of all the sources. This method may be used to determine the number of bands a destination should have in the default situation.
public static  intgetDestPixelType(Vector sources)
     Returns the largest data type of all the sources.
public  PackedImageDatagetPackedPixels(Raster raster, Rectangle rect, boolean isDest, boolean coerceZeroOffset)
     Returns a region of the pixel data within a Raster in a packed byte array.
public static  intgetPixelType(SampleModel sm)
     Determines the pixel type based on the SampleModel. The pixel type signifies the data type for a PixelAccessor. For ComponentSampleModel, the pixel type is the same as the type of the DataBuffer used to store the pixel data.
public  UnpackedImageDatagetPixels(Raster raster, Rectangle rect, int type, boolean isDest)
     Returns a region of the pixel data within a Raster in an unpacked primitive array.
public static  booleanisPackedOperation(PixelAccessor[] srcs, PixelAccessor dst)
     Returns true if the destination and/or all the sources are single-bit, single-band images, and their pixel data may be packed into a byte array. If so, then the operations may be done in the packed format.
Parameters:
  srcs - The array of source PixelAccesors.
Parameters:
  dst - The destination PixelAccesor.
public static  booleanisPackedOperation(PixelAccessor src, PixelAccessor dst)
     Returns true if the destination and the source are both single-bit, single-band images, and their pixel data may be packed into a byte array. If so, then the operations may be done in the packed format.
Parameters:
  srcs - The source PixelAccesor.
Parameters:
  dst - The destination PixelAccesor.
public static  booleanisPackedOperation(PixelAccessor src1, PixelAccessor src2, PixelAccessor dst)
     Returns true if the destination and both sources are all single-bit, single-band images, and their pixel data may be packed into a byte array. If so, then the operations may be done in the packed format.
Parameters:
  src1 - The first source PixelAccesor.
Parameters:
  src2 - The second source PixelAccesor.
Parameters:
  dst - The destination PixelAccesor.
public  voidsetComponents(UnpackedImageData uid)
     Given an array of unnormalized color/alpha components, this method performs color-to-pixel translation, and sets the translated pixel data back to the Raster within a specific region.
public  voidsetComponentsRGB(UnpackedImageData uid)
     Given an array of normalized (between 0 and 255) alpha/RGB color components, this method performs color-to-pixel translation, and sets the translated pixel data back to the Raster within a specific region.
public  voidsetPackedPixels(PackedImageData pid)
     Sets a region of the pixel data within a Raster using a primitive array.
public  voidsetPixels(UnpackedImageData uid)
     Sets a region of the pixel data within a Raster using a primitive array.
public  voidsetPixels(UnpackedImageData uid, boolean clamp)
     Sets a region of the pixel data within a Raster using a primitive array.

Field Detail
TYPE_BIT
final public static int TYPE_BIT(Code)
Tag for single-bit data type.



bufferType
final public int bufferType(Code)
The type of the DataBuffer's data array used to store the pixel data by the image's SampleModel. This is the same value as that returned by SampleModel.getDataType().



colorModel
final public ColorModel colorModel(Code)
The image's ColorModel.



componentSize
final public int[] componentSize(Code)
The size, in number of bits, of all the color/alpha components. This is the same array as that returned by ColorModel.getComponentSize().



componentType
final public int componentType(Code)
The type of the color/alpha components, determined based on the component size.



hasCompatibleCM
final public boolean hasCompatibleCM(Code)
Set to true if the image has a non-null ColorModel which is compatible with the image's SampleModel; false otherwise.



isComponentCM
final public boolean isComponentCM(Code)
Set to true if the image has a ComponentColorModel; false otherwise.



isComponentSM
final public boolean isComponentSM(Code)
true if the image has a ComponentSampleModel; false otherwise.



isIndexCM
final public boolean isIndexCM(Code)
Set to true if the image has an IndexColorModel; false otherwise.



isMultiPixelPackedSM
final public boolean isMultiPixelPackedSM(Code)
true if the image has a MultiPixelPackedSampleModel; false otherwise.



isPacked
final public boolean isPacked(Code)
Set to true if the pixel data of this image may be packed into a byte array. That is, each pixel has 1 sample (1 band) with a sample size of 1 bit. If this variable is true, getPackedPixels() should return a valid result, with 8 pixels packed into 1 byte.



isPackedCM
final public boolean isPackedCM(Code)
Set to true if the image has a PackedColorModel; false otherwise.



isSinglePixelPackedSM
final public boolean isSinglePixelPackedSM(Code)
true if the image has a SinglePixelPackedSampleModel; false otherwise.



numBands
final public int numBands(Code)
The number of bands (samples) per pixel. This is the same value as that returned by SampleModel.getNumBands().



numComponents
final public int numComponents(Code)
The total number of color/alpha components in the image's ColorModel. This is the same value as that returned by ColorModel.getNumComponents().



sampleModel
final public SampleModel sampleModel(Code)
The image's SampleModel.



sampleSize
final public int[] sampleSize(Code)
The size, in number of bits, of all the pixel samples. This is the same array as that returned by SampleModel.getSampleSize().



sampleType
final public int sampleType(Code)
The data type of the pixel samples, determined based on the sample size.



transferType
final public int transferType(Code)
The type of the primitive array used to transfer the pixel data by the image's SampleModel. This is the same value as that returned by SampleModel.getTransferType().




Constructor Detail
PixelAccessor
public PixelAccessor(RenderedImage image)(Code)
Constructs a PixelAccessor from a RenderedImage. The RenderedImage must have a valid SampleModel, but may or may not have a valid ColorModel.
Parameters:
  image - The image whose data are to be accessed.
throws:
  IllegalArgumentException - If image isnull, or if the image does not have a validSampleModel.



PixelAccessor
public PixelAccessor(SampleModel sm, ColorModel cm)(Code)
Constructs a PixelAccessor given a valid SampleModel and a (possibly null) ColorModel.
Parameters:
  sm - The SampleModel for the image to be accessed.Must be valid.
Parameters:
  cm - The ColorModel for the image to be accessed.May be null.
throws:
  IllegalArgumentException - If sm is null.




Method Detail
getComponents
public UnpackedImageData getComponents(Raster raster, Rectangle rect, int type)(Code)
Returns an array of unnormalized color/alpha components in the ColorSpace defined in the image's ColorModel. This method retrieves the pixel data within the specified rectangular region from the Raster, performs the pixel-to-color translation based on the image's ColorModel, and returns the components in the order specified by the ColorSpace.

In order for this method to return a valid result, the image must have a valid ColorModel that is compatible with the image's SampleModel. Further, the SampleModel and ColorModel must have the same transferType.

The component data are stored in a primitive array of the type specified by the type argument. It must be one of the valid data types defined in DataBuffer and large (in bit depth) enough to hold the color/alpha components, or an exception is thrown. This means type should be greater than or equal to componentType. To avoid extra array copy, it is best to use DataBuffer.TYPE_INT for this argument.

The Rectangle specifies the region of interest within which the pixel data are to be retrieved. It must be completely inside the Raster's boundary, or else this method throws an exception.
Parameters:
  raster - The Raster that contains the pixel data.
Parameters:
  rect - The region of interest within the Rasterwhere the pixels are accessed.
Parameters:
  type - The type of the primitive array used to return thecolor/alpha components with. The UnpackedImageData with its data filled in.
throws:
  IllegalArgumentException - If the image does not have a validColorModel that is compatible with itsSampleModel.
throws:
  IllegalArgumentException - If type is not avalid data type defined in DataBuffer, oris not large enough to hold the translated color/alphacomponents.
throws:
  IllegalArgumentException - If rect is notcontained by the bounds of the specified Raster.




getComponentsRGB
public UnpackedImageData getComponentsRGB(Raster raster, Rectangle rect)(Code)
Returns an array of color/alpha components scaled from 0 to 255 in the default sRGB ColorSpace. This method retrieves the pixel data within the specified rectangular region from the Raster, performs the pixel-to-color translation based on the image's ColorModel, and returns the components in the order specified by the ColorSpace.

In order for this method to return a valid result, the image must have a valid ColorModel that is compatible with the image's SampleModel. Further, the SampleModel and ColorModel must have the same transferType.

The component data are stored in a two-dimensional, band-interleaved, byte array, because the components are always scaled from 0 to 255. Red is band 0, green is band 1, blue is band 2, and alpha is band 3.

The Rectangle specifies the region of interest within which the pixel data are to be retrieved. It must be completely inside the Raster's boundary, or this method will throw an exception.
Parameters:
  raster - The Raster that contains the pixel data.
Parameters:
  rect - The region of interest within the Rasterwhere the pixels are accessed. The UnpackedImageData with its data filled in.
throws:
  IllegalArgumentException - If the image does not have a validColorModel that is compatible with itsSampleModel.
throws:
  IllegalArgumentException - If rect is notcontained by the bounds of the specified Raster.




getDestNumBands
public static int getDestNumBands(Vector sources)(Code)
Returns the smallest number of bands of all the sources. This method may be used to determine the number of bands a destination should have in the default situation. It guarantees that every destination band has a corresponding source band.

In general, if an operation has multiple sources, and some sources have 1 band and others have multiple bands, the single band may be applied to the multiple bands one at a time. (An example of this would be the MultiplyOpImage). Therefore, in such a case, this method returns the smallest band count among the multi-band sources.

If there is no object in the source Vector, this method returns 0. All the objects in the source Vector must be RenderedImages.

When determining the result, only information from each image's SampleModel are used. No consideration is given to the image's ColorModel.
Parameters:
  sources - A Vector of RenderedImagesources. The minimum number of destination bands.
throws:
  IllegalArgumentException - If sources isnull.
throws:
  ClassCastException - If any object in sourcesis not a RenderedImage.




getDestPixelType
public static int getDestPixelType(Vector sources)(Code)
Returns the largest data type of all the sources. This method may be used to determine the pixel sample type of a destination in the default situation. It guarantees that the destination can store the resulting pixel values without losing any precision. The pixel type signifies the data type for a PixelAccessor.

If all the sources are single-bit images, this method returns TYPE_BIT (defined in this class) so that the destination does not use unnecessary memory for some operations. This includes all images whose SampleModel is single-banded and whose sample size is 1, regardless of the type of ColorModel the image may have. If an operation does not wish to deal with packed data, it should use TYPE_BYTE for pixel computation.

If there is no object in the source Vector, this method returns TYPE_UNDEFINED. All the objects in the source Vector must be RenderedImages.

When determining the result, only information from each image's SampleModel is used. No consideration is given to the image's ColorModel.
Parameters:
  sources - A Vector of RenderedImagesources. The largest data type which can accomodate all sources.
throws:
  IllegalArgumentException - If sources isnull.
throws:
  ClassCastException - If any object in sourcesis not a RenderedImage.




getPackedPixels
public PackedImageData getPackedPixels(Raster raster, Rectangle rect, boolean isDest, boolean coerceZeroOffset)(Code)
Returns a region of the pixel data within a Raster in a packed byte array. The returned data are retrieved from the Raster's DataBuffer; no pixel-to-color translation is performed.

This method only returns a valid result when the pixels are single-band and single-bit. All other types of data result in an exception. The data are packed in such a format that eight pixels are packed into one byte, and the end of each scanline is padded with zeros to the end of the byte.

In general, this method is called when operations are to be performed on the bit data in a packed format directly, to save memory usage. The static method isPackedOperation should be used to determine whether the destination and/or its sources are suitable for performing operations to a packed array.

The Rectangle specifies the region of interest within which the pixel data are to be retrieved. It must be completely inside the Raster's boundary, or this method will throw an exception.
Parameters:
  raster - The Raster that contains the pixel data.
Parameters:
  rect - The region of interest within the Rasterwhere the pixels are accessed.
Parameters:
  isDest - Indicates whether this Raster is adestination Raster. That is, its pixels havenot been computed.
Parameters:
  coerceZeroOffset - If true the returnedPackedImageData will be forced to have abitOffset and offset of zeroand a lineStride of (rect.width+7)/8.The coercedZeroOffset field of the returnedPackedImageData will be set to true. The PackedImageData with its data filled in.
throws:
  IllegalArgumentException - If data described by theRaster's SampleModel are notsingle-band and single-bit.
throws:
  IllegalArgumentException - If rect is notwithin the bounds of the specified Raster.




getPixelType
public static int getPixelType(SampleModel sm)(Code)
Determines the pixel type based on the SampleModel. The pixel type signifies the data type for a PixelAccessor. For ComponentSampleModel, the pixel type is the same as the type of the DataBuffer used to store the pixel data. For all other types of SampleModel, the pixel type is determined based on the sample sizes.
Parameters:
  sm - The SampleModel of the image. The pixel type for this sample model.



getPixels
public UnpackedImageData getPixels(Raster raster, Rectangle rect, int type, boolean isDest)(Code)
Returns a region of the pixel data within a Raster in an unpacked primitive array. The returned data are retrieved from the Raster's DataBuffer; no pixel-to-color translation is performed.

The primitive array is of the type specified by the type argument. It must be one of the valid data types defined in DataBuffer and large (in bit depth) enough to hold the pixel samples, or an exception will be thrown. This means type should be greater than or equal to sampleType.

The Rectangle specifies the region of interest within which the pixel data are to be retrieved. It must be completely inside the Raster's boundary, or else this method throws an exception.

This method tries to avoid copying data as much as possible. If it is unable to reformat the pixel data in the way requested, or if the pixels do not have enough data to satisfy the request, this method throws an exception.
Parameters:
  raster - The Raster that contains the pixel data.
Parameters:
  rect - The region of interest within the Rasterwhere the pixels are accessed.
Parameters:
  type - The type of the primitive array used to return thepixel samples.
Parameters:
  isDest - Indicates whether this Raster is adestination Raster. That is, its pixels havenot been computed. The pixel data in an UnpackedImageData object.
throws:
  IllegalArgumentException - If type is not avalid data type defined in DataBuffer, oris not large enough to hold the pixel samples from thespecified Raster.
throws:
  IllegalArgumentException - If rect is notcontained by the bounds of the specified Raster.




isPackedOperation
public static boolean isPackedOperation(PixelAccessor[] srcs, PixelAccessor dst)(Code)
Returns true if the destination and/or all the sources are single-bit, single-band images, and their pixel data may be packed into a byte array. If so, then the operations may be done in the packed format.
Parameters:
  srcs - The array of source PixelAccesors.
Parameters:
  dst - The destination PixelAccesor. true if a packed operation is possible.



isPackedOperation
public static boolean isPackedOperation(PixelAccessor src, PixelAccessor dst)(Code)
Returns true if the destination and the source are both single-bit, single-band images, and their pixel data may be packed into a byte array. If so, then the operations may be done in the packed format.
Parameters:
  srcs - The source PixelAccesor.
Parameters:
  dst - The destination PixelAccesor. true if a packed operation is possible.



isPackedOperation
public static boolean isPackedOperation(PixelAccessor src1, PixelAccessor src2, PixelAccessor dst)(Code)
Returns true if the destination and both sources are all single-bit, single-band images, and their pixel data may be packed into a byte array. If so, then the operations may be done in the packed format.
Parameters:
  src1 - The first source PixelAccesor.
Parameters:
  src2 - The second source PixelAccesor.
Parameters:
  dst - The destination PixelAccesor. true if a packed operation is possible.



setComponents
public void setComponents(UnpackedImageData uid)(Code)
Given an array of unnormalized color/alpha components, this method performs color-to-pixel translation, and sets the translated pixel data back to the Raster within a specific region. It is very important that the components array along with access information are obtained by calling the getComponents() method, or errors will occur.

In order for this method to return a valid result, the image must have a valid ColorModel that is compatible with the image's SampleModel. Further, the SampleModel and ColorModel must have the same transferType.

This method sets data only if the set flag in UnpackedImageData is true.
Parameters:
  uid - The UnpackedImageData whose data is to be set.
throws:
  IllegalArgumentException - If the uid isnull.




setComponentsRGB
public void setComponentsRGB(UnpackedImageData uid)(Code)
Given an array of normalized (between 0 and 255) alpha/RGB color components, this method performs color-to-pixel translation, and sets the translated pixel data back to the Raster within a specific region. It is very important that the components array along with access information are obtained by calling the getComponentsRGB() method, or errors will occur.

In order for this method to return a valid result, the image must have a valid ColorModel that is compatible with the image's SampleModel. Furthermore, the SampleModel and ColorModel must have the same transferType.

This method sets data only if the set flag in UnpackedImageData is true.
Parameters:
  uid - The UnpackedImageData to set.
throws:
  IllegalArgumentException - If the uid isnull.




setPackedPixels
public void setPackedPixels(PackedImageData pid)(Code)
Sets a region of the pixel data within a Raster using a primitive array. This method copies data only if the set flag in PackedImageData is true.

The PackedImageData should be obtained by calling the getPackedPixels() method.
Parameters:
  pid - The PackedImageData object whose pixelsare to be written.
throws:
  IllegalArgumentException - If the pid isnull.




setPixels
public void setPixels(UnpackedImageData uid)(Code)
Sets a region of the pixel data within a Raster using a primitive array. This method copies data only if the set flag in UnpackedImageData is true. Performs clamping by default.

The UnpackedImageData should be obtained by calling the getPixels() method.
Parameters:
  uid - The UnpackedImageData object to set.
throws:
  IllegalArgumentException - If the uid isnull.




setPixels
public void setPixels(UnpackedImageData uid, boolean clamp)(Code)
Sets a region of the pixel data within a Raster using a primitive array. This method only copies data only if the set flag in UnpackedImageData is true.

The UnpackedImageData should be obtained by calling the getPixels() method.
Parameters:
  uid - The UnpackedImageData object to set.
Parameters:
  clamp - A boolean set to true if clampingis to be performed.
throws:
  IllegalArgumentException - If the uid isnull.




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.