OpImage. The ImageLayout class encapsulates three types of information about an image:
SampleModel and ColorModel of the image. Each of these parameters may be set individually, or left unset. An unset parameter will cause the corresponding value of a given RenderedImage to be used. For example, the code:
ImageLayout layout; RenderedImage im; int width = layout.getTileWidth(im);will return the tile width of the
ImageLayout if it is set, or the tile width of the image im if it is not. ImageLayout objects are primarily intended to be passed as part of the renderingHints argument of the create() method of RenderedImageFactory. The create() method may remove parameter settings that it cannot deal with, prior to passing the ImageLayout to any OpImage constructors. New OpImage subclasses are not required to accept an ImageLayout parameter, but most will at least need to synthesize one to be passed up the constructor chain.
Methods that modify the state of an ImageLayout return a reference to 'this' following the change. This allows multiple modifications to be made in a single expression. This provides a way of modifying an ImageLayout within a superclass constructor call.
OpImage. The ImageLayout class encapsulates three types of information about an image:
SampleModel and ColorModel of the image. Each of these parameters may be set individually, or left unset. An unset parameter will cause the corresponding value of a given RenderedImage to be used. For example, the code:
ImageLayout layout; RenderedImage im; int width = layout.getTileWidth(im);will return the tile width of the
ImageLayout if it is set, or the tile width of the image im if it is not. ImageLayout objects are primarily intended to be passed as part of the renderingHints argument of the create() method of RenderedImageFactory. The create() method may remove parameter settings that it cannot deal with, prior to passing the ImageLayout to any OpImage constructors. New OpImage subclasses are not required to accept an ImageLayout parameter, but most will at least need to synthesize one to be passed up the constructor chain.
Methods that modify the state of an ImageLayout return a reference to 'this' following the change. This allows multiple modifications to be made in a single expression. This provides a way of modifying an ImageLayout within a superclass constructor call.
| |
| |