|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lizardtech.djvu.DjVuObject
com.lizardtech.djvu.GMap
public abstract class GMap
This is an abstract class for representing pixel maps.
Field Summary | |
---|---|
protected int |
blueOffset
The offset to the color blue. |
protected byte[] |
data
The raw pixel data. |
protected int |
greenOffset
The offset to the color green. |
protected int |
ncolors
The number of bytes per pixel |
protected int |
ncolumns
The number of columns. |
protected boolean |
needRamp
False if we can skip the ramp call. |
protected int |
nrows
The number of rows. |
java.util.Hashtable |
properties
properties associated with this image map |
protected int |
redOffset
The offset to the color red. |
Fields inherited from class com.lizardtech.djvu.DjVuObject |
---|
hasReferences |
Constructor Summary | |
---|---|
GMap(int ncolors,
int redOffset,
int greenOffset,
int blueOffset,
boolean needRamp)
Creates a new GMap object. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Create a copy of this image. |
int |
columns()
Query the number of columns in an image. |
GPixelReference |
createGPixelReference(int offset)
Create a GPixelReference (a pixel iterator) that refers to this map starting at the specified offset. |
GPixelReference |
createGPixelReference(int row,
int column)
Create a GPixelReference (a pixel iterator) that refers to this map starting at the specified position. |
abstract void |
fill(GMap ref,
int dx,
int dy)
Insert the reference map at the specified location. |
void |
fillRGBPixels(int x,
int y,
int w,
int h,
int[] pixels,
int off,
int scansize)
Fills an array of pixels from the specified values. |
int |
getBlueOffset()
Query the data offset for blue pixels. |
int |
getColorSize()
Query the bytes per pixel. |
byte[] |
getData()
Query the raw data buffer. |
int |
getGreenOffset()
Query the data offset for green pixels. |
int |
getRedOffset()
Query the data offset for red pixels. |
int |
getRowSize()
Query the getRowSize. |
boolean |
isRampNeeded()
Query if we are allowed to skip the ramp call. |
GPixel |
ramp(GPixelReference ref)
Convert the pixel to 24 bit color. |
int |
rowOffset(int row)
Query the start offset of a row. |
int |
rows()
Query the number of rows in an image. |
abstract GMap |
translate(int dx,
int dy,
GMap retval)
Shift the origin of the image by coping the pixel data. |
Methods inherited from class com.lizardtech.djvu.DjVuObject |
---|
checkLockTime, create, create, createSoftReference, createWeakReference, getDjVuOptions, getFromReference, invoke, setDjVuOptions |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.util.Hashtable properties
protected final int ncolors
protected final int redOffset
protected final int greenOffset
protected final int blueOffset
protected int ncolumns
protected int nrows
protected final boolean needRamp
protected byte[] data
Constructor Detail |
---|
public GMap(int ncolors, int redOffset, int greenOffset, int blueOffset, boolean needRamp)
Method Detail |
---|
public final int columns()
public abstract void fill(GMap ref, int dx, int dy)
ref
- map to insertdx
- horizontal position to insert atdy
- vertical position to insert atpublic void fillRGBPixels(int x, int y, int w, int h, int[] pixels, int off, int scansize)
x
- the x-coordinate of the upper-left corner of the region of
pixelsy
- the y-coordinate of the upper-left corner of the region of
pixelsw
- the width of the region of pixelsh
- the height of the region of pixelspixels
- the array of pixelsoff
- the offset into the pixel arrayscansize
- the distance from one row of pixels to the next in the
arraypublic final int rows()
public abstract GMap translate(int dx, int dy, GMap retval)
dx
- amount to shift the origin of the x-axisdy
- amount to shift the origin of the y-axisretval
- the image to copy the data into
public java.lang.Object clone()
clone
in class java.lang.Object
public final byte[] getData()
public int rowOffset(int row)
row
- the row to query
public int getRowSize()
public final int getColorSize()
public final int getRedOffset()
public final int getGreenOffset()
public final int getBlueOffset()
public GPixelReference createGPixelReference(int offset)
offset
- position of the first pixel to reference
public GPixelReference createGPixelReference(int row, int column)
row
- initial vertical positioncolumn
- initial horizontal position
public GPixel ramp(GPixelReference ref)
public boolean isRampNeeded()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |