|
|||||||||
| 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
com.lizardtech.djvu.GBitmap
public class GBitmap
This class represents bitonal and gray scale pixel images.
| Field Summary | |
|---|---|
protected int |
grays
Color depth |
| Fields inherited from class com.lizardtech.djvu.GMap |
|---|
blueOffset, data, greenOffset, ncolors, ncolumns, needRamp, nrows, properties, redOffset |
| Fields inherited from class com.lizardtech.djvu.DjVuObject |
|---|
hasReferences |
| Constructor Summary | |
|---|---|
GBitmap()
Creates a new GBitmap object. |
|
| Method Summary | |
|---|---|
boolean |
blit(GBitmap bm,
int xh,
int yh,
int subsample)
Insert another bitmap at the specified location. |
GRect |
compute_bounding_box()
Find the bounding box for non-white pixels. |
static GBitmap |
createGBitmap(DjVuInterface ref)
Creates an instance of GBitmap with the options interherited from the specified reference. |
void |
fill(GMap ref,
int dx,
int dy)
Insert the reference map at the specified location. |
void |
fill(short value)
Set the value of all pixels. |
boolean |
getBooleanAt(int offset)
Query a pixel as boolean |
protected int |
getBorder()
Query the border width. |
int |
getByteAt(int offset)
Query the pixel at a particular location |
int |
getBytesPerRow()
Query the number of bytes per row. |
int |
getGrays()
Query the color depth. |
GPixel[] |
getRamp()
|
int |
getRowSize()
Query the number of bytes per row. |
GBitmap |
init(GBitmap ref)
Initialize this map by copying a reference map |
GBitmap |
init(GBitmap ref,
GRect rect,
int border)
/** Initialize this map by copying a reference map |
GBitmap |
init(GBitmap ref,
int aborder)
Initialize this map by copying a reference map |
GBitmap |
init(int arows,
int acolumns,
int aborder)
Initialize this image with the specified values. |
boolean |
insertMap(GBitmap bit,
int dx,
int dy,
boolean doBlit)
Insert the reference map at the specified location. |
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. |
void |
setByteAt(int offset,
int value)
Set the pixel value. |
void |
setGrays(int ngrays)
Set the color depth |
void |
setMinimumBorder(int minimum)
Set the minimum border needed |
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.GMap |
|---|
clone, columns, createGPixelReference, createGPixelReference, fillRGBPixels, getBlueOffset, getColorSize, getData, getGreenOffset, getRedOffset, rows |
| Methods inherited from class com.lizardtech.djvu.DjVuObject |
|---|
checkLockTime, create, create, createSoftReference, createWeakReference, getDjVuOptions, getFromReference, invoke, logError, printStackTrace, setDjVuOptions, verbose |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int grays
| Constructor Detail |
|---|
public GBitmap()
| Method Detail |
|---|
public GPixel[] getRamp()
public static GBitmap createGBitmap(DjVuInterface ref)
ref - Object to interherit DjVuOptions from.
public final boolean getBooleanAt(int offset)
offset - position to query
public final void setByteAt(int offset,
int value)
offset - position of the pixel to setvalue - gray scale value to setpublic final int getByteAt(int offset)
offset - the pixel location
public int getBytesPerRow()
public final int getGrays()
public void setGrays(int ngrays)
ngrays - number of grays
java.lang.IllegalArgumentException - if the number of grays is less than 2 or greater than 256
public boolean blit(GBitmap bm,
int xh,
int yh,
int subsample)
bm - bitmap to insertxh - horizontal location to insert atyh - vertical location to insert atsubsample - rate to subsample at
public final int rowOffset(int row)
rowOffset in class GMaprow - the row to query
public final int getRowSize()
getRowSize in class GMappublic void fill(short value)
value - gray scale value to assign to all pixels
public void fill(GMap ref,
int dx,
int dy)
fill in class GMapref - map to insertdx - horizontal position to insert atdy - vertical position to insert at
public boolean insertMap(GBitmap bit,
int dx,
int dy,
boolean doBlit)
bit - map to insertdx - horizontal position to insert atdy - vertical position to insert atdoBlit - true if the gray scale values should be added
public GBitmap init(int arows,
int acolumns,
int aborder)
arows - number of rowsacolumns - number of columnsaborder - width of the border
public final GBitmap init(GBitmap ref)
ref - map to copy
public GBitmap init(GBitmap ref,
int aborder)
ref - map to copyaborder - number of border pixels
public GBitmap init(GBitmap ref,
GRect rect,
int border)
ref - map to copyrect - area to copyborder - number of border pixels
public void setMinimumBorder(int minimum)
minimum - the minumum border needed
public GMap translate(int dx,
int dy,
GMap retval)
translate in class GMapdx - 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
protected final int getBorder()
public GPixel ramp(GPixelReference ref)
ramp in class GMappublic boolean isRampNeeded()
isRampNeeded in class GMappublic GRect compute_bounding_box()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||