OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4BMPInfo Class Reference

#include <Bitmap256.h>

Inheritance diagram for C4BMPInfo:
[legend]
Collaboration diagram for C4BMPInfo:
[legend]

Public Member Functions

void Default ()
 
void Set (int iWdt, int iHgt, int iBitDepth)
 
int FileBitsOffset ()
 

Public Attributes

BITMAPFILEHEADER Head = BITMAPFILEHEADER()
 
BITMAPINFOHEADER Info = BITMAPINFOHEADER()
 

Detailed Description

Definition at line 61 of file Bitmap256.h.

Member Function Documentation

void C4BMPInfo::Default ( )

Definition at line 24 of file Bitmap256.cpp.

References InplaceReconstruct().

Referenced by Set().

25 {
26  InplaceReconstruct(this);
27 }
std::enable_if< std::is_nothrow_default_constructible< T >::value >::type InplaceReconstruct(T *obj)
Definition: Standard.h:35

Here is the call graph for this function:

Here is the caller graph for this function:

int C4BMPInfo::FileBitsOffset ( )

Definition at line 29 of file Bitmap256.cpp.

References tagBITMAPFILEHEADER::bfOffBits, and Head.

30 {
31  return Head.bfOffBits-sizeof(C4BMPInfo);
32 }
BITMAPFILEHEADER Head
Definition: Bitmap256.h:66
void C4BMPInfo::Set ( int  iWdt,
int  iHgt,
int  iBitDepth 
)

Definition at line 34 of file Bitmap256.cpp.

References tagBITMAPFILEHEADER::bfOffBits, tagBITMAPFILEHEADER::bfSize, tagBITMAPFILEHEADER::bfType, tagBITMAPINFOHEADER::biBitCount, tagBITMAPINFOHEADER::biClrImportant, tagBITMAPINFOHEADER::biClrUsed, tagBITMAPINFOHEADER::biCompression, tagBITMAPINFOHEADER::biHeight, tagBITMAPINFOHEADER::biPlanes, tagBITMAPINFOHEADER::biSize, tagBITMAPINFOHEADER::biSizeImage, tagBITMAPINFOHEADER::biWidth, Default(), DWordAligned(), Head, and Info.

35 {
36  Default();
37  // Set header
38  Head.bfType=*((const WORD*)"BM");
39  Head.bfSize=sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER)+DWordAligned(iWdt)*iHgt;
41  // Set bitmap info
43  Info.biWidth=iWdt;
44  Info.biHeight=iHgt;
45  Info.biPlanes=1;
46  Info.biBitCount=iBitDepth;
48  Info.biSizeImage=iWdt*iHgt;
50 }
int DWordAligned(int val)
Definition: Standard.h:49
void Default()
Definition: Bitmap256.cpp:24
BITMAPINFOHEADER Info
Definition: Bitmap256.h:67
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
struct tagBITMAPFILEHEADER BITMAPFILEHEADER
BITMAPFILEHEADER Head
Definition: Bitmap256.h:66
uint16_t WORD

Here is the call graph for this function:

Member Data Documentation


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