WinapiExtension
 All Classes Files Functions Variables Typedefs Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
DibSection Class Reference

Device independent bitmap. More...

#include <gdi.h>

Inheritance diagram for DibSection:
GdiObject< HBITMAP >

Public Member Functions

 DibSection ()
 
 DibSection (int width, int height, int bpp, bool bottomup=true)
 
 DibSection (HBITMAP bitmap, int bpp, bool bottomup)
 
 DibSection (HBITMAP bitmap)
 
bool Attach (HBITMAP bitmap)
 
void Clear ()
 
bool CopyCreate (HBITMAP bitmap, int bpp, bool bottomup)
 
bool CopyCreate (HBITMAP bitmap)
 
bool CopyFromBitmap (HBITMAP bitmap)
 
bool CopyToBitmap (HBITMAP bitmap)
 
bool Create (int width, int height, int bpp, bool bottomup=true)
 
HBITMAP Detach ()
 
int FlippedY (int y)
 
void * GetBits ()
 
int GetBPP ()
 
int GetHeight ()
 
void * GetPixelAddress (int x, int y)
 
int GetWidth ()
 
bool IsBottomUp ()
 
DibSectionoperator= (const DibSection &other)
 
- Public Member Functions inherited from GdiObject< HBITMAP >
 GdiObject (HBITMAPpHandle=NULL)
 
 operator HBITMAP ()
 
void SetHandle (HBITMAPpHandle)
 

Static Public Member Functions

static int BPP (HBITMAP bitmap)
 
static void FillBitmapInfo (BITMAPINFO &bmi, int w, int h, int bpp, bool bottomup=true)
 
static bool IsBottomUp (HBITMAP bitmap)
 
static bool IsDibSection (HBITMAP bitmap)
 

Public Attributes

BITMAP dibData
 
BITMAPINFO dibInfo
 
- Public Attributes inherited from GdiObject< HBITMAP >
HBITMAP handle
 

Detailed Description

Device independent bitmap.

Constructor & Destructor Documentation

DibSection::DibSection ( )
inline

Empty ctor

DibSection::DibSection ( int  width,
int  height,
int  bpp,
bool  bottomup = true 
)
inline

Create with undefined colors

DibSection::DibSection ( HBITMAP  bitmap,
int  bpp,
bool  bottomup 
)
inline

Create copy from another bitmap

DibSection::DibSection ( HBITMAP  bitmap)
inline

Create copy from another bitmap

Member Function Documentation

bool DibSection::Attach ( HBITMAP  bitmap)
inline

This will fail if the bitmap is not a dib

int DibSection::BPP ( HBITMAP  bitmap)
inlinestatic

Get bits per pixel of a bitmap

void DibSection::Clear ( )
inline

Delete all data

bool DibSection::CopyCreate ( HBITMAP  bitmap,
int  bpp,
bool  bottomup 
)
inline

Create copy from another bitmap

bool DibSection::CopyCreate ( HBITMAP  bitmap)
inline

Shortcut of CopyCreate()

bool DibSection::CopyFromBitmap ( HBITMAP  bitmap)
inline

Copy color data from a bitmap

bool DibSection::CopyToBitmap ( HBITMAP  bitmap)
inline

Copy color data to a bitmap

bool DibSection::Create ( int  width,
int  height,
int  bpp,
bool  bottomup = true 
)
inline

Create with undefined colors

HBITMAP DibSection::Detach ( )
inline

Release the handle from this instance

void DibSection::FillBitmapInfo ( BITMAPINFO &  bmi,
int  w,
int  h,
int  bpp,
bool  bottomup = true 
)
inlinestatic

Create a valid BITMAPINFO

int DibSection::FlippedY ( int  y)
inline
Returns
Inverts y if the dib is bottomup
void* DibSection::GetBits ( )
inline
Returns
Pointer to the beginning of the color data
int DibSection::GetBPP ( )
inline

Bits per pixel

int DibSection::GetHeight ( )
inline

Height

void* DibSection::GetPixelAddress ( int  x,
int  y 
)
inline
Returns
Pointer to a specific pixel in the color data
int DibSection::GetWidth ( )
inline

Width

bool DibSection::IsBottomUp ( HBITMAP  bitmap)
inlinestatic

Check if a dib is bottomup. This function is only relevant on dibs, normal bitmaps are always bottomup.

bool DibSection::IsBottomUp ( )
inline
Returns
If this dib was created bottomup or topdown
bool DibSection::IsDibSection ( HBITMAP  bitmap)
inlinestatic

Check if the parameter is a normal bitmap or a dib

DibSection & DibSection::operator= ( const DibSection other)
inline

Create copy from another bitmap

Member Data Documentation

BITMAP DibSection::dibData

Normal bitmap data

BITMAPINFO DibSection::dibInfo

Dib creation data


The documentation for this class was generated from the following file: