Debian Codegraph @

cvd/rgb8.h

raw symbols SCIP
1 #ifndef __RGB8_H
2 #define __RGB8_H
3
4 namespace CVD
5 {
6
7 /// @ingroup gImage
8
9 /// A 32-bit colour.
10 /// @b Deprecated The templated Rgba should be used instead (Rgba<byte> is exactly equivalent).
11 struct Rgb8
12 {
13 unsigned char red; ///< The red component
14 unsigned char green; ///< The green component
15 unsigned char blue; ///< The blue component
16 unsigned char dummy; ///< The 4th byte, usually either ignored or used to represent the alpha value
17
18 /// Default constructor. Sets all elements to zero.
19 explicit Rgb8()
20 : red(0)
21 , green(0)
22 , blue(0)
23 , dummy(0)
24 {
25 }
26
27 /// Construct an Rgb8 as specified
28 /// @param r The red component
29 /// @param g The green component
30 /// @param b The blue component
31 /// @param a The dummy byte (defaults to zero)
32 explicit Rgb8(unsigned char r, unsigned char g, unsigned char b, unsigned char a = 0)
33 : red(r)
34 , green(g)
35 , blue(b)
36 , dummy(a)
37 {
38 }
39 };
40
41 } // end namespace
42 #endif