|
|||||||||
| 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.GPixmap
public class GPixmap
This class represents 24 bit color image maps.
| Field Summary | |
|---|---|
protected static byte[] |
clip
Used to quickly clip out of bounds values. |
protected static int[] |
ctable
Cached color correction table. |
protected static int[] |
ctableI
Indentity color correction table. |
protected static int[] |
invmap
Used to represent division as multiplication. |
protected static double |
lgamma
The color correction subsample for the cached color table. |
protected static java.lang.Object[] |
multiplierRefArray
Used for attenuation |
| 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 | |
|---|---|
GPixmap()
Creates a new GPixmap object. |
|
| Method Summary | |
|---|---|
void |
applyGammaCorrection(double gamma)
Correct the colors with a gamma subsample normalized to 1.0 for no correction. |
void |
attenuate(GBitmap bm,
int xpos,
int ypos)
Attenuate the specified bitmap. |
void |
blit(GBitmap bm,
int xpos,
int ypos,
GPixel color)
Insert the specified bitmap with the specified color. |
static GPixmap |
createGPixmap(DjVuInterface ref)
Creates an instance of GPixmap with the options interherited from the specified reference. |
void |
downsample(GMap src,
int subsample,
GRect pdr)
Fill this image from another source at reduced resolution. |
void |
downsample43(GMap src,
GRect pdr)
Fill this image from another source at reduced resolution of 4 vertical pixels to 3. |
void |
fill(GMap ref,
int dx,
int dy)
Insert the reference map at the specified location. |
static int[] |
getColorCorrection(double gamma)
Fill the array with color correction constants. |
protected static int[] |
getMultiplier(int maxgray)
Creates or retrieves a cached multiplier array to use when attenuating. |
GPixmap |
init(GMap ref)
Initialize this pixmap from another image map. |
GPixmap |
init(GMap ref,
GRect rect)
Initialize this pixmap from a segment of another image map. |
GPixmap |
init(int arows,
int acolumns,
GPixel filler)
Initialize this pixmap to the specified size and fill in the specified color. |
void |
stencil(GBitmap mask,
GPixmap foregroundMap,
int supersample,
int subsample,
GRect bounds,
double gamma)
Draw the foreground layer onto this background image. |
GMap |
translate(int dx,
int dy,
GMap retval)
Copy this image with a translated origin. |
| Methods inherited from class com.lizardtech.djvu.GMap |
|---|
clone, columns, createGPixelReference, createGPixelReference, fillRGBPixels, getBlueOffset, getColorSize, getData, getGreenOffset, getRedOffset, getRowSize, isRampNeeded, ramp, rowOffset, 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 static final int[] invmap
protected static final int[] ctableI
protected static int[] ctable
protected static double lgamma
protected static final byte[] clip
protected static final java.lang.Object[] multiplierRefArray
| Constructor Detail |
|---|
public GPixmap()
| Method Detail |
|---|
public static GPixmap createGPixmap(DjVuInterface ref)
ref - Object to interherit DjVuOptions from.
public static int[] getColorCorrection(double gamma)
gamma - color correction subsample
protected static int[] getMultiplier(int maxgray)
public void attenuate(GBitmap bm,
int xpos,
int ypos)
bm - Bitmap to attenuatexpos - horizontal positionypos - vertical position
public void blit(GBitmap bm,
int xpos,
int ypos,
GPixel color)
bm - bitmap to insertxpos - horizontal positionypos - vertical positioncolor - color to insert bitmap withpublic final void applyGammaCorrection(double gamma)
gamma - color correction
public void downsample(GMap src,
int subsample,
GRect pdr)
src - image map to reducesubsample - rate to subsamplepdr - target bounds
public void downsample43(GMap src,
GRect pdr)
src - image map to reducepdr - target bounds
java.lang.IllegalArgumentException - if the target rectangle is out of bounds
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 GPixmap init(int arows,
int acolumns,
GPixel filler)
arows - number of rowsacolumns - number of columnsfiller - fill color
public GPixmap init(GMap ref,
GRect rect)
ref - image map to initialize fromrect - bounding rectangle to initialize from
public GPixmap init(GMap ref)
ref - image map to initialize from
public void stencil(GBitmap mask,
GPixmap foregroundMap,
int supersample,
int subsample,
GRect bounds,
double gamma)
mask - the mask layerforegroundMap - the foreground colorssupersample - rate to upsample the foreground colorssubsample - rate to subsample the foreground colorsbounds - the target rectanglegamma - color correction factor
java.lang.IllegalArgumentException - if the specified bounds are not contained in the page
public GMap translate(int dx,
int dy,
GMap retval)
translate in class GMapdx - horizontal distance to translatedy - vertical distance to translateretval - an old image to try and reuse for the return value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||