MRPT  1.9.9
Classes | Macros | Typedefs | Functions | Variables
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,
 
)
Value:
(static_cast<uint32_t>(r) << 16 | static_cast<uint32_t>(g) << 8 | \
static_cast<uint32_t>(b))

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.

References mrpt::opengl::internal::data.

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: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020