- unittestsreportersetup.zip
- UTestReporterSetup.exe
- unittestsreportersources.zip
- UnitTestsReporter
- Binaries
- Channel
- Include
- Sources
- Common.cpp
- Common
- Composite
- CppUnitLite
- Include
- Sources
- EasyTest.reg
- EasyTest.sln
- EasyTest
- EasyTestViewer
- Logger
- Mocks
- Objects
- Sample
- XMLTemplates
- sample_2k3.zip
- UTestReporter.2k3
- Channel
- Include
- Sources
- Common.cpp
- CppUnitLite
- Include
- Sources
- Sample
- XMLTemplates
- sample_vc6.zip
- UTestReporter.VC6
- Channel
- Include
- Sources
- Common.cpp
- CppUnitLite
- Include
- Sources
- Sample
- XMLTemplates
|
/****************************************************************************\
Datei : Color.h
Projekt: Farbverwaltung
Inhalt : CColor Deklaration
Datum : 10.01.1999
Autor : Christian Rodemeyer
Hinweis: � 1999 by Christian Rodemeyer
\****************************************************************************/
#pragma once
#ifndef __COLOR_H
#define __COLOR_H
/****************************************************************************\
CColor: Repr�sentiert einen Farbwert
\****************************************************************************/
class CColor
{
public:
// COLORREF Konvertierung
// ----------------------
CColor(COLORREF cr = 0);
operator COLORREF() const;
// RGB - Routinen
// --------------
void SetRed(int red); // 0..255
void SetGreen(int green); // 0..255
void SetBlue(int blue); // 0..255
void SetRGB(int red, int blue, int green);
int GetRed() const; // 0..255
int GetGreen() const; // 0..255
int GetBlue() const; // 0..255
// HLS - Routinen
// --------------
void SetHue(float hue); // 0.0 .. 360.0
void SetLuminance(float luminance); // 0.0 .. 1.0
void SetSaturation(float saturation); // 0.0 .. 1.0
void SetHLS(float hue, float luminance, float saturation);
float GetHue() const; // 0.0 .. 360.0
float GetLuminance() const; // 0.0 .. 1.0
float GetSaturation() const; // 0.0 .. 1.0
private:
// Konvertierung
// -------------
void ToRGB(); // logisch konstant, nicht physikalisch
void ToHLS(); // logisch konstant, nicht physikalisch
static unsigned char ToRGB1(float rm1, float rm2, float rh);
// Daten
// -----
union // Byteweiser Zugriff auf die COLORREF Struktur
{
COLORREF m_colorref;
unsigned char m_color[4];
};
enum {c_red = 0, c_green = 1, c_blue = 2, c_null = 3}; // enum Hack f�r colorbyte-Index
float m_hue; // 0.0 .. 360.0 // Winkel
float m_saturation; // 0.0 .. 1.0 // Prozent
float m_luminance; // 0.0 .. 1.0 // Prozent
// Flag f�r Lazy Evaluation
bool m_bIsRGB;
bool m_bIsHLS;
};
#endif
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
MSc in System Engineering from Tallinn Technical University, Estonia. Currently, I work in a hitech enterprise in Israel.