00001
00002
00003
00004
00005
00006
00007 #include "QColor.h"
00008
00009
00010 #include <iostream>
00011 using namespace std;
00012
00013
00014
00015
00016
00017 void QColor::setAsCurrent()
00018 {
00019 glColor4f(R,G,B,A);
00020 }
00021
00022
00023 const void QColor::set( float r , float g , float b , float a )
00024 {
00025 R = r;
00026 G = g;
00027 B = b;
00028 A = a;
00029 }
00030
00031
00032 float QColor::getR()
00033 {
00034 return R;
00035 }
00036
00037
00038 void QColor::setR( float newValue )
00039 {
00040 R = newValue;
00041 }
00042
00043
00044 float QColor::getG()
00045 {
00046 return G;
00047 }
00048
00049
00050 void QColor::setG( float newValue )
00051 {
00052 G = newValue;
00053 }
00054
00055
00056 float QColor::getB()
00057 {
00058 return B;
00059 }
00060
00061
00062 void QColor::setB( float newValue )
00063 {
00064 B = newValue;
00065 }
00066
00067
00068 float QColor::getA()
00069 {
00070 return A;
00071 }
00072
00073
00074 void QColor::setA( float newValue )
00075 {
00076 A = newValue;
00077 }
00078
00079
00080
00081
00082 void QColor::copyFrom( QColor* from )
00083 {
00084 setR(from->getR());
00085 setG(from->getG());
00086 setB(from->getB());
00087 setA(from->getA());
00088 }
00089
00090
00091
00092
00093 void QColor::print()
00094 {
00095 cout << "Class : QColor" << endl;
00096 cout << "R = " << R << endl;
00097 cout << "G = " << G << endl;
00098 cout << "B = " << B << endl;
00099 cout << "A = " << A << endl;
00100 }
00101
00102
00103
00104
00105 QColor::QColor( )
00106 {
00107 R = 1;
00108 G = 1;
00109 B = 1;
00110 A = 1;
00111 }
00112
00113
00114
00115
00116 QColor::~QColor()
00117 {
00118 }
00119
00120
00121
00122