ADTF_DISPLAY_TOOLBOX  3.8.0 (ADTF 3.14.3)
color_intf.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace adtf
10 {
11 
12 namespace disptb
13 {
14 
15 namespace graphicslib
16 {
17 
18 namespace dengar
19 {
20 
26 class IColor
27 {
28 public:
29 
33  virtual ~IColor()
34  {}
35 
39  virtual tVoid Release() = 0;
40 
46  virtual tUInt32 GetRGBA() const = 0;
47 
55  virtual tVoid SetRGBA(tUInt32 nRGBA) = 0;
56 
62  virtual tUInt8 GetRed() const = 0;
63 
71  virtual tVoid SetRed(tUInt8 nRedValue) = 0;
72 
78  virtual tUInt8 GetGreen() const = 0;
79 
87  virtual tVoid SetGreen(tUInt8 nGreenValue) = 0;
88 
94  virtual tUInt8 GetBlue() const = 0;
95 
103  virtual tVoid SetBlue(tUInt8 nBlueValue) = 0;
104 
110  virtual tUInt8 GetAlpha() const = 0;
111 
119  virtual tVoid SetAlpha(tUInt8 nAlphaValue) = 0;
120 
126  virtual tUInt8 GetBrightness() const = 0;
127 };
128 
129 }
130 
131 using dengar::IColor;
132 }
133 
134 }
135 
136 }
Interface for color representation.
Definition: color_intf.h:27
virtual tUInt8 GetRed() const =0
Returns the value for the red channel.
virtual tUInt8 GetAlpha() const =0
This function returns the value for the alpha channel.
virtual tUInt8 GetBrightness() const =0
This function returns the value for a calculated brightness.
virtual tUInt8 GetBlue() const =0
Returns the value for the blue channel.
virtual tVoid SetRGBA(tUInt32 nRGBA)=0
Sets a four Byte value containing the 3 Color channels and the alpha channel with the given value.
virtual ~IColor()
virtual destructor to ensure proper cleanup.
Definition: color_intf.h:33
virtual tVoid Release()=0
Releases this color.
virtual tVoid SetGreen(tUInt8 nGreenValue)=0
Sets the value of the green channel.
virtual tVoid SetBlue(tUInt8 nBlueValue)=0
Sets the value of the blue channel.
virtual tVoid SetRed(tUInt8 nRedValue)=0
Sets the value of the red channel.
virtual tUInt8 GetGreen() const =0
Returns the value for the green channel.
virtual tUInt32 GetRGBA() const =0
Gets a four Byte value containing the 3 color channels and the alpha channel.
virtual tVoid SetAlpha(tUInt8 nAlphaValue)=0
Sets the value of the alpha channel.
Main namespace.