MRPT  1.9.9
CImage_loadXPM.cpp File Reference
#include "img-precomp.h"
#include <mrpt/core/exceptions.h>
#include <mrpt/img/CImage.h>
#include <cstring>
#include <string>
#include <unordered_map>
Include dependency graph for CImage_loadXPM.cpp:

Go to the source code of this file.

Classes

struct  XPMColorMapData
 
struct  rgbRecord
 

Macros

#define myRGB(r, g, b)
 

Typedefs

using XPMColorMap = std::unordered_map< std::string, XPMColorMapData >
 
using Long2LongHash = std::unordered_map< int64_t, int64_t >
 

Functions

static const char * ParseColor (const char *data)
 
static unsigned char ParseHexadecimal (char digit1, char digit2)
 
static bool GetRGBFromName (const char *inname, bool *isNone, unsigned char *r, unsigned char *g, unsigned char *b)
 

Variables

static const rgbRecord theRGBRecords []
 
static const int numTheRGBRecords = 235
 

Macro Definition Documentation

◆ myRGB

#define myRGB (   r,
  g,
  b 
)
Value:
(static_cast<uint32_t>(r) << 16 | static_cast<uint32_t>(g) << 8 | \
static_cast<uint32_t>(b))
GLubyte g
Definition: glext.h:6372
GLubyte GLubyte b
Definition: glext.h:6372
GLdouble GLdouble GLdouble r
Definition: glext.h:3711
unsigned __int32 uint32_t
Definition: rptypes.h:50

Definition at line 126 of file CImage_loadXPM.cpp.

Typedef Documentation

◆ Long2LongHash

using Long2LongHash = std::unordered_map<int64_t, int64_t>

Definition at line 78 of file CImage_loadXPM.cpp.

◆ XPMColorMap

using XPMColorMap = std::unordered_map<std::string, XPMColorMapData>

Definition at line 77 of file CImage_loadXPM.cpp.

Function Documentation

◆ GetRGBFromName()

static bool GetRGBFromName ( const char *  inname,
bool *  isNone,
unsigned char *  r,
unsigned char *  g,
unsigned char *  b 
)
static

Definition at line 388 of file CImage_loadXPM.cpp.

References numTheRGBRecords, ParseHexadecimal(), rgbRecord::rgb, and theRGBRecords.

Referenced by mrpt::img::CImage::loadFromXPM().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseColor()

static const char* ParseColor ( const char *  data)
static

Definition at line 80 of file CImage_loadXPM.cpp.

Referenced by mrpt::img::CImage::loadFromXPM().

Here is the caller graph for this function:

◆ ParseHexadecimal()

static unsigned char ParseHexadecimal ( char  digit1,
char  digit2 
)
static

Definition at line 369 of file CImage_loadXPM.cpp.

Referenced by GetRGBFromName().

Here is the caller graph for this function:

Variable Documentation

◆ numTheRGBRecords

const int numTheRGBRecords = 235
static

Definition at line 367 of file CImage_loadXPM.cpp.

Referenced by GetRGBFromName().

◆ theRGBRecords

const rgbRecord theRGBRecords[]
static

Definition at line 130 of file CImage_loadXPM.cpp.

Referenced by GetRGBFromName().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019