Class Overview
This class contains utility methods that may be useful to ImageReader
plugins. Ideally these methods would be in the ImageReader base class
so that all subclasses could benefit from them, but that would be an
addition to the existing API, and it is not yet clear whether these methods
are universally useful, so for now we will leave them here.
Summary
Public Methods |
static
int[]
|
computeUpdatedPixels(Rectangle sourceRegion, Point destinationOffset, int dstMinX, int dstMinY, int dstMaxX, int dstMaxY, int sourceXSubsampling, int sourceYSubsampling, int passXStart, int passYStart, int passWidth, int passHeight, int passPeriodX, int passPeriodY)
A utility method that computes the exact set of destination
pixels that will be written during a particular decoding pass.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Constructors
Public Methods
public
static
int[]
computeUpdatedPixels
(Rectangle sourceRegion, Point destinationOffset, int dstMinX, int dstMinY, int dstMaxX, int dstMaxY, int sourceXSubsampling, int sourceYSubsampling, int passXStart, int passYStart, int passWidth, int passHeight, int passPeriodX, int passPeriodY)
A utility method that computes the exact set of destination
pixels that will be written during a particular decoding pass.
The intent is to simplify the work done by readers in combining
the source region, source subsampling, and destination offset
information obtained from the ImageReadParam
with
the offsets and periods of a progressive or interlaced decoding
pass.
Parameters
sourceRegion
| a Rectangle containing the
source region being read, offset by the source subsampling
offsets, and clipped against the source bounds, as returned by
the getSourceRegion method. |
destinationOffset
| a Point containing the
coordinates of the upper-left pixel to be written in the
destination. |
dstMinX
| the smallest X coordinate (inclusive) of the
destination Raster . |
dstMinY
| the smallest Y coordinate (inclusive) of the
destination Raster . |
dstMaxX
| the largest X coordinate (inclusive) of the destination
Raster . |
dstMaxY
| the largest Y coordinate (inclusive) of the destination
Raster . |
sourceXSubsampling
| the X subsampling factor. |
sourceYSubsampling
| the Y subsampling factor. |
passXStart
| the smallest source X coordinate (inclusive)
of the current progressive pass. |
passYStart
| the smallest source Y coordinate (inclusive)
of the current progressive pass. |
passWidth
| the width in pixels of the current progressive
pass. |
passHeight
| the height in pixels of the current progressive
pass. |
passPeriodX
| the X period (horizontal spacing between
pixels) of the current progressive pass. |
passPeriodY
| the Y period (vertical spacing between
pixels) of the current progressive pass. |
Returns
- an array of 6
int
s containing the
destination min X, min Y, width, height, X period and Y period
of the region that will be updated.