Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cColorRef.h File Reference

Go to the source code of this file.

Classes

class  GrayLib::cColorRef
 
class  GrayLib::cColorDX
 
class  GrayLib::cColor888
 
class  GrayLib::cColor555
 
class  GrayLib::cColor565
 
class  GrayLib::cColorConv
 

Namespaces

 GrayLib
 

Macros

#define D3DCOLOR_DEFINED
 
#define D3DCOLOR_ARGB(a, r, g, b)   ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
 
#define D3DCOLOR_XRGB(r, g, b)   D3DCOLOR_ARGB(0xff,r,g,b)
 0xff = COLOR_ALPHA_OPAQUE, but don't change it because it conflicts with DX9 "#define". More...
 
#define ColorRefDEF(n, r, g, b)   COLORREF_##n = RGB(r,g,b),
 
#define ColorRefDEF(n, r, g, b)   D3DCOLOR_##n = D3DCOLOR_XRGB(r,g,b),
 

Typedefs

typedef DWORD D3DCOLOR
 Stuff normally defined in windows.h or DirectX headers. More...
 
typedef BYTE GrayLib::COLOR_ELEM_t
 A single 8 bit color element. alpha, red, green, or blue intensity as 0-255. More...
 
typedef WORD GrayLib::COLOR16_t
 A 16 bit greyscale color. More...
 
typedef WORD GrayLib::COLOR565_t
 A 16 bit 565 type color pixel. R=high bits, B=low value bits. More...
 
typedef WORD GrayLib::COLOR555_t
 A 16 bit X555 type color pixel. R=high bits, B=low value bits. 1 alpha bit. More...
 

Enumerations

enum  GrayLib::COLORREF_TYPE_
 
enum  GrayLib::D3DCOLOR_TYPE_
 

Detailed Description

Macro Definition Documentation

◆ ColorRefDEF [1/2]

#define ColorRefDEF (   n,
  r,
  g,
 
)    COLORREF_##n = RGB(r,g,b),

◆ ColorRefDEF [2/2]

#define ColorRefDEF (   n,
  r,
  g,
 
)    D3DCOLOR_##n = D3DCOLOR_XRGB(r,g,b),

◆ D3DCOLOR_ARGB

#define D3DCOLOR_ARGB (   a,
  r,
  g,
 
)    ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))

◆ D3DCOLOR_DEFINED

#define D3DCOLOR_DEFINED

◆ D3DCOLOR_XRGB

#define D3DCOLOR_XRGB (   r,
  g,
 
)    D3DCOLOR_ARGB(0xff,r,g,b)

0xff = COLOR_ALPHA_OPAQUE, but don't change it because it conflicts with DX9 "#define".

Typedef Documentation

◆ D3DCOLOR

typedef DWORD D3DCOLOR

Stuff normally defined in windows.h or DirectX headers.

ARGB (high to low bits). cColorDX. MUST use DWORD (not UINT32) to match "d3d9types.h"