|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jniwrapper.Parameter
com.jniwrapper.Pointer.Void
com.jniwrapper.win32.Handle
com.jniwrapper.win32.gdi.GdiObject
com.jniwrapper.win32.gdi.Bitmap
This class represents common functionality for working with bitmaps.
| Nested Class Summary | |
static class |
Bitmap.Compression
|
static class |
Bitmap.PredefinedBitmap
Class PredefinedBitmap enumeration represents predefined windows bitmaps. |
| Nested classes inherited from class com.jniwrapper.win32.gdi.GdiObject |
GdiObject.ImageLoadParameters, GdiObject.ImageType, GdiObject.Type |
| Field Summary | |
protected static BitmapBuilderFactory |
_builderFactory
|
protected static int |
CBM_INIT
Initialize bitmap. |
protected static int |
DIB_PAL_COLORS
Color table in palette indixes. |
protected static int |
DIB_RGB_COLORS
Color table in RGB. |
protected static java.lang.String |
FUNCTION_CREATEDIBITMAP
|
protected static java.lang.String |
FUNCTION_GET_DIBITS
|
protected static java.lang.String |
FUNCTION_SET_DIBITS
|
| Fields inherited from class com.jniwrapper.win32.gdi.GdiObject |
GDI_ERROR, HGDI_ERROR |
| Fields inherited from class com.jniwrapper.Parameter |
LICENSE_TYPE, V |
| Constructor Summary | |
Bitmap()
|
|
Bitmap(long value)
|
|
| Method Summary | |
void |
createDIBSection(DIBitmap result,
DC hdc,
BitmapInfo bitmapInfo,
int colorModel,
Pointer ppvBits,
Handle hSection,
int dwOffset)
Creates a handle to device independent bitmap (DIB). |
void |
createDIBSection(DIBitmap result,
Pointer ppvBits,
BitmapInfo bitmapInfo)
|
void |
deleteObject()
Deletes the object. |
int |
getBitCount()
Returns the number of bits per pixel. |
abstract BitmapInfo |
getBitmapInfo()
|
abstract BitmapInfoHeader |
getBitmapInfoHeader()
|
long |
getDIBits(DC dc,
int startScan,
int scanLines,
Pointer bits,
BitmapInfo bitmapInfo,
int colorModelType)
Returns bits of a bitmap. |
abstract PrimitiveArray |
getDIBytes()
Returns array of device independent bitmap bytes as PrimitiveArray of UInt8. |
int |
getHeight()
|
Size |
getSize()
|
Bitmap |
getTransparentMask()
|
int |
getWidth()
|
boolean |
isTransparent()
Returns true if a transparent bitmap. |
abstract void |
loadFromFile(java.lang.String fileName)
|
void |
saveToFile(java.lang.String fileName)
Saves bitmap to the specified file. |
long |
setDIBits(DC dc,
int startScan,
int scanLines,
Pointer bits,
BitmapInfo bitmapInfo,
int colorModelType)
Sets bits for a bitmap. |
abstract void |
setDIBytes(PrimitiveArray bytes)
Sets bytes of the bitmap. |
protected void |
setSize(int width,
int height)
|
protected void |
setTransparentMask(java.awt.Image transparentMask)
|
java.awt.image.BufferedImage |
toImage()
Converts windows Bitmap to BufferedImage. |
| Methods inherited from class com.jniwrapper.win32.gdi.GdiObject |
getObject, getObjectType |
| Methods inherited from class com.jniwrapper.win32.Handle |
clone, closeHandle |
| Methods inherited from class com.jniwrapper.Pointer.Void |
asFunction, asFunction, asTypedPointer, castTo, equals, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write |
| Methods inherited from class com.jniwrapper.Parameter |
acceptIOPerformer, asReturnValue, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, setDataBuffer, toByteArray, write |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final BitmapBuilderFactory _builderFactory
protected static final java.lang.String FUNCTION_GET_DIBITS
protected static final java.lang.String FUNCTION_SET_DIBITS
protected static final java.lang.String FUNCTION_CREATEDIBITMAP
protected static final int DIB_RGB_COLORS
protected static final int DIB_PAL_COLORS
protected static final int CBM_INIT
| Constructor Detail |
public Bitmap()
public Bitmap(long value)
| Method Detail |
public long setDIBits(DC dc,
int startScan,
int scanLines,
Pointer bits,
BitmapInfo bitmapInfo,
int colorModelType)
dc - dc compatible with a bitmap.startScan - start scanline in a bitmap.scanLines - the number of scanlines in a bitmap.bits - a pointer to PrimitiveArray of UInt8 (result bits).bitmapInfo - BitmapInfo structure describing a bitmap.colorModelType - a type of color model.
public long getDIBits(DC dc,
int startScan,
int scanLines,
Pointer bits,
BitmapInfo bitmapInfo,
int colorModelType)
dc - dc compatible with a bitmap.startScan - start scanline in bitmap.scanLines - the number of scanlines in a bitmap.bits - a pointer to PrimitiveArray of UInt8 (result bits).bitmapInfo - BitmapInfo structure describing a bitmap.colorModelType - a type of color model.
protected void setSize(int width,
int height)
public Size getSize()
public int getWidth()
public int getHeight()
public void createDIBSection(DIBitmap result,
Pointer ppvBits,
BitmapInfo bitmapInfo)
public void createDIBSection(DIBitmap result,
DC hdc,
BitmapInfo bitmapInfo,
int colorModel,
Pointer ppvBits,
Handle hSection,
int dwOffset)
result - [out] is a handle to DIB.hdc - [in] is a handle to the DC of source DDBitmap.bitmapInfo - [in] describes source DDBitmap.colorModel - [in] is the type of color model.ppvBits - [out] is a pointer to the location of bits in DIB section.hSection - [in] is a hable to DIB section.dwOffset - [in] is an offset of bits location in DIB section.public int getBitCount()
protected void setTransparentMask(java.awt.Image transparentMask)
public Bitmap getTransparentMask()
public boolean isTransparent()
public void deleteObject()
deleteObject in class GdiObjectpublic java.awt.image.BufferedImage toImage()
BufferedImage.
public void saveToFile(java.lang.String fileName)
throws java.io.IOException
fileName - path to the file where the bitmap will be saved.
java.io.IOExceptionpublic abstract BitmapInfoHeader getBitmapInfoHeader()
public abstract BitmapInfo getBitmapInfo()
public abstract void loadFromFile(java.lang.String fileName)
public abstract PrimitiveArray getDIBytes()
public abstract void setDIBytes(PrimitiveArray bytes)
bytes -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||