Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
mrpt::img::TColor Struct Reference

Detailed Description

A RGB color - 8bit.

Definition at line 22 of file TColor.h.

#include <mrpt/img/TColor.h>

Public Member Functions

constexpr TColor ()
 
constexpr TColor (uint8_t r, uint8_t g, uint8_t b, uint8_t alpha=255)
 
constexpr TColor (const unsigned int color_RGB_24bit)
 
constexpr TColor (const unsigned int color_RGB_24bit, const uint8_t alpha)
 
 operator unsigned int (void) const
 Operator for implicit conversion into an int binary representation 0xRRGGBB. More...
 
TColoroperator= (const TColor &other)
 
TColoroperator+= (const TColor &other)
 
TColoroperator-= (const TColor &other)
 

Static Public Member Functions

static constexpr TColor red ()
 Predefined colors. More...
 
static constexpr TColor green ()
 
static constexpr TColor blue ()
 
static constexpr TColor black ()
 
static constexpr TColor white ()
 
static constexpr TColor gray ()
 

Public Attributes

uint8_t R
 
uint8_t G
 
uint8_t B
 
uint8_t A
 

Constructor & Destructor Documentation

◆ TColor() [1/4]

constexpr mrpt::img::TColor::TColor ( )
inlineconstexpr

Definition at line 24 of file TColor.h.

Referenced by black(), blue(), gray(), green(), red(), and white().

◆ TColor() [2/4]

constexpr mrpt::img::TColor::TColor ( uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  alpha = 255 
)
inlineconstexpr

Definition at line 25 of file TColor.h.

◆ TColor() [3/4]

constexpr mrpt::img::TColor::TColor ( const unsigned int  color_RGB_24bit)
inlineexplicitconstexpr

Definition at line 31 of file TColor.h.

◆ TColor() [4/4]

constexpr mrpt::img::TColor::TColor ( const unsigned int  color_RGB_24bit,
const uint8_t  alpha 
)
inlineconstexpr

Definition at line 39 of file TColor.h.

Member Function Documentation

◆ black()

static constexpr TColor mrpt::img::TColor::black ( )
inlinestaticconstexpr

Definition at line 65 of file TColor.h.

References TColor().

Referenced by mrpt::maps::COccupancyGridMap2D::saveAsBitmapFileWithLandmarks().

◆ blue()

static constexpr TColor mrpt::img::TColor::blue ( )
inlinestaticconstexpr

◆ gray()

static constexpr TColor mrpt::img::TColor::gray ( )
inlinestaticconstexpr

Definition at line 67 of file TColor.h.

References TColor().

◆ green()

static constexpr TColor mrpt::img::TColor::green ( )
inlinestaticconstexpr

◆ operator unsigned int()

mrpt::img::TColor::operator unsigned int ( void  ) const
inline

Operator for implicit conversion into an int binary representation 0xRRGGBB.

Definition at line 52 of file TColor.h.

References B, G, and R.

◆ operator+=()

TColor & TColor::operator+= ( const TColor other)

Definition at line 42 of file TColor.cpp.

References A, B, G, and R.

◆ operator-=()

TColor & TColor::operator-= ( const TColor other)

Definition at line 52 of file TColor.cpp.

References A, B, G, and R.

◆ operator=()

TColor & TColor::operator= ( const TColor other)

Definition at line 62 of file TColor.cpp.

References A, B, G, and R.

◆ red()

static constexpr TColor mrpt::img::TColor::red ( )
inlinestaticconstexpr

◆ white()

static constexpr TColor mrpt::img::TColor::white ( )
inlinestaticconstexpr

Definition at line 66 of file TColor.h.

References TColor().

Member Data Documentation

◆ A

uint8_t mrpt::img::TColor::A

◆ B

uint8_t mrpt::img::TColor::B

◆ G

uint8_t mrpt::img::TColor::G

◆ R

uint8_t mrpt::img::TColor::R



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST