neoWidgets
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
neo::DibSection Class Reference

Device independent bitmap. More...

#include <GdiObject.h>

Inheritance diagram for neo::DibSection:
Inheritance graph
[legend]

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 neo::GdiObject< HBITMAP >
 GdiObject (HBITMAPpHandle=0)
 
 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 neo::GdiObject< HBITMAP >
HBITMAP handle
 

Detailed Description

Device independent bitmap.

Constructor & Destructor Documentation

neo::DibSection::DibSection ( )
inline

Empty ctor

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

Create with undefined colors

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

Create copy from another bitmap

neo::DibSection::DibSection ( HBITMAP  bitmap)
inline

Create copy from another bitmap

Member Function Documentation

bool neo::DibSection::Attach ( HBITMAP  bitmap)
inline

This will fail if the bitmap is not a dib

int neo::DibSection::BPP ( HBITMAP  bitmap)
inlinestatic

Get bits per pixel of a bitmap

void neo::DibSection::Clear ( )
inline

Delete all data

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

Create copy from another bitmap

bool neo::DibSection::CopyCreate ( HBITMAP  bitmap)
inline

Shortcut of CopyCreate()

bool neo::DibSection::CopyFromBitmap ( HBITMAP  bitmap)
inline

Copy color data from a bitmap

bool neo::DibSection::CopyToBitmap ( HBITMAP  bitmap)
inline

Copy color data to a bitmap

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

Create with undefined colors

HBITMAP neo::DibSection::Detach ( )
inline

Release the handle from this instance

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

Create a valid BITMAPINFO

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

Bits per pixel

int neo::DibSection::GetHeight ( )
inline

Height

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

Width

bool neo::DibSection::IsBottomUp ( HBITMAP  bitmap)
inlinestatic

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

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

Check if the parameter is a normal bitmap or a dib

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

Create copy from another bitmap

Member Data Documentation

BITMAP neo::DibSection::dibData

Normal bitmap data

BITMAPINFO neo::DibSection::dibInfo

Dib creation data


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