com.moesol.bindings.platform_sdk.windows_api
Class HBITMAP

java.lang.Object
  extended by com.moesol.bindings.platform_sdk.windows_api.HANDLE
      extended by com.moesol.bindings.platform_sdk.windows_api.HBITMAP

public class HBITMAP
extends HANDLE

Holds a Win32 HBITMAP


Field Summary
static int CBM_INIT
           
static int DIB_PAL_COLORS
           
static int DIB_RGB_COLORS
           
 
Method Summary
static HBITMAP createBitmap(int width, int height, byte[] bits)
          Create a depth 1 bitmap from an array of bytes, one bit per pixel eight bits per byte.
static HBITMAP createCompatibleBitmap(HDC hdc, int width, int height)
           
static HBITMAP createDIBitmap(HDC hdc, BITMAPINFOHEADER bmih, int fdwInit, int[] lpbInit, BITMAPINFO lpbmi, int fuUsage)
           
static HBITMAP createDIBitmap(HDC hdc, BufferedImage bi)
           
static HBITMAP createDIBitmap(HDC hdc, BufferedImage bi, boolean clear_alpha)
          Create a Win32 Device Dependent Bitmap from a java.awt.image.BufferedImage.
 void destroyBitmap()
           
 void getBits(byte[] bits)
           
 int getHeight()
           
 int getObject(BITMAP[] out_bitmap)
           
 int getWidth()
           
 void setBits(byte[] bits)
           
 
Methods inherited from class com.moesol.bindings.platform_sdk.windows_api.HANDLE
_getHandle, _safeGetHandle, detach, equals, getLeakCount, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CBM_INIT

public static final int CBM_INIT
See Also:
Constant Field Values

DIB_RGB_COLORS

public static final int DIB_RGB_COLORS
See Also:
Constant Field Values

DIB_PAL_COLORS

public static final int DIB_PAL_COLORS
See Also:
Constant Field Values
Method Detail

createBitmap

public static HBITMAP createBitmap(int width,
                                   int height,
                                   byte[] bits)
Create a depth 1 bitmap from an array of bytes, one bit per pixel eight bits per byte.

Parameters:
width - - number of bits in a scanline
height - - number of scanlines
bits - - bitmap data used to set the bits in a rectangle of pixels. Each scan line in the rectangle must be word aligned (scan lines that are not word aligned must be padded with zeros). If this parameter is null, the contents of the new bitmap is undefined.
Returns:
handle to a native bitmap

createCompatibleBitmap

public static HBITMAP createCompatibleBitmap(HDC hdc,
                                             int width,
                                             int height)

createDIBitmap

public static HBITMAP createDIBitmap(HDC hdc,
                                     BITMAPINFOHEADER bmih,
                                     int fdwInit,
                                     int[] lpbInit,
                                     BITMAPINFO lpbmi,
                                     int fuUsage)

createDIBitmap

public static HBITMAP createDIBitmap(HDC hdc,
                                     BufferedImage bi,
                                     boolean clear_alpha)
Create a Win32 Device Dependent Bitmap from a java.awt.image.BufferedImage. Currently only images of type TYPE_INT_ARGB are supported.

Parameters:
hdc -
bi - - BufferedImage of type TYPE_INT_ARGB.
clear_alpha - - if true resets the alpha byte to zero
Returns:
handle to a Device Dependent Bitmap

createDIBitmap

public static HBITMAP createDIBitmap(HDC hdc,
                                     BufferedImage bi)

getHeight

public int getHeight()

getWidth

public int getWidth()

setBits

public void setBits(byte[] bits)

getBits

public void getBits(byte[] bits)

destroyBitmap

public void destroyBitmap()

getObject

public int getObject(BITMAP[] out_bitmap)


Copyright © 2004 Moebius Solutions, Inc. All Rights Reserved.