[ROOT] --> System
Device independent 24 bit bitmap.
This class provides a simplified interface to a Windows 24-bit Device Independent Bitmap (DIB). Since the bitmap is kept in memory it can be manipulated directly, without having to pass thru GDI for the most common functions, such as getPixel() or setPixel(). Even if only a very limited interface is provided, it is still possible to obtain a handle to the bitmap, via the getHandle() function, and use standard GDI calls to perform unsupported functions.
public Dib24 ( int width , int height ) ;
Creates a bitmap of the specified size.
width | width of bitmap in pixels |
height | height of bitmap in pixels |
public Dib24 ( const Dib24 & ) ;
Copy constructor.
public virtual ~ Dib24 ( ) ;
Destructor.
public void clear ( ) ;
Clears the bitmap, filling it with black.
public void stretch ( HDC hdc , int x , int y , int width , int height ) ;
Stretch-copies the bitmap into a device context.
hdc | handle of device context where bitmap will be copied |
x | x coordinate of upper left corner of destination rectangle |
y | y coordinate of upper left corner of destination rectangle |
width | width of destination rectangle |
height | height of destination rectangle |
public void copy ( HDC hdc , int x , int y ) ;
Copies the bitmap into a device context.
The destination rectangle has the same size as the bitmap. If a different size is required the stretch() functions should be used instead.
hdc | handle of device context where bitmap will be copied |
x | x coordinate of upper left corner of destination rectangle |
y | y coordinate of upper left corner of destination rectangle |
public DWORD getPixelFast ( int x , int y ) const ;
Returns the color of the specified pixel.
Note: this is a faster but unsafe version of getPixel(). If there is a chance that x or y are out of range then getPixel() should be used.
x | x coordinate of pixel |
y | y coordinate of pixel |
public void setPixelFast ( int x , int y , DWORD value ) ;
Sets the color of the specified pixel.
Note: this is a faster but unsafe version of setPixel(). If there is a chance that x or y are out of range then setPixel() should be used.
x | x coordinate of pixel |
y | y coordinate of pixel |
color | color to set for specified pixel |
public DWORD getPixel ( int x , int y ) const ;
Returns the color of the specified pixel.
x | x coordinate of pixel |
y | y coordinate of pixel |
public void setPixel ( int x , int y , DWORD value ) ;
Sets the color of the specified pixel.
x | x coordinate of pixel |
y | y coordinate of pixel |
color | color to set for specified pixel |
public HDC getHandle ( ) ;
Returns the handle of the bitmap device context.
This handle may be used in all the GDI calls that require a device context.
This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.
Click here to return to the top of the page.