Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

spdtcolor.h

00001 /***************************************************************************
00002 spdtcolor.cpp  -  description
00003 -------------------
00004 begin                : Mon Jul 28 2003
00005 copyright            : (C) 2003 by Sven Broenstrup
00006 email                : starpeak@sptk.org
00007 ***************************************************************************/
00008 
00009 /***************************************************************************
00010 *                                                                         *
00011 *   StarPeak OnlineMedia., hereby disclaims all copyright interest in     *
00012 *   the library `SPTK' written by Sven Broenstrup.                        *
00013 *                                                                         *
00014 *   Permission is hereby granted, free of charge, to any person obtaining *
00015 *   a copy of this software and associated documentation files (the       *
00016 *   "Software"), to deal in the Software without restriction, including   *
00017 *   without limitation the rights to use, copy, modify, merge, publish,   *
00018 *   distribute, sublicense, and/or sell copies of the Software, and to    *
00019 *   permit persons to whom the Software is furnished to do so, subject to *
00020 *   the following conditions:                                             *
00021 *                                                                         *
00022 *   The above copyright notice and this permission notice shall be        *
00023 *   included in all copies or substantial portions of the Software.       *
00024 *                                                                         *
00025 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
00026 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
00027 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
00028 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
00029 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
00030 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
00031 *   OTHER DEALINGS IN THE SOFTWARE.                                       *
00032 *                                                                         *
00033 ***************************************************************************/
00034 
00035 #ifndef SPDTCOLOR_H
00036 #define SPDTCOLOR_H
00037 #include "sptkobject.h"
00038 
00039 
00044 class spdtColor : public sptkObject
00045 {
00046 public:
00047     spdtColor();
00048     ~spdtColor();
00049 
00050     void setColorByString(std::string color);
00051     void setColorByRGB(int R, int G, int B);
00052     void setColorByHSV(int H, int S, int V);
00053     void setColorByCMYK(int C, int M, int Y, int K);
00054 
00059     int getR();
00064     int getG();
00069     int getB();
00070     
00075     int getH();
00080     int getS();
00085     int getV();
00086     
00090     int getC();
00094     int getM();
00098     int getY();
00102     int getK();
00103     
00108     int getGray();
00109 protected:
00111     int rgb_r;
00113     int rgb_g;
00115     int rgb_b;
00116     
00118     int hsv_h;
00120     int hsv_s;
00122     int hsv_v;
00123 
00125     int cmyk_c;
00127     int cmyk_m;
00129     int cmyk_y;
00131     int cmyk_k;
00132 };
00133 
00134 #endif
Powered by SPOM